Skip to content

Commit

Permalink
Fix php-cs-fixer issues
Browse files Browse the repository at this point in the history
  • Loading branch information
denisyukphp committed Nov 19, 2024
1 parent 1aecc59 commit ba64def
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/LinearBackOff.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(
Duration $baseTime,
Duration $capTime,
?JitterInterface $jitter = null,
?SleeperInterface $sleeper = null
?SleeperInterface $sleeper = null,
) {
$strategy = new LinearStrategy();
$jitter ??= new NullJitter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function classify(\Throwable $throwable): bool
$result = ($this->callback)($throwable);

if (!\is_bool($result)) {
throw new \RuntimeException(sprintf('Callback must return bool, %s given.', get_debug_type($result)));
throw new \RuntimeException(\sprintf('Callback must return bool, %s given.', get_debug_type($result)));
}

return $result;
Expand Down
2 changes: 1 addition & 1 deletion src/Retry/ExceptionClassifier/ExceptionClassifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(array $classNames = [])
private function add(string $className): void
{
if (!class_exists($className) || !is_a($className, \Throwable::class, true)) {
throw new \InvalidArgumentException(sprintf('Exception class must be a class that exists and can be thrown, "%s" given.', get_debug_type($className))); // @codeCoverageIgnore
throw new \InvalidArgumentException(\sprintf('Exception class must be a class that exists and can be thrown, "%s" given.', get_debug_type($className))); // @codeCoverageIgnore
}

$this->classNames[] = $className;
Expand Down
2 changes: 1 addition & 1 deletion tests/Retry/RetryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ classNames: [

try {
$retry->call(new CallbackSpy(static function (int $counter): never {
throw new \RuntimeException(sprintf('Exception thrown %d times.', $counter));
throw new \RuntimeException(\sprintf('Exception thrown %d times.', $counter));
}));
} catch (\RuntimeException $e) {
$this->assertSame('Exception thrown 2 times.', $e->getMessage());
Expand Down

0 comments on commit ba64def

Please sign in to comment.