| Total Complexity | 7 | 
| Total Lines | 32 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 11 | final class CompositeEventHandler implements EventHandlerInterface | ||
| 12 | { | ||
| 13 | /** | ||
| 14 | * @var EventHandlerInterface[] | ||
| 15 | */ | ||
| 16 | private $eventHandlers; | ||
| 17 | |||
| 18 | public function __construct(EventHandlerInterface ...$eventHandlers) | ||
| 19 |     { | ||
| 20 | $this->eventHandlers = $eventHandlers; | ||
| 21 | } | ||
| 22 | |||
| 23 | public function supports(Event $event): bool | ||
| 24 |     { | ||
| 25 |         foreach ($this->eventHandlers as $eventHandler) { | ||
| 26 |             if ($eventHandler->supports($event)) { | ||
| 27 | return true; | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | return false; | ||
| 32 | } | ||
| 33 | |||
| 34 | public function handle(Event $event): PaginationParameterBag | ||
| 43 | } | ||
| 44 | } | ||
| 45 |