| Conditions | 7 |
| Paths | 8 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 7 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 1 | public function enterNode(Node $node) : int|Node|null |
|
| 25 | { |
||
| 26 | 1 | if ($node instanceof Namespace_) { |
|
| 27 | 1 | $this->namespace = (string) $node->name; |
|
| 28 | } |
||
| 29 | |||
| 30 | 1 | if ($node instanceof Class_ || $node instanceof Trait_ || $node instanceof Interface_) { |
|
| 31 | 1 | $this->objectName = (string) $node->name; |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | if ($this->namespace !== null && $this->objectName !== null) { |
|
| 35 | /** @var class-string $fqcn */ |
||
| 36 | 1 | $fqcn = sprintf('%s\%s', $this->namespace, $this->objectName); |
|
| 37 | |||
| 38 | 1 | $this->fqcn = $fqcn; |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | return parent::enterNode($node); |
|
| 42 | } |
||
| 52 |