Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| NamespaceSymbol | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
| isGlobal | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| isChangedNamespace | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** |
| 6 | * Should this be a {@see \PhpParser\Node\Stmt\Namespace_} instead? |
| 7 | */ |
| 8 | |
| 9 | namespace BrianHenryIE\Strauss\Types; |
| 10 | |
| 11 | class NamespaceSymbol extends DiscoveredSymbol |
| 12 | { |
| 13 | public function isGlobal(): bool |
| 14 | { |
| 15 | return $this->fqdnOriginalSymbol === '\\'; |
| 16 | } |
| 17 | |
| 18 | public function isChangedNamespace(): bool |
| 19 | { |
| 20 | return $this->getLocalReplacement() !== $this->getOriginalFqdnName(); |
| 21 | } |
| 22 | } |