Completed
Push — master ( 66eee1...0ca2b5 )
by
unknown
24s queued 19s
created
src/Hal/Component/Output/CliOutput.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function writeln($message)
27 27
     {
28
-        $this->write(PHP_EOL . $message);
28
+        $this->write(PHP_EOL.$message);
29 29
         return $this;
30 30
     }
31 31
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                     break;
54 54
             }
55 55
 
56
-            $message = $color . $message . "\033[0m";
56
+            $message = $color.$message."\033[0m";
57 57
         }
58 58
 
59 59
         $this->quietMode || file_put_contents('php://stdout', $message);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             return
97 97
                 0 >= version_compare(
98 98
                     '10.0.10586',
99
-                    PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD
99
+                    PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD
100 100
                 )
101 101
                 || false !== getenv('ANSICON')
102 102
                 || 'ON' === getenv('ConEmuANSI')
Please login to merge, or discard this patch.
src/Hal/Application/Config/File/ConfigFileReaderJson.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     private function resolvePath($path)
46 46
     {
47 47
         if (DIRECTORY_SEPARATOR !== $path[0]) {
48
-            $path = dirname($this->filename) . DIRECTORY_SEPARATOR . $path;
48
+            $path = dirname($this->filename).DIRECTORY_SEPARATOR.$path;
49 49
         }
50 50
 
51 51
         return $path;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
         // Composer
80 80
         if (array_key_exists('composer', $jsonData)) {
81
-            $config->set('composer', (bool)$jsonData['composer']);
81
+            $config->set('composer', (bool) $jsonData['composer']);
82 82
         }
83 83
 
84 84
         // Search
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         if (isset($jsonData['report']) && is_array($jsonData['report'])) {
112 112
             foreach ($jsonData['report'] as $reportType => $path) {
113 113
                 $path = $this->resolvePath($path);
114
-                $config->set('report-' . $reportType, $path);
114
+                $config->set('report-'.$reportType, $path);
115 115
             }
116 116
         }
117 117
     }
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -59,21 +59,21 @@  discard block
 block discarded – undo
59 59
             // extends
60 60
             if (isset($node->extends)) {
61 61
                 if (is_array($node->extends)) {
62
-                    foreach ((array)$node->extends as $interface) {
63
-                        $this->pushToDependencies($dependencies, (string)$interface);
64
-                        array_push($parents, (string)$interface);
62
+                    foreach ((array) $node->extends as $interface) {
63
+                        $this->pushToDependencies($dependencies, (string) $interface);
64
+                        array_push($parents, (string) $interface);
65 65
                     }
66 66
                 } else {
67
-                    $this->pushToDependencies($dependencies, (string)$node->extends);
68
-                    array_push($parents, (string)$node->extends);
67
+                    $this->pushToDependencies($dependencies, (string) $node->extends);
68
+                    array_push($parents, (string) $node->extends);
69 69
                 }
70 70
             }
71 71
 
72 72
             // implements
73 73
             if (isset($node->implements)) {
74 74
                 foreach ($node->implements as $interface) {
75
-                    $this->pushToDependencies($dependencies, (string)$interface);
76
-                    array_push($interfaces, (string)$interface);
75
+                    $this->pushToDependencies($dependencies, (string) $interface);
76
+                    array_push($interfaces, (string) $interface);
77 77
                 }
78 78
             }
79 79
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                     // return
83 83
                     if (isset($stmt->returnType)) {
84 84
                         if ($stmt->returnType instanceof Node\Name\FullyQualified) {
85
-                            $this->pushToDependencies($dependencies, (string)$stmt->returnType);
85
+                            $this->pushToDependencies($dependencies, (string) $stmt->returnType);
86 86
                         }
87 87
                     }
88 88
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
                     foreach ($stmt->params as $param) {
91 91
                         if ($param->type) {
92 92
                             if ($param->type instanceof Node\Name\FullyQualified) {
93
-                                $this->pushToDependencies($dependencies, (string)$param->type);
93
+                                $this->pushToDependencies($dependencies, (string) $param->type);
94 94
                             }
95 95
                         }
96 96
                     }
97 97
 
98 98
                     // instantiations, static calls
99
-                    \iterate_over_node($stmt, function ($node) use (&$dependencies) {
99
+                    \iterate_over_node($stmt, function($node) use (&$dependencies) {
100 100
                         switch (true) {
101 101
                             case $node instanceof Node\Expr\New_:
102 102
                                 // new MyClass
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
                         foreach ($matches[1] as $check) {
116 116
                             foreach ($this->uses as $use) {
117 117
                                 if (method_exists($use, 'getAlias')) {
118
-                                    if (((string)$use->getAlias()) === $check) {
119
-                                        $this->pushToDependencies($dependencies, (string)($use->name));
118
+                                    if (((string) $use->getAlias()) === $check) {
119
+                                        $this->pushToDependencies($dependencies, (string) ($use->name));
120 120
                                     }
121 121
                                     continue;
122 122
                                 }
123 123
                                 if ($use->alias === $check) {
124
-                                    $this->pushToDependencies($dependencies, (string)($use->name));
124
+                                    $this->pushToDependencies($dependencies, (string) ($use->name));
125 125
                                 }
126 126
                             }
127 127
                         }
@@ -141,6 +141,6 @@  discard block
 block discarded – undo
141 141
         if ('self' === $lowercase || 'parent' === $lowercase) {
142 142
             return;
143 143
         }
144
-        array_push($dependencies, (string)$dependency);
144
+        array_push($dependencies, (string) $dependency);
145 145
     }
146 146
 }
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Structural/LcomVisitor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
                         continue;
53 53
                     }
54 54
 
55
-                    if (!$graph->has($stmt->name . '()')) {
56
-                        $graph->insert(new TreeNode($stmt->name . '()'));
55
+                    if (!$graph->has($stmt->name.'()')) {
56
+                        $graph->insert(new TreeNode($stmt->name.'()'));
57 57
                     }
58
-                    $from = $graph->get($stmt->name . '()');
58
+                    $from = $graph->get($stmt->name.'()');
59 59
 
60
-                    \iterate_over_node($stmt, function ($node) use ($from, &$graph) {
60
+                    \iterate_over_node($stmt, function($node) use ($from, &$graph) {
61 61
                         if ($node instanceof Node\Expr\PropertyFetch && isset($node->var->name) && $node->var->name == 'this') {
62 62
                             $name = getNameOfNode($node);
63 63
                             // use of attribute $this->xxx;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                             if (!$node->var instanceof Node\Expr\New_ && isset($node->var->name) && getNameOfNode($node->var) === 'this') {
74 74
                                 // use of method call $this->xxx();
75 75
                                 // use of attribute $this->xxx;
76
-                                $name = getNameOfNode($node->name) . '()';
76
+                                $name = getNameOfNode($node->name).'()';
77 77
                                 if (!$graph->has($name)) {
78 78
                                     $graph->insert(new TreeNode($name));
79 79
                                 }
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Complexity/CyclomaticComplexityVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
                     }
76 76
 
77 77
                     // iterate over children, recursively
78
-                    $cb = function ($node) use (&$cb) {
78
+                    $cb = function($node) use (&$cb) {
79 79
                         $ccn = 0;
80 80
 
81 81
                         foreach (get_object_vars($node) as $name => $member) {
Please login to merge, or discard this patch.
src/Hal/Report/Cli/SearchReporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         );
64 64
 
65 65
         $config = $this->config->get('searches')->get($searchName)->getConfig();
66
-        if(!empty($foundSearch) && !empty($config->failIfFound) && true === $config->failIfFound) {
66
+        if (!empty($foundSearch) && !empty($config->failIfFound) && true === $config->failIfFound) {
67 67
             $title = sprintf(
68 68
                 '<error>[ERR] Found %d occurrences for search "%s"</error>',
69 69
                 sizeof($foundSearch),
Please login to merge, or discard this patch.
src/Hal/Report/Violations/Xml/Reporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     public function generate(Metrics $metrics)
34 34
     {
35
-        if(!class_exists('\DOMDocument')) {
35
+        if (!class_exists('\DOMDocument')) {
36 36
             $this->output->writeln('<error>The DOM extension is not available. Please install it if you want to use the Xml Violations report.</error>');
37 37
             return;
38 38
         }
Please login to merge, or discard this patch.
src/Hal/Report/Html/Reporter.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $this->config = $config;
56 56
         $this->output = $output;
57
-        $this->templateDir = __DIR__ . '/../../../../templates';
57
+        $this->templateDir = __DIR__.'/../../../../templates';
58 58
     }
59 59
 
60 60
 
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
         $consolidated = new Consolidated($metrics);
80 80
 
81 81
         // history of builds
82
-        $today = (object)[
82
+        $today = (object) [
83 83
             'avg' => $consolidated->getAvg(),
84 84
             'sum' => $consolidated->getSum()
85 85
         ];
86
-        $files = glob($logDir . '/js/history-*.json');
86
+        $files = glob($logDir.'/js/history-*.json');
87 87
         $next = count($files) + 1;
88 88
         $history = [];
89 89
         natsort($files);
@@ -92,45 +92,45 @@  discard block
 block discarded – undo
92 92
         }
93 93
 
94 94
         // copy sources
95
-        if (!file_exists($logDir . '/js')) {
96
-            mkdir($logDir . '/js', 0755, true);
95
+        if (!file_exists($logDir.'/js')) {
96
+            mkdir($logDir.'/js', 0755, true);
97 97
         }
98
-        if (!file_exists($logDir . '/css')) {
99
-            mkdir($logDir . '/css', 0755, true);
98
+        if (!file_exists($logDir.'/css')) {
99
+            mkdir($logDir.'/css', 0755, true);
100 100
         }
101
-        if (!file_exists($logDir . '/images')) {
102
-            mkdir($logDir . '/images', 0755, true);
101
+        if (!file_exists($logDir.'/images')) {
102
+            mkdir($logDir.'/images', 0755, true);
103 103
         }
104
-        if (!file_exists($logDir . '/fonts')) {
105
-            mkdir($logDir . '/fonts', 0755, true);
104
+        if (!file_exists($logDir.'/fonts')) {
105
+            mkdir($logDir.'/fonts', 0755, true);
106 106
         }
107 107
 
108 108
         if (!is_writable($logDir)) {
109 109
             throw new RuntimeExceptionAlias(sprintf('Unable to write in the directory "%s"', $logDir));
110 110
         }
111 111
 
112
-        recurse_copy($this->templateDir . '/html_report/js', $logDir . '/js');
113
-        recurse_copy($this->templateDir . '/html_report/css', $logDir . '/css');
114
-        recurse_copy($this->templateDir . '/html_report/images', $logDir . '/images');
115
-        recurse_copy($this->templateDir . '/html_report/fonts', $logDir . '/fonts');
112
+        recurse_copy($this->templateDir.'/html_report/js', $logDir.'/js');
113
+        recurse_copy($this->templateDir.'/html_report/css', $logDir.'/css');
114
+        recurse_copy($this->templateDir.'/html_report/images', $logDir.'/images');
115
+        recurse_copy($this->templateDir.'/html_report/fonts', $logDir.'/fonts');
116 116
 
117 117
         // render dynamic pages
118
-        $this->renderPage($this->templateDir . '/html_report/index.php', $logDir . '/index.html', $consolidated, $history);
119
-        $this->renderPage($this->templateDir . '/html_report/loc.php', $logDir . '/loc.html', $consolidated, $history);
120
-        $this->renderPage($this->templateDir . '/html_report/relations.php', $logDir . '/relations.html', $consolidated, $history);
121
-        $this->renderPage($this->templateDir . '/html_report/coupling.php', $logDir . '/coupling.html', $consolidated, $history);
122
-        $this->renderPage($this->templateDir . '/html_report/all.php', $logDir . '/all.html', $consolidated, $history);
123
-        $this->renderPage($this->templateDir . '/html_report/oop.php', $logDir . '/oop.html', $consolidated, $history);
124
-        $this->renderPage($this->templateDir . '/html_report/complexity.php', $logDir . '/complexity.html', $consolidated, $history);
125
-        $this->renderPage($this->templateDir . '/html_report/panel.php', $logDir . '/panel.html', $consolidated, $history);
126
-        $this->renderPage($this->templateDir . '/html_report/violations.php', $logDir . '/violations.html', $consolidated, $history);
127
-        $this->renderPage($this->templateDir . '/html_report/packages.php', $logDir . '/packages.html', $consolidated, $history);
128
-        $this->renderPage($this->templateDir . '/html_report/package_relations.php', $logDir . '/package_relations.html', $consolidated, $history);
129
-        $this->renderPage($this->templateDir . '/html_report/composer.php', $logDir . '/composer.html', $consolidated, $history);
118
+        $this->renderPage($this->templateDir.'/html_report/index.php', $logDir.'/index.html', $consolidated, $history);
119
+        $this->renderPage($this->templateDir.'/html_report/loc.php', $logDir.'/loc.html', $consolidated, $history);
120
+        $this->renderPage($this->templateDir.'/html_report/relations.php', $logDir.'/relations.html', $consolidated, $history);
121
+        $this->renderPage($this->templateDir.'/html_report/coupling.php', $logDir.'/coupling.html', $consolidated, $history);
122
+        $this->renderPage($this->templateDir.'/html_report/all.php', $logDir.'/all.html', $consolidated, $history);
123
+        $this->renderPage($this->templateDir.'/html_report/oop.php', $logDir.'/oop.html', $consolidated, $history);
124
+        $this->renderPage($this->templateDir.'/html_report/complexity.php', $logDir.'/complexity.html', $consolidated, $history);
125
+        $this->renderPage($this->templateDir.'/html_report/panel.php', $logDir.'/panel.html', $consolidated, $history);
126
+        $this->renderPage($this->templateDir.'/html_report/violations.php', $logDir.'/violations.html', $consolidated, $history);
127
+        $this->renderPage($this->templateDir.'/html_report/packages.php', $logDir.'/packages.html', $consolidated, $history);
128
+        $this->renderPage($this->templateDir.'/html_report/package_relations.php', $logDir.'/package_relations.html', $consolidated, $history);
129
+        $this->renderPage($this->templateDir.'/html_report/composer.php', $logDir.'/composer.html', $consolidated, $history);
130 130
         if ($this->config->has('git')) {
131
-            $this->renderPage($this->templateDir . '/html_report/git.php', $logDir . '/git.html', $consolidated, $consolidatedGroups, $history);
131
+            $this->renderPage($this->templateDir.'/html_report/git.php', $logDir.'/git.html', $consolidated, $consolidatedGroups, $history);
132 132
         }
133
-        $this->renderPage($this->templateDir . '/html_report/junit.php', $logDir . '/junit.html', $consolidated, $consolidatedGroups, $history);
133
+        $this->renderPage($this->templateDir.'/html_report/junit.php', $logDir.'/junit.html', $consolidated, $consolidatedGroups, $history);
134 134
 
135 135
         // js data
136 136
         file_put_contents(
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 
145 145
         // json data
146 146
         file_put_contents(
147
-            $logDir . '/classes.js',
148
-            'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
147
+            $logDir.'/classes.js',
148
+            'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
149 149
         );
150 150
 
151 151
         // HTML files to generate
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         // consolidated by groups
168 168
         foreach ($consolidatedGroups as $name => $consolidated) {
169
-            $outDir = $logDir . DIRECTORY_SEPARATOR . $name;
169
+            $outDir = $logDir.DIRECTORY_SEPARATOR.$name;
170 170
             $this->currentGroup = $name;
171 171
             $this->assetPath = '../';
172 172
 
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
                 );
184 184
 
185 185
                 file_put_contents(
186
-                    $outDir . '/classes.js',
187
-                    'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
186
+                    $outDir.'/classes.js',
187
+                    'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
188 188
                 );
189 189
             }
190 190
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
         $diff = $newValue - $oldValue;
263 263
         if ($diff > 0) {
264
-            $diff = '+' . $diff;
264
+            $diff = '+'.$diff;
265 265
         }
266 266
 
267 267
         $goodOrBad = 'neutral';
Please login to merge, or discard this patch.
templates/html_report/all.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $fullwidth = true;
3
-require __DIR__ . '/_header.php'; ?>
3
+require __DIR__.'/_header.php'; ?>
4 4
 
5 5
 <?php
6 6
 
@@ -37,4 +37,4 @@  discard block
 block discarded – undo
37 37
             </div>
38 38
         </div>
39 39
     </div>
40
-<?php require __DIR__ . '/_footer.php'; ?>
40
+<?php require __DIR__.'/_footer.php'; ?>
Please login to merge, or discard this patch.