Skip to content

Commit bc3c7ee

Browse files
committed
refactor: Simplify withSudoPassword method signature
- Combine parameters into a single line for better readability - Maintain functionality while improving code clarity
1 parent d0bef39 commit bc3c7ee

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
php-version: ${{ matrix.php }}
3131
coverage: xdebug
3232
# extensions: amqp,apcu,brotli,igbinary,intl,mbstring,memcached,redis,relay,zstd,:php-psr
33+
extensions: intl,sodium
3334
env:
3435
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3536

src/Concerns/HasSudoPassword.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ public function withoutSudoPassword(): self
3232
return $this->withSudoPassword(null);
3333
}
3434

35-
public function withSudoPassword(
36-
#[\SensitiveParameter]
37-
?string $sudoPassword
38-
): self {
35+
public function withSudoPassword(#[\SensitiveParameter] ?string $sudoPassword): self
36+
{
3937
$this->sudoPassword = $sudoPassword;
4038

4139
return $this;

src/Concerns/WithDumpable.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ public function dd(mixed ...$args): void
3535
*/
3636
public function dump(mixed ...$args): self
3737
{
38-
$args = [$this, ...$args];
39-
$varDumperExists = class_exists(VarDumper::class);
40-
41-
foreach ($args as $arg) {
42-
$varDumperExists ? VarDumper::dump($arg) : var_dump($arg);
38+
foreach ([$this, ...$args] as $arg) {
39+
class_exists(VarDumper::class) ? VarDumper::dump($arg) : var_dump($arg);
4340
}
4441

4542
return $this;

0 commit comments

Comments
 (0)