mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-01 19:27:39 +08:00
Optimized the code of Hyperf\Watcher\Ast\RewriteClassNameVisitor::leaveNode
.
This commit is contained in:
parent
1bf6f9cd0c
commit
db8ce5901e
@ -3,6 +3,7 @@
|
||||
## Optimized
|
||||
|
||||
- [#7082](https://github.com/hyperf/hyperf/pull/7082) Optimized the code of `Hyperf\Database\Query\Grammars\Grammar::compileUpdate`.
|
||||
- [#7084](https://github.com/hyperf/hyperf/pull/7084) Optimized the code of `Hyperf\Watcher\Ast\RewriteClassNameVisitor::leaveNode`.
|
||||
|
||||
# v3.1.42 - 2024-09-25
|
||||
|
||||
|
@ -27,7 +27,7 @@ class RewriteClassNameVisitor extends NodeVisitorAbstract
|
||||
case $node instanceof Node\Stmt\Namespace_:
|
||||
$this->metadata->namespace = $node->name->toCodeString();
|
||||
return $node;
|
||||
case $node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Enum_:
|
||||
case ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Enum_) && $node->name:
|
||||
$className = $node->name->name;
|
||||
$this->metadata->className = $className;
|
||||
return $node;
|
||||
|
Loading…
Reference in New Issue
Block a user