diff --git a/src/LinearBackOff.php b/src/LinearBackOff.php index acddc23..42a8214 100644 --- a/src/LinearBackOff.php +++ b/src/LinearBackOff.php @@ -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(); diff --git a/src/Retry/ExceptionClassifier/CallbackExceptionClassifier.php b/src/Retry/ExceptionClassifier/CallbackExceptionClassifier.php index bd0e24a..bfe42bf 100644 --- a/src/Retry/ExceptionClassifier/CallbackExceptionClassifier.php +++ b/src/Retry/ExceptionClassifier/CallbackExceptionClassifier.php @@ -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; diff --git a/src/Retry/ExceptionClassifier/ExceptionClassifier.php b/src/Retry/ExceptionClassifier/ExceptionClassifier.php index 688ef09..6c9db4c 100644 --- a/src/Retry/ExceptionClassifier/ExceptionClassifier.php +++ b/src/Retry/ExceptionClassifier/ExceptionClassifier.php @@ -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; diff --git a/tests/Retry/RetryTest.php b/tests/Retry/RetryTest.php index d11145a..d0e036f 100644 --- a/tests/Retry/RetryTest.php +++ b/tests/Retry/RetryTest.php @@ -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());