Conditions | 6 |
Paths | 5 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function isSameModule(?string $namespaceA, ?string $namespaceB): bool |
||
20 | { |
||
21 | if ($namespaceA === $namespaceB) { |
||
22 | return true; |
||
23 | } |
||
24 | |||
25 | if ($namespaceA === null || $namespaceB === null) { |
||
26 | return false; |
||
27 | } |
||
28 | |||
29 | if (!$this->isModulesNamespace($namespaceA)) { |
||
30 | return false; |
||
31 | } |
||
32 | |||
33 | if (!$this->isModulesNamespace($namespaceB)) { |
||
34 | return false; |
||
35 | } |
||
36 | |||
37 | $moduleA = $this->getModule($namespaceA); |
||
38 | $moduleB = $this->getModule($namespaceB); |
||
39 | |||
40 | return ($moduleA === $moduleB); |
||
41 | } |
||
55 |