Completed
Push — master ( 944c2f...e363a6 )
by
unknown
01:38
created
src/Hal/Report/Html/Reporter.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
         $consolidated = new Consolidated($metrics);
42 42
 
43 43
         // history of builds
44
-        $today = (object)[
44
+        $today = (object) [
45 45
             'avg' => $consolidated->getAvg(),
46 46
             'sum' => $consolidated->getSum()
47 47
         ];
48
-        $files = glob($logDir . '/js/history-*.json');
48
+        $files = glob($logDir.'/js/history-*.json');
49 49
         $next = count($files) + 1;
50 50
         $history = [];
51 51
         natsort($files);
@@ -54,39 +54,39 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         // copy sources
57
-        if (!file_exists($logDir . '/js')) {
58
-            mkdir($logDir . '/js', 0755, true);
57
+        if (!file_exists($logDir.'/js')) {
58
+            mkdir($logDir.'/js', 0755, true);
59 59
         }
60
-        if (!file_exists($logDir . '/css')) {
61
-            mkdir($logDir . '/css', 0755, true);
60
+        if (!file_exists($logDir.'/css')) {
61
+            mkdir($logDir.'/css', 0755, true);
62 62
         }
63
-        if (!file_exists($logDir . '/images')) {
64
-            mkdir($logDir . '/images', 0755, true);
63
+        if (!file_exists($logDir.'/images')) {
64
+            mkdir($logDir.'/images', 0755, true);
65 65
         }
66
-        if (!file_exists($logDir . '/fonts')) {
67
-            mkdir($logDir . '/fonts', 0755, true);
66
+        if (!file_exists($logDir.'/fonts')) {
67
+            mkdir($logDir.'/fonts', 0755, true);
68 68
         }
69
-        recurse_copy(__DIR__ . '/template/js', $logDir . '/js');
70
-        recurse_copy(__DIR__ . '/template/css', $logDir . '/css');
71
-        recurse_copy(__DIR__ . '/template/images', $logDir . '/images');
72
-        recurse_copy(__DIR__ . '/template/fonts', $logDir . '/fonts');
69
+        recurse_copy(__DIR__.'/template/js', $logDir.'/js');
70
+        recurse_copy(__DIR__.'/template/css', $logDir.'/css');
71
+        recurse_copy(__DIR__.'/template/images', $logDir.'/images');
72
+        recurse_copy(__DIR__.'/template/fonts', $logDir.'/fonts');
73 73
 
74 74
         // render dynamic pages
75
-        $this->renderPage(__DIR__ . '/template/index.php', $logDir . '/index.html', $consolidated, $history);
76
-        $this->renderPage(__DIR__ . '/template/loc.php', $logDir . '/loc.html', $consolidated, $history);
77
-        $this->renderPage(__DIR__ . '/template/relations.php', $logDir . '/relations.html', $consolidated, $history);
78
-        $this->renderPage(__DIR__ . '/template/coupling.php', $logDir . '/coupling.html', $consolidated, $history);
79
-        $this->renderPage(__DIR__ . '/template/all.php', $logDir . '/all.html', $consolidated, $history);
80
-        $this->renderPage(__DIR__ . '/template/oop.php', $logDir . '/oop.html', $consolidated, $history);
81
-        $this->renderPage(__DIR__ . '/template/complexity.php', $logDir . '/complexity.html', $consolidated, $history);
82
-        $this->renderPage(__DIR__ . '/template/panel.php', $logDir . '/panel.html', $consolidated, $history);
83
-        $this->renderPage(__DIR__ . '/template/violations.php', $logDir . '/violations.html', $consolidated, $history);
84
-        $this->renderPage(__DIR__ . '/template/packages.php', $logDir . '/packages.html', $consolidated, $history);
85
-        $this->renderPage(__DIR__ . '/template/package_relations.php', $logDir . '/package_relations.html', $consolidated, $history);
75
+        $this->renderPage(__DIR__.'/template/index.php', $logDir.'/index.html', $consolidated, $history);
76
+        $this->renderPage(__DIR__.'/template/loc.php', $logDir.'/loc.html', $consolidated, $history);
77
+        $this->renderPage(__DIR__.'/template/relations.php', $logDir.'/relations.html', $consolidated, $history);
78
+        $this->renderPage(__DIR__.'/template/coupling.php', $logDir.'/coupling.html', $consolidated, $history);
79
+        $this->renderPage(__DIR__.'/template/all.php', $logDir.'/all.html', $consolidated, $history);
80
+        $this->renderPage(__DIR__.'/template/oop.php', $logDir.'/oop.html', $consolidated, $history);
81
+        $this->renderPage(__DIR__.'/template/complexity.php', $logDir.'/complexity.html', $consolidated, $history);
82
+        $this->renderPage(__DIR__.'/template/panel.php', $logDir.'/panel.html', $consolidated, $history);
83
+        $this->renderPage(__DIR__.'/template/violations.php', $logDir.'/violations.html', $consolidated, $history);
84
+        $this->renderPage(__DIR__.'/template/packages.php', $logDir.'/packages.html', $consolidated, $history);
85
+        $this->renderPage(__DIR__.'/template/package_relations.php', $logDir.'/package_relations.html', $consolidated, $history);
86 86
         if ($this->config->has('git')) {
87
-            $this->renderPage(__DIR__ . '/template/git.php', $logDir . '/git.html', $consolidated, $history);
87
+            $this->renderPage(__DIR__.'/template/git.php', $logDir.'/git.html', $consolidated, $history);
88 88
         }
89
-        $this->renderPage(__DIR__ . '/template/junit.php', $logDir . '/junit.html', $consolidated, $history);
89
+        $this->renderPage(__DIR__.'/template/junit.php', $logDir.'/junit.html', $consolidated, $history);
90 90
 
91 91
         // js data
92 92
         file_put_contents(
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
 
101 101
         // json data
102 102
         file_put_contents(
103
-            $logDir . '/js/classes.js',
104
-            'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
103
+            $logDir.'/js/classes.js',
104
+            'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
105 105
         );
106 106
 
107 107
         $this->output->writeln(sprintf('HTML report generated in "%s" directory', $logDir));
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
         $diff = $newValue - $oldValue;
170 170
         if ($diff > 0) {
171
-            $diff = '+' . $diff;
171
+            $diff = '+'.$diff;
172 172
         }
173 173
 
174 174
         $goodOrBad = 'neutral';
Please login to merge, or discard this patch.
src/Hal/Component/Ast/NodeTraverser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@
 block discarded – undo
9 9
 namespace Hal\Component\Ast;
10 10
 
11 11
 if (PHP_VERSION_ID >= 70000) {
12
-    class_alias(Php7NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
12
+    class_alias(Php7NodeTraverser::class, __NAMESPACE__.'\\ActualNodeTraverser');
13 13
 } else {
14
-    class_alias(Php5NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
14
+    class_alias(Php5NodeTraverser::class, __NAMESPACE__.'\\ActualNodeTraverser');
15 15
 }
16 16
 
17 17
 /**
Please login to merge, or discard this patch.
src/Hal/Metric/Helper/RoleOfMethodDetector.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 'PhpParser\\Node\\Param',
79 79
                 'PhpParser\\Node\\Expr\\Variable',
80 80
                 'PhpParser\\Node\\Name',
81
-            ],[
81
+            ], [
82 82
                 // function setOk(?bool $ok): self { $this->isOk = $ok; return $this; }
83 83
                 'PhpParser\\Node\\Stmt\\ClassMethod',
84 84
                 'PhpParser\\Node\\Stmt\\Expression',
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function detects($node)
100 100
     {
101
-        if (! $node instanceof ClassMethod) {
101
+        if (!$node instanceof ClassMethod) {
102 102
             return null;
103 103
         }
104 104
 
105 105
         // build a fingerprint of the given method
106 106
         $fingerprintOfMethod = [];
107
-        iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) {
107
+        iterate_over_node($node, function($node) use (&$fingerprintOfMethod) {
108 108
             // avoid identifier (php-parser:^4)
109 109
             if ($node instanceof Identifier) {
110 110
                 return;
Please login to merge, or discard this patch.