Conditions | 4 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | protected function needValidate(GetResponseEvent $event) |
||
42 | { |
||
43 | $return = false; |
||
44 | |||
45 | if ($event->getRequestType() === HttpKernelInterface::MASTER_REQUEST) { |
||
46 | $return = true; |
||
47 | $urlParts = parse_url($event->getRequest()->getUri()); |
||
48 | foreach ($this->disabledUrls as $disabledUrl) { |
||
49 | if (substr($urlParts['path'], 0, strlen($disabledUrl)) === $disabledUrl) { |
||
50 | $return = false; |
||
51 | continue; |
||
52 | } |
||
53 | } |
||
54 | } |
||
55 | |||
56 | return $return; |
||
57 | } |
||
58 | } |
||
59 |