Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | public function getFqnFromContext(string $identifier): string |
||
34 | { |
||
35 | if (($identifier[0] ?? '') === '\\') { |
||
36 | if ($identifier === '\\') { |
||
37 | throw new \LogicException('invalid identifier'); |
||
38 | } |
||
39 | return substr($identifier, 1); |
||
40 | } |
||
41 | if (isset($this->aliases[$identifier])) { |
||
42 | return $this->aliases[$identifier]; |
||
43 | } |
||
44 | return "{$this->namespace}\\{$identifier}"; |
||
45 | } |
||
47 |