| Conditions | 5 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | private function isCurrentNamespaceInsideAPublicNamespace(string $current, string $publicEntry): bool |
||
| 33 | { |
||
| 34 | |||
| 35 | if ($current === $publicEntry) { |
||
| 36 | return true; |
||
| 37 | } |
||
| 38 | |||
| 39 | $blockEntry = \explode('\\', $publicEntry); |
||
| 40 | $blockCurrent = \explode('\\', $current); |
||
| 41 | |||
| 42 | foreach ($blockCurrent as $tokenCurrent) { |
||
| 43 | if ($tokenCurrent === '') { |
||
| 44 | continue; |
||
| 45 | } |
||
| 46 | |||
| 47 | if (!\in_array($tokenCurrent, $blockEntry, true)) { |
||
| 48 | return false; |
||
| 49 | } |
||
| 50 | } |
||
| 51 | |||
| 52 | return \true; |
||
| 53 | } |
||
| 55 |