| Conditions | 7 |
| Paths | 6 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function include(Base $that): bool |
||
| 28 | { |
||
| 29 | if ($this->toString() === '\\') { |
||
| 30 | // Pattern likely '\\' will match with all className. |
||
| 31 | return true; |
||
| 32 | } elseif ($this->isSame($that)) { |
||
| 33 | return true; |
||
| 34 | } elseif (count($this->getFullyQualifiedNamespaceNameAsArray()) > count($this->getFullyQualifiedNamespaceNameAsArray())) { |
||
| 35 | return false; |
||
| 36 | } |
||
| 37 | |||
| 38 | $namesOfThat = $that->getFullyQualifiedNamespaceNameAsArray(); |
||
| 39 | foreach ($this->getFullyQualifiedNamespaceNameAsArray() as $index => $name) { |
||
| 40 | if (!isset($namesOfThat[$index]) || $namesOfThat[$index] !== $name) { |
||
| 41 | return false; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return true; |
||
| 46 | } |
||
| 67 |