| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Handler implements HandlerInterface |
||
| 12 | { |
||
| 13 | /** @var string */ |
||
| 14 | protected const TYPE = ''; |
||
| 15 | |||
| 16 | /** @var HandlerInterface|null */ |
||
| 17 | protected HandlerInterface|null $handler; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Handler constructor. |
||
| 21 | */ |
||
| 22 | public function __construct() |
||
| 23 | { |
||
| 24 | $this->handler = null; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param HandlerInterface $handler |
||
| 29 | * @return HandlerInterface |
||
| 30 | */ |
||
| 31 | public function next(HandlerInterface $handler): HandlerInterface |
||
| 32 | { |
||
| 33 | $this->handler = $handler; |
||
| 34 | |||
| 35 | return $handler; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param OperationInterface $operation |
||
| 40 | * @return float|null |
||
| 41 | */ |
||
| 42 | public function handle(OperationInterface $operation): float|null |
||
| 49 | } |
||
| 50 | } |
||
| 51 |