| 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 |
||
| 49 | 14 | public function match(string $path): ?bool |
|
| 50 | { |
||
| 51 | 14 | $allNulls = true; |
|
| 52 | |||
| 53 | 14 | foreach ($this->matchers as $matcher) { |
|
| 54 | 14 | $match = $matcher->match($path); |
|
| 55 | |||
| 56 | 14 | if ($match === null) { |
|
| 57 | 6 | continue; |
|
| 58 | } |
||
| 59 | |||
| 60 | 12 | $allNulls = false; |
|
| 61 | |||
| 62 | 12 | if ($this->matchAny && $match) { |
|
| 63 | 4 | return true; |
|
| 64 | } |
||
| 65 | |||
| 66 | 9 | if (!$this->matchAny && !$match) { |
|
| 67 | 4 | return false; |
|
| 68 | } |
||
| 69 | } |
||
| 70 | |||
| 71 | 6 | return $allNulls ? null : !$this->matchAny; |
|
| 72 | } |
||
| 74 |