| Total Complexity | 6 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | final class ResourceControllerEventHandler implements EventHandlerInterface |
||
| 15 | { |
||
| 16 | public function supports(Event $event): bool |
||
| 17 | { |
||
| 18 | if (!$event instanceof ResourceControllerEvent) { |
||
| 19 | return false; |
||
| 20 | } |
||
| 21 | |||
| 22 | $resourceGridView = $event->getSubject(); |
||
| 23 | if (!$resourceGridView instanceof ResourceGridView) { |
||
| 24 | return false; |
||
| 25 | } |
||
| 26 | |||
| 27 | $data = $resourceGridView->getData(); |
||
| 28 | if (!$data instanceof Pagerfanta) { |
||
| 29 | return false; |
||
| 30 | } |
||
| 31 | |||
| 32 | return true; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param ResourceControllerEvent $event |
||
| 37 | * |
||
| 38 | * @return PaginationParameterBag |
||
| 39 | */ |
||
| 40 | public function handle(Event $event): PaginationParameterBag |
||
| 53 | } |
||
| 54 | } |
||
| 55 |