| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function execute($payload, Queue $queue): void |
||
| 30 | { |
||
| 31 | foreach ($this->executors as $executor) { |
||
| 32 | try { |
||
| 33 | $executor->execute($payload, $queue); |
||
| 34 | |||
| 35 | return; |
||
| 36 | } catch (BadPayloadException $e) { |
||
| 37 | // try next executor |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | throw new BadPayloadException($payload); |
||
| 42 | } |
||
| 44 |