Conditions | 4 |
Paths | 2 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | protected function needValidate(GetResponseEvent $event): bool |
||
35 | { |
||
36 | $return = false; |
||
37 | |||
38 | if ($event->getRequestType() === HttpKernelInterface::MASTER_REQUEST) { |
||
39 | $return = true; |
||
40 | $urlParts = parse_url($event->getRequest()->getUri()); |
||
41 | foreach ($this->disabledUrls as $disabledUrl) { |
||
42 | if (substr($urlParts['path'], 0, strlen($disabledUrl)) === $disabledUrl) { |
||
43 | $return = false; |
||
44 | continue; |
||
45 | } |
||
46 | } |
||
47 | } |
||
48 | |||
49 | return $return; |
||
50 | } |
||
51 | } |
||
52 |