Completed
Pull Request — master (#347)
by Oskar
04:52
created
src/Hal/Component/Ast/NodeTraverser.php 2 patches
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * @param array $nodes
47
-     * @param array|NodeVisitor[] $visitors
47
+     * @param NodeVisitor[] $visitors
48 48
      * @return array
49 49
      */
50 50
     public function traverseArray(array $nodes, array $visitors) {
@@ -101,6 +101,9 @@  discard block
 block discarded – undo
101 101
         /** @var Traverser */
102 102
         private $traverser;
103 103
 
104
+        /**
105
+         * @param \Closure $stopCondition
106
+         */
104 107
         public function __construct($cloneNodes = false, $stopCondition = null)
105 108
         {
106 109
             parent::__construct();
@@ -123,6 +126,9 @@  discard block
 block discarded – undo
123 126
         /** @var Traverser */
124 127
         private $traverser;
125 128
 
129
+        /**
130
+         * @param \Closure $stopCondition
131
+         */
126 132
         public function __construct($cloneNodes = false, $stopCondition = null)
127 133
         {
128 134
             parent::__construct();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
 
29 29
     public function __construct(Mother $traverser, $stopCondition = null)
30 30
     {
31
-        if(null === $stopCondition) {
31
+        if (null === $stopCondition) {
32 32
             $stopCondition = function($node) {
33
-                if($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) {
33
+                if ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) {
34 34
                     return false;
35 35
                 }
36 36
 
Please login to merge, or discard this patch.
src/Hal/Metric/Helper/RoleOfMethodDetector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,13 +81,13 @@
 block discarded – undo
81 81
      */
82 82
     public function detects($node)
83 83
     {
84
-        if (! $node instanceof ClassMethod) {
84
+        if (!$node instanceof ClassMethod) {
85 85
             return null;
86 86
         }
87 87
 
88 88
         // build a fingerprint of the given method
89 89
         $fingerprintOfMethod = [];
90
-        iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) {
90
+        iterate_over_node($node, function($node) use (&$fingerprintOfMethod) {
91 91
 
92 92
             // avoid identifier (php-parser:^4)
93 93
             if ($node instanceof Identifier) {
Please login to merge, or discard this patch.