| Conditions | 8 |
| Paths | 8 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 8 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 53 | 14 | public function match(string $path): ?bool |
|
| 54 | { |
||
| 55 | 14 | $allNulls = true; |
|
| 56 | |||
| 57 | /** @var PathMatcherInterface $matcher */ |
||
| 58 | 14 | foreach ($this->matchers as $matcher) { |
|
| 59 | 14 | $match = $matcher->match($path); |
|
| 60 | |||
| 61 | 14 | if ($match === null) { |
|
| 62 | 6 | continue; |
|
| 63 | } |
||
| 64 | |||
| 65 | 12 | $allNulls = false; |
|
| 66 | |||
| 67 | 12 | if ($this->matchAny && $match) { |
|
| 68 | 4 | return true; |
|
| 69 | } |
||
| 70 | |||
| 71 | 9 | if (!$this->matchAny && !$match) { |
|
| 72 | 4 | return false; |
|
| 73 | } |
||
| 74 | } |
||
| 75 | |||
| 76 | 6 | return $allNulls ? null : !$this->matchAny; |
|
| 77 | } |
||
| 79 |