| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | 2 | public function matches(array $conditions, ServerRequestInterface $request) |
|
| 15 | { |
||
| 16 | 2 | foreach ($conditions as $condition) { |
|
| 17 | 2 | $inputSourceData = $this->getInputSource($condition); |
|
| 18 | 2 | $matcherData = $this->getMatcher($condition); |
|
| 19 | |||
| 20 | 2 | $inputValue = $inputSourceData->getInstance()->getValue( |
|
| 21 | 2 | $request, |
|
| 22 | 2 | $inputSourceData->getArgument() |
|
| 23 | 2 | ); |
|
| 24 | |||
| 25 | 2 | if ($matcherData->getInstance()->match($inputValue, $matcherData->getArgument())) { |
|
| 26 | 1 | return true; |
|
| 27 | } |
||
| 28 | 1 | } |
|
| 29 | 1 | return false; |
|
| 30 | } |
||
| 31 | } |
||
| 32 |