Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 12, 2024
1 parent a54faf4 commit 5a5e158
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 24 deletions.
8 changes: 6 additions & 2 deletions src/Concerns/InteractsWithExceptionHandling.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ protected function withoutExceptionHandling()

$this->app->instance(ExceptionHandler::class, new class implements ExceptionHandler
{
public function __construct() {}
public function __construct()
{
}

public function report(Throwable $e) {}
public function report(Throwable $e)
{
}

public function shouldReport(Throwable $e)
{
Expand Down
8 changes: 6 additions & 2 deletions tests/Stubs/ExceptionHandlerStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@

class ExceptionHandlerStub implements ExceptionHandler
{
public function __construct() {}
public function __construct()
{
}

public function report(Throwable $e) {}
public function report(Throwable $e)
{
}

public function shouldReport(Throwable $e)
{
Expand Down
48 changes: 36 additions & 12 deletions tests/Stubs/OutputStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
if (property_exists(Command::class, 'defaultName')) {
class OutputStub implements OutputInterface
{
public function write($messages, $newline = false, $options = 0) {}
public function write($messages, $newline = false, $options = 0)
{
}

public function writeln($messages, $options = 0) {}
public function writeln($messages, $options = 0)
{
}

public function setVerbosity($level) {}
public function setVerbosity($level)
{
}

public function getVerbosity(): int
{
Expand All @@ -41,25 +47,37 @@ public function isDebug(): bool
return false;
}

public function setDecorated($decorated) {}
public function setDecorated($decorated)
{
}

public function isDecorated(): bool
{
return false;
}

public function setFormatter(OutputFormatterInterface $formatter) {}
public function setFormatter(OutputFormatterInterface $formatter)
{
}

public function getFormatter(): OutputFormatterInterface {}
public function getFormatter(): OutputFormatterInterface
{
}
}
} else {
class OutputStub implements OutputInterface
{
public function write(Traversable|array|string $messages, bool $newline = false, int $options = 0): void {}
public function write(Traversable|array|string $messages, bool $newline = false, int $options = 0): void
{
}

public function writeln(Traversable|array|string $messages, int $options = 0): void {}
public function writeln(Traversable|array|string $messages, int $options = 0): void
{
}

public function setVerbosity(int $level): void {}
public function setVerbosity(int $level): void
{
}

public function getVerbosity(): int
{
Expand All @@ -86,15 +104,21 @@ public function isDebug(): bool
return false;
}

public function setDecorated(bool $decorated): void {}
public function setDecorated(bool $decorated): void
{
}

public function isDecorated(): bool
{
return false;
}

public function setFormatter(OutputFormatterInterface $formatter): void {}
public function setFormatter(OutputFormatterInterface $formatter): void
{
}

public function getFormatter(): OutputFormatterInterface {}
public function getFormatter(): OutputFormatterInterface
{
}
}
}
28 changes: 21 additions & 7 deletions tests/Unit/ImpersonatesUsersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,33 @@ public function set_currently_logged_in_user_for_app()
{
$user = new class implements Authenticatable
{
public function getAuthIdentifierName() {}
public function getAuthIdentifierName()
{
}

public function getAuthIdentifier() {}
public function getAuthIdentifier()
{
}

public function getAuthPassword() {}
public function getAuthPassword()
{
}

public function getAuthPasswordName() {}
public function getAuthPasswordName()
{
}

public function getRememberToken() {}
public function getRememberToken()
{
}

public function setRememberToken($value) {}
public function setRememberToken($value)
{
}

public function getRememberTokenName() {}
public function getRememberTokenName()
{
}
};

$this->app['auth'] = new class
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/InteractsWithContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public function register_instances_of_object_on_container()
{
$this->app = new class
{
public function instance() {}
public function instance()
{
}
};
$abstract = 'Foo';
$instance = new class {};
Expand Down

0 comments on commit 5a5e158

Please sign in to comment.