| Conditions | 8 |
| Paths | 8 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 8 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | 14 | public function match(string $path): ?bool |
|
| 45 | { |
||
| 46 | 14 | $allNulls = true; |
|
| 47 | |||
| 48 | 14 | foreach ($this->matchers as $matcher) { |
|
| 49 | 14 | $match = $matcher->match($path); |
|
| 50 | |||
| 51 | 14 | if ($match === null) { |
|
| 52 | 6 | continue; |
|
| 53 | } |
||
| 54 | |||
| 55 | 12 | $allNulls = false; |
|
| 56 | |||
| 57 | 12 | if ($this->matchAny && $match) { |
|
| 58 | 4 | return true; |
|
| 59 | } |
||
| 60 | |||
| 61 | 9 | if (!$this->matchAny && !$match) { |
|
| 62 | 4 | return false; |
|
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 66 | 6 | return $allNulls ? null : !$this->matchAny; |
|
| 67 | } |
||
| 69 |