Yaffs site version 1.1
[yaffs-website] / vendor / psy / psysh / src / Psy / CodeCleaner / CalledClassPass.php
index 5204898c7cbbfb2a83d7bc499816dc258e535046..4a0f7ea8ef2d9ca3a746c642ac0391a2a305d78b 100644 (file)
@@ -15,8 +15,8 @@ use PhpParser\Node;
 use PhpParser\Node\Expr\ConstFetch;
 use PhpParser\Node\Expr\FuncCall;
 use PhpParser\Node\Name;
-use PhpParser\Node\Stmt\Class_ as ClassStmt;
-use PhpParser\Node\Stmt\Trait_ as TraitStmt;
+use PhpParser\Node\Stmt\Class_;
+use PhpParser\Node\Stmt\Trait_;
 use Psy\Exception\ErrorException;
 
 /**
@@ -42,13 +42,13 @@ class CalledClassPass extends CodeCleanerPass
      */
     public function enterNode(Node $node)
     {
-        if ($node instanceof ClassStmt || $node instanceof TraitStmt) {
+        if ($node instanceof Class_ || $node instanceof Trait_) {
             $this->inClass = true;
         } elseif ($node instanceof FuncCall && !$this->inClass) {
             // We'll give any args at all (besides null) a pass.
             // Technically we should be checking whether the args are objects, but this will do for now.
             //
-            // TODO: switch this to actually validate args when we get context-aware code cleaner passes.
+            // @todo switch this to actually validate args when we get context-aware code cleaner passes.
             if (!empty($node->args) && !$this->isNull($node->args[0])) {
                 return;
             }
@@ -71,7 +71,7 @@ class CalledClassPass extends CodeCleanerPass
      */
     public function leaveNode(Node $node)
     {
-        if ($node instanceof ClassStmt) {
+        if ($node instanceof Class_) {
             $this->inClass = false;
         }
     }