Skip to content

Commit e95490f

Browse files
author
HuangXi0820
authored
Fixed bug that the enum mode cannot work when using hyperf/constants. (#6728)
1 parent d9f70a0 commit e95490f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Ast/RewriteClassNameVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function leaveNode(Node $node)
2727
case $node instanceof Node\Stmt\Namespace_:
2828
$this->metadata->namespace = $node->name->toCodeString();
2929
return $node;
30-
case $node instanceof Node\Stmt\Class_:
30+
case $node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Enum_:
3131
$className = $node->name->name;
3232
$this->metadata->className = $className;
3333
return $node;

0 commit comments

Comments
 (0)