-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from denisyukphp/5.0.x
- Loading branch information
Showing
38 changed files
with
497 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<files psalm-version="4.30.0@d0bc6e25d89f649e4f36a534f330f8bb4643dd69"> | ||
<file src="src/Retry/BackOffRetry.php"> | ||
<InvalidReturnType occurrences="1"> | ||
<code>mixed</code> | ||
</InvalidReturnType> | ||
</file> | ||
<file src="src/Retry/Retry.php"> | ||
<InvalidReturnType occurrences="1"> | ||
<code>mixed</code> | ||
</InvalidReturnType> | ||
<PossiblyNullReference occurrences="2"> | ||
<code>backOff</code> | ||
<code>classify</code> | ||
</PossiblyNullReference> | ||
</file> | ||
</files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Orangesoft\BackOff; | ||
|
||
use Orangesoft\BackOff\Duration\Duration; | ||
use Orangesoft\BackOff\Generator\Generator; | ||
use Orangesoft\BackOff\Jitter\JitterInterface; | ||
use Orangesoft\BackOff\Jitter\NullJitter; | ||
use Orangesoft\BackOff\Sleeper\Sleeper; | ||
use Orangesoft\BackOff\Sleeper\SleeperInterface; | ||
use Orangesoft\BackOff\Strategy\ConstantStrategy; | ||
|
||
final class ConstantBackOff extends BackOff | ||
{ | ||
public function __construct( | ||
Duration $baseTime, | ||
Duration $capTime, | ||
?JitterInterface $jitter = null, | ||
?SleeperInterface $sleeper = null, | ||
) { | ||
$strategy = new ConstantStrategy(); | ||
$jitter ??= new NullJitter(); | ||
$generator = new Generator($strategy, $jitter); | ||
$sleeper ??= new Sleeper(); | ||
|
||
parent::__construct($baseTime, $capTime, $generator, $sleeper); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Orangesoft\BackOff; | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
final class NullBackOff implements BackOffInterface | ||
{ | ||
public function backOff(int $attempt): void | ||
{ | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.