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 | 3 | public function matches(array $conditions, ServerRequestInterface $request) |
|
15 | { |
||
16 | 3 | foreach ($conditions as $condition) { |
|
17 | 3 | $inputSourceData = $this->getInputSource($condition); |
|
18 | 3 | $matcherData = $this->getMatcher($condition); |
|
19 | |||
20 | 3 | $inputValue = $inputSourceData->getInstance()->getValue( |
|
21 | 3 | $request, |
|
22 | 3 | $inputSourceData->getArgument() |
|
23 | 3 | ); |
|
24 | |||
25 | 3 | if (!$matcherData->getInstance()->match($inputValue, $matcherData->getArgument())) { |
|
26 | 2 | return false; |
|
27 | } |
||
28 | 1 | } |
|
29 | 1 | return true; |
|
30 | } |
||
31 | } |
||
32 |