| 1 | <?php declare(strict_types=1); |
||
| 5 | class FailSafe |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var CircuitBreaker |
||
| 9 | */ |
||
| 10 | private $circuitBreaker; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var Retry |
||
| 14 | */ |
||
| 15 | private $retry; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param $policy |
||
| 19 | * |
||
| 20 | * @return FailSafe |
||
| 21 | * @throws \InvalidArgumentException |
||
| 22 | */ |
||
| 23 | public function with($policy) : FailSafe |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param $policy |
||
| 42 | * |
||
| 43 | * @return FailSafe |
||
| 44 | * @throws \InvalidArgumentException |
||
| 45 | */ |
||
| 46 | public function and($policy) : FailSafe |
||
| 50 | |||
| 51 | public function run(callable $operation, array $args = []) |
||
| 55 | } |
||
| 56 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.