| Conditions | 4 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | protected function verifyContracts(ApplicationOutboundEvent $event, array $contracts): bool |
||
| 14 | { |
||
| 15 | $invalidContracts = []; |
||
| 16 | foreach ($contracts as $contract) { |
||
| 17 | $msg = $this->verifyContract($event, $contract); |
||
| 18 | if ($msg !== null) { |
||
| 19 | $invalidContracts[$contract] = $msg; |
||
| 20 | } |
||
| 21 | } |
||
| 22 | if (count($invalidContracts) > 0) { |
||
| 23 | $this->fail(sprintf("The '%s' Output Event doesn't fulfill the following Contracts: %s", $event::class, json_encode($invalidContracts))); |
||
| 24 | } |
||
| 25 | return true; |
||
| 26 | } |
||
| 41 | } |