|
11 | 11 |
|
12 | 12 | use Magento\SemanticVersionChecker\Helper\Node as NodeHelper;
|
13 | 13 | use PhpParser\Node;
|
14 |
| -use PhpParser\Node\Stmt\Enum_ as EnumNode; |
15 | 14 | use PhpParser\Node\Stmt\Class_ as ClassNode;
|
16 | 15 | use PhpParser\Node\Stmt\ClassLike;
|
17 | 16 | use PhpParser\Node\Stmt\ClassMethod;
|
|
23 | 22 | use PhpParser\NodeVisitorAbstract;
|
24 | 23 |
|
25 | 24 | /**
|
26 |
| - * Implements a visitor for `class`, `interface`, `trait` and `enum` nodes that generates a dependency graph. |
| 25 | + * Implements a visitor for `class`, `interface` and `trait` nodes that generates a dependency graph. |
27 | 26 | */
|
28 | 27 | class DependencyInspectionVisitor extends NodeVisitorAbstract
|
29 | 28 | {
|
@@ -95,8 +94,8 @@ public function enterNode(Node $node)
|
95 | 94 | }
|
96 | 95 |
|
97 | 96 | /**
|
98 |
| - * Handles Class, Interface, Traits and Enum nodes. Sets currentClassLike entity and will populate extends, |
99 |
| - * implements, and API information |
| 97 | + * Handles Class, Interface, and Traits nodes. Sets currentClassLike entity and will populate extends, implements, |
| 98 | + * and API information |
100 | 99 | *
|
101 | 100 | * @param ClassLike $node
|
102 | 101 | * @return int|null
|
@@ -136,9 +135,6 @@ private function handleClassLike(ClassLike $node)
|
136 | 135 | case $node instanceof TraitNode:
|
137 | 136 | $this->currentClassLike = $this->dependencyGraph->findOrCreateTrait((string)$namespacedName);
|
138 | 137 | break;
|
139 |
| - case $node instanceof EnumNode: |
140 |
| - $this->currentClassLike = $this->dependencyGraph->findOrCreateEnum((string)$namespacedName); |
141 |
| - break; |
142 | 138 | }
|
143 | 139 | $this->currentClassLike->setIsApi($this->nodeHelper->isApiNode($node));
|
144 | 140 | return null;
|
|
0 commit comments