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