| Conditions | 7 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 7 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 5 | public function matches($other): bool |
|
| 27 | { |
||
| 28 | 5 | if (! \is_array($other)) { |
|
| 29 | 1 | return false; |
|
| 30 | } |
||
| 31 | |||
| 32 | 4 | foreach ($other as $field) { |
|
| 33 | 4 | if ($this->allowPanels && $field instanceof Panel) { |
|
| 34 | 2 | if (! $this->matches($field->data)) { |
|
| 35 | 2 | return false; |
|
| 36 | } |
||
| 37 | 4 | } elseif (! $field instanceof Field) { |
|
| 38 | 4 | return false; |
|
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | 3 | return true; |
|
| 43 | } |
||
| 45 |