| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 3 | public function getValidator(Request $request) |
|
| 26 | { |
||
| 27 | 3 | foreach ($this->map as $validatorId => $requestMatcher) { |
|
| 28 | 2 | if (null === $requestMatcher || $requestMatcher->matches($request)) { |
|
| 29 | 2 | return $this->container->get($validatorId); |
|
| 30 | } |
||
| 31 | 3 | } |
|
| 32 | |||
| 33 | 1 | throw new NoValidatorException(); |
|
| 34 | } |
||
| 35 | } |
||
| 36 |