Skip to content

Commit 20d7d96

Browse files
author
Aleksandr Denisyuk
authored
Merge pull request #3 from denisyukphp/5.0.x
2 parents ad139b5 + ba64def commit 20d7d96

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
/psalm-baseline.xml export-ignore
1313
/psalm.xml export-ignore
1414
/tests/ export-ignore
15-
/.Dockerfile export-ignore
16-
/.Makefile export-ignore
15+
/Dockerfile export-ignore
16+
/Makefile export-ignore

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ for ($i = 1; $i <= 10; $i++) {
9494
}
9595
```
9696

97-
Below you can see the time intervals in microseconds for exponential back-off with a multiplier of `2.0` and equal jitter, where the base time is `1_000` μs and the cap time is `512_000` μs:
97+
Below you can see the time intervals in microseconds for exponential back-off with a factor of `2.0` and equal jitter, where the base time is `1_000` μs and the cap time is `512_000` μs:
9898

9999
```text
100100
+---------+---------------------------+--------------------+

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"friendsofphp/php-cs-fixer": "^3.10",
2929
"php-parallel-lint/php-console-highlighter": "^1.0",
3030
"php-parallel-lint/php-parallel-lint": "^1.3",
31-
"phpbench/phpbench": "^1.2",
3231
"phpunit/phpunit": "^9.5",
3332
"psalm/plugin-phpunit": "^0.17.0",
3433
"vimeo/psalm": "^4.26"

src/LinearBackOff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(
1818
Duration $baseTime,
1919
Duration $capTime,
2020
?JitterInterface $jitter = null,
21-
?SleeperInterface $sleeper = null
21+
?SleeperInterface $sleeper = null,
2222
) {
2323
$strategy = new LinearStrategy();
2424
$jitter ??= new NullJitter();

src/Retry/ExceptionClassifier/CallbackExceptionClassifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function classify(\Throwable $throwable): bool
1919
$result = ($this->callback)($throwable);
2020

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

2525
return $result;

src/Retry/ExceptionClassifier/ExceptionClassifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(array $classNames = [])
3131
private function add(string $className): void
3232
{
3333
if (!class_exists($className) || !is_a($className, \Throwable::class, true)) {
34-
throw new \InvalidArgumentException(sprintf('Exception class must be a class that exists and can be thrown, "%s" given.', get_debug_type($className))); // @codeCoverageIgnore
34+
throw new \InvalidArgumentException(\sprintf('Exception class must be a class that exists and can be thrown, "%s" given.', get_debug_type($className))); // @codeCoverageIgnore
3535
}
3636

3737
$this->classNames[] = $className;

tests/Retry/RetryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ classNames: [
4545

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

0 commit comments

Comments
 (0)