Skip to content

Commit

Permalink
Fix namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
NaokiTsuchiya committed Feb 21, 2022
1 parent 833f6bd commit 151e3b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
namespace Ray\Aop;

use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\Node\Stmt\Use_;
use PhpParser\Node\Stmt\UseUse;
use PhpParser\NodeVisitorAbstract;
use Ray\Aop\Exception\MultipleClassInOneFileException;

Expand Down Expand Up @@ -92,7 +94,7 @@ private function enterNodeClass(Node $node)
public function addUses(array $annotations): void
{
foreach ($annotations as $annotation) {
$this->addUse(new Use_([new Node\Stmt\UseUse(new Node\Name(get_class($annotation)))]));
$this->addUse(new Use_([new UseUse(new Name(get_class($annotation)))]));
}
}

Expand Down

0 comments on commit 151e3b9

Please sign in to comment.