Passed
Pull Request — master (#335)
by Valentin
04:47 queued 38s
created
src/Prototype/src/NodeVisitors/ClassNode/LocateStatements.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,10 @@
 block discarded – undo
27 27
      */
28 28
     public function enterNode(Node $node)
29 29
     {
30
-        if ($node instanceof Node\Stmt\Use_) {
31
-            foreach ($node->uses as $use) {
30
+        if ($node instanceof Node\Stmt\Use_)
31
+        {
32
+            foreach ($node->uses as $use)
33
+            {
32 34
                 $this->imports[] = [
33 35
                     'name'  => implode('\\', $use->name->parts),
34 36
                     'alias' => $use->alias->name ?? null,
Please login to merge, or discard this patch.
src/Prototype/src/NodeVisitors/ClassNode/LocateVariables.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,16 +25,20 @@
 block discarded – undo
25 25
      */
26 26
     public function enterNode(Node $node)
27 27
     {
28
-        if ($node instanceof Node\Stmt\Class_) {
29
-            foreach ($node->stmts as $stmt) {
30
-                if ($stmt instanceof Node\Stmt\ClassMethod && $stmt->name === '__construct') {
28
+        if ($node instanceof Node\Stmt\Class_)
29
+        {
30
+            foreach ($node->stmts as $stmt)
31
+            {
32
+                if ($stmt instanceof Node\Stmt\ClassMethod && $stmt->name === '__construct')
33
+                {
31 34
                     return $stmt;
32 35
                 }
33 36
             }
34 37
             return NodeTraverser::DONT_TRAVERSE_CHILDREN;
35 38
         }
36 39
 
37
-        if ($node instanceof Node\Expr\Variable) {
40
+        if ($node instanceof Node\Expr\Variable)
41
+        {
38 42
             $this->vars[] = $node->name;
39 43
         }
40 44
 
Please login to merge, or discard this patch.