Completed
Push — master ( 1eeadd...6147f0 )
by personal
28s queued 11s
created
src/Hal/Metric/Class_/Structural/LcomVisitor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 
43 43
             foreach ($node->stmts as $stmt) {
44 44
                 if ($stmt instanceof Stmt\ClassMethod) {
45
-                    if (!$graph->has($stmt->name . '()')) {
46
-                        $graph->insert(new TreeNode($stmt->name . '()'));
45
+                    if (!$graph->has($stmt->name.'()')) {
46
+                        $graph->insert(new TreeNode($stmt->name.'()'));
47 47
                     }
48
-                    $from = $graph->get($stmt->name . '()');
48
+                    $from = $graph->get($stmt->name.'()');
49 49
 
50
-                    \iterate_over_node($stmt, function ($node) use ($from, &$graph) {
50
+                    \iterate_over_node($stmt, function($node) use ($from, &$graph) {
51 51
                         if ($node instanceof Node\Expr\PropertyFetch && isset($node->var->name) && $node->var->name == 'this') {
52 52
                             $name = getNameOfNode($node);
53 53
                             // use of attribute $this->xxx;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                             if (!$node->var instanceof Node\Expr\New_ && isset($node->var->name) && getNameOfNode($node->var) === 'this') {
64 64
                                 // use of method call $this->xxx();
65 65
                                 // use of attribute $this->xxx;
66
-                                $name = getNameOfNode($node->name) . '()';
66
+                                $name = getNameOfNode($node->name).'()';
67 67
                                 if (!$graph->has($name)) {
68 68
                                     $graph->insert(new TreeNode($name));
69 69
                                 }
Please login to merge, or discard this patch.
src/Hal/Metric/Package/PackageCollectingVisitor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public function enterNode(Node $node)
28 28
     {
29 29
         if ($node instanceof Namespace_) {
30
-            $this->namespace = (string)$node->name;
30
+            $this->namespace = (string) $node->name;
31 31
         }
32 32
     }
33 33
 
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
                 $package = $matches[1];
43 43
             }
44 44
             if (preg_match('/^\s*\* @subpackage (.*)/m', $docBlockText, $matches)) {
45
-                $package = $package . '\\' . $matches[1];
45
+                $package = $package.'\\'.$matches[1];
46 46
             }
47 47
 
48
-            $packageName = $package . '\\';
49
-            if (! $packageMetric = $this->metrics->get($packageName)) {
48
+            $packageName = $package.'\\';
49
+            if (!$packageMetric = $this->metrics->get($packageName)) {
50 50
                 $packageMetric = new PackageMetric($packageName);
51 51
                 $this->metrics->attach($packageMetric);
52 52
             }
53 53
             /* @var PackageMetric $packageMetric */
54
-            $elementName = isset($node->namespacedName) ? $node->namespacedName : 'anonymous@' . spl_object_hash($node);
55
-            $elementName = (string)$elementName;
54
+            $elementName = isset($node->namespacedName) ? $node->namespacedName : 'anonymous@'.spl_object_hash($node);
55
+            $elementName = (string) $elementName;
56 56
             $packageMetric->addClass($elementName);
57 57
 
58 58
             $this->metrics->get($elementName)->set('package', $packageName);
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
@@ -80,13 +80,13 @@
 block discarded – undo
80 80
      */
81 81
     public function detects($node)
82 82
     {
83
-        if (! $node instanceof ClassMethod) {
83
+        if (!$node instanceof ClassMethod) {
84 84
             return null;
85 85
         }
86 86
 
87 87
         // build a fingerprint of the given method
88 88
         $fingerprintOfMethod = [];
89
-        iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) {
89
+        iterate_over_node($node, function($node) use (&$fingerprintOfMethod) {
90 90
             // avoid identifier (php-parser:^4)
91 91
             if ($node instanceof Identifier) {
92 92
                 return;
Please login to merge, or discard this patch.
src/Hal/Metric/PackageMetric.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function addClass($name)
19 19
     {
20 20
         $elements = $this->get('classes');
21
-        $elements[] = (string)$name;
21
+        $elements[] = (string) $name;
22 22
         $this->set('classes', $elements);
23 23
     }
24 24
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function setAbstraction($abstraction)
27 27
     {
28 28
         if ($abstraction !== null) {
29
-            $abstraction = (float)$abstraction;
29
+            $abstraction = (float) $abstraction;
30 30
         }
31 31
         $this->set('abstraction', $abstraction);
32 32
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function setInstability($instability)
42 42
     {
43 43
         if ($instability !== null) {
44
-            $instability = (float)$instability;
44
+            $instability = (float) $instability;
45 45
         }
46 46
         $this->set('instability', $instability);
47 47
     }
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
         }
64 64
         $classDependencies = $this->getOutgoingClassDependencies();
65 65
         $packageDependencies = $this->getOutgoingPackageDependencies();
66
-        if (! in_array($className, $classDependencies)) {
66
+        if (!in_array($className, $classDependencies)) {
67 67
             $classDependencies[] = $className;
68 68
             $this->set('outgoing_class_dependencies', $classDependencies);
69 69
         }
70
-        if (! in_array($packageName, $packageDependencies)) {
70
+        if (!in_array($packageName, $packageDependencies)) {
71 71
             $packageDependencies[] = $packageName;
72 72
             $this->set('outgoing_package_dependencies', $packageDependencies);
73 73
         }
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
         }
97 97
         $classDependencies = $this->getIncomingClassDependencies();
98 98
         $packageDependencies = $this->getIncomingPackageDependencies();
99
-        if (! in_array($className, $classDependencies)) {
99
+        if (!in_array($className, $classDependencies)) {
100 100
             $classDependencies[] = $className;
101 101
             $this->set('incoming_class_dependencies', $classDependencies);
102 102
         }
103
-        if (! in_array($packageName, $packageDependencies)) {
103
+        if (!in_array($packageName, $packageDependencies)) {
104 104
             $packageDependencies[] = $packageName;
105 105
             $this->set('incoming_package_dependencies', $packageDependencies);
106 106
         }
Please login to merge, or discard this patch.