| Total Complexity | 3 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 19 | final class TraitVisitor extends NodeVisitorAbstract |
||
| 20 | { |
||
| 21 | 37 | public function __construct(private readonly TraitDefinitionBuilder $builder, private readonly Codebase $codebase) |
|
|
|
|||
| 22 | { |
||
| 23 | } |
||
| 24 | |||
| 25 | 29 | public function leaveNode(Node $node) |
|
| 26 | { |
||
| 27 | 29 | if ($node instanceof Trait_) { |
|
| 28 | 8 | $this->codebase->add($this->builder->build($node)); |
|
| 29 | } |
||
| 30 | 29 | return null; |
|
| 31 | } |
||
| 33 |