Completed
Push — master ( 88450a...6b817c )
by personal
02:00 queued 10s
created
src/Hal/Component/Issue/Issuer.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     }
131 131
 
132 132
     /**
133
-     * @param $status
133
+     * @param integer $status
134 134
      */
135 135
     protected function terminate($status)
136 136
     {
@@ -139,6 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
     /**
141 141
      * @param $log
142
+     * @param string $logfile
142 143
      * @return $this
143 144
      */
144 145
     protected function log($logfile, $log)
@@ -152,7 +153,7 @@  discard block
 block discarded – undo
152 153
     }
153 154
 
154 155
     /**
155
-     * @param $debugKey
156
+     * @param string $debugKey
156 157
      * @param $value
157 158
      * @return $this
158 159
      */
@@ -163,7 +164,7 @@  discard block
 block discarded – undo
163 164
     }
164 165
 
165 166
     /**
166
-     * @param $debugKey
167
+     * @param string $debugKey
167 168
      * @return $this
168 169
      */
169 170
     public function clear($debugKey)
Please login to merge, or discard this patch.
src/Hal/Report/Html/Reporter.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@
 block discarded – undo
109 109
     }
110 110
 
111 111
     /**
112
-     * @param $source
113
-     * @param $destination
112
+     * @param string $source
113
+     * @param string $destination
114 114
      * @return $this
115 115
      */
116 116
     public function renderPage($source, $destination, Consolidated $consolidated, $history)
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $this->config = $config;
33 33
         $this->output = $output;
34
-        $this->templateDir = __DIR__ . '/../../../../templates';
34
+        $this->templateDir = __DIR__.'/../../../../templates';
35 35
     }
36 36
 
37 37
 
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
         $consolidated = new Consolidated($metrics);
47 47
 
48 48
         // history of builds
49
-        $today = (object)[
49
+        $today = (object) [
50 50
             'avg' => $consolidated->getAvg(),
51 51
             'sum' => $consolidated->getSum()
52 52
         ];
53
-        $files = glob($logDir . '/js/history-*.json');
53
+        $files = glob($logDir.'/js/history-*.json');
54 54
         $next = count($files) + 1;
55 55
         $history = [];
56 56
         natsort($files);
@@ -59,39 +59,39 @@  discard block
 block discarded – undo
59 59
         }
60 60
 
61 61
         // copy sources
62
-        if (!file_exists($logDir . '/js')) {
63
-            mkdir($logDir . '/js', 0755, true);
62
+        if (!file_exists($logDir.'/js')) {
63
+            mkdir($logDir.'/js', 0755, true);
64 64
         }
65
-        if (!file_exists($logDir . '/css')) {
66
-            mkdir($logDir . '/css', 0755, true);
65
+        if (!file_exists($logDir.'/css')) {
66
+            mkdir($logDir.'/css', 0755, true);
67 67
         }
68
-        if (!file_exists($logDir . '/images')) {
69
-            mkdir($logDir . '/images', 0755, true);
68
+        if (!file_exists($logDir.'/images')) {
69
+            mkdir($logDir.'/images', 0755, true);
70 70
         }
71
-        if (!file_exists($logDir . '/fonts')) {
72
-            mkdir($logDir . '/fonts', 0755, true);
71
+        if (!file_exists($logDir.'/fonts')) {
72
+            mkdir($logDir.'/fonts', 0755, true);
73 73
         }
74
-        recurse_copy($this->templateDir . '/html_report/js', $logDir . '/js');
75
-        recurse_copy($this->templateDir . '/html_report/css', $logDir . '/css');
76
-        recurse_copy($this->templateDir . '/html_report/images', $logDir . '/images');
77
-        recurse_copy($this->templateDir . '/html_report/fonts', $logDir . '/fonts');
74
+        recurse_copy($this->templateDir.'/html_report/js', $logDir.'/js');
75
+        recurse_copy($this->templateDir.'/html_report/css', $logDir.'/css');
76
+        recurse_copy($this->templateDir.'/html_report/images', $logDir.'/images');
77
+        recurse_copy($this->templateDir.'/html_report/fonts', $logDir.'/fonts');
78 78
 
79 79
         // render dynamic pages
80
-        $this->renderPage($this->templateDir . '/html_report/index.php', $logDir . '/index.html', $consolidated, $history);
81
-        $this->renderPage($this->templateDir . '/html_report/loc.php', $logDir . '/loc.html', $consolidated, $history);
82
-        $this->renderPage($this->templateDir . '/html_report/relations.php', $logDir . '/relations.html', $consolidated, $history);
83
-        $this->renderPage($this->templateDir . '/html_report/coupling.php', $logDir . '/coupling.html', $consolidated, $history);
84
-        $this->renderPage($this->templateDir . '/html_report/all.php', $logDir . '/all.html', $consolidated, $history);
85
-        $this->renderPage($this->templateDir . '/html_report/oop.php', $logDir . '/oop.html', $consolidated, $history);
86
-        $this->renderPage($this->templateDir . '/html_report/complexity.php', $logDir . '/complexity.html', $consolidated, $history);
87
-        $this->renderPage($this->templateDir . '/html_report/panel.php', $logDir . '/panel.html', $consolidated, $history);
88
-        $this->renderPage($this->templateDir . '/html_report/violations.php', $logDir . '/violations.html', $consolidated, $history);
89
-        $this->renderPage($this->templateDir . '/html_report/packages.php', $logDir . '/packages.html', $consolidated, $history);
90
-        $this->renderPage($this->templateDir . '/html_report/package_relations.php', $logDir . '/package_relations.html', $consolidated, $history);
80
+        $this->renderPage($this->templateDir.'/html_report/index.php', $logDir.'/index.html', $consolidated, $history);
81
+        $this->renderPage($this->templateDir.'/html_report/loc.php', $logDir.'/loc.html', $consolidated, $history);
82
+        $this->renderPage($this->templateDir.'/html_report/relations.php', $logDir.'/relations.html', $consolidated, $history);
83
+        $this->renderPage($this->templateDir.'/html_report/coupling.php', $logDir.'/coupling.html', $consolidated, $history);
84
+        $this->renderPage($this->templateDir.'/html_report/all.php', $logDir.'/all.html', $consolidated, $history);
85
+        $this->renderPage($this->templateDir.'/html_report/oop.php', $logDir.'/oop.html', $consolidated, $history);
86
+        $this->renderPage($this->templateDir.'/html_report/complexity.php', $logDir.'/complexity.html', $consolidated, $history);
87
+        $this->renderPage($this->templateDir.'/html_report/panel.php', $logDir.'/panel.html', $consolidated, $history);
88
+        $this->renderPage($this->templateDir.'/html_report/violations.php', $logDir.'/violations.html', $consolidated, $history);
89
+        $this->renderPage($this->templateDir.'/html_report/packages.php', $logDir.'/packages.html', $consolidated, $history);
90
+        $this->renderPage($this->templateDir.'/html_report/package_relations.php', $logDir.'/package_relations.html', $consolidated, $history);
91 91
         if ($this->config->has('git')) {
92
-            $this->renderPage($this->templateDir . '/html_report/git.php', $logDir . '/git.html', $consolidated, $history);
92
+            $this->renderPage($this->templateDir.'/html_report/git.php', $logDir.'/git.html', $consolidated, $history);
93 93
         }
94
-        $this->renderPage($this->templateDir . '/html_report/junit.php', $logDir . '/junit.html', $consolidated, $history);
94
+        $this->renderPage($this->templateDir.'/html_report/junit.php', $logDir.'/junit.html', $consolidated, $history);
95 95
 
96 96
         // js data
97 97
         file_put_contents(
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 
106 106
         // json data
107 107
         file_put_contents(
108
-            $logDir . '/js/classes.js',
109
-            'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
108
+            $logDir.'/js/classes.js',
109
+            'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
110 110
         );
111 111
 
112 112
         $this->output->writeln(sprintf('HTML report generated in "%s" directory', $logDir));
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
         $diff = $newValue - $oldValue;
175 175
         if ($diff > 0) {
176
-            $diff = '+' . $diff;
176
+            $diff = '+'.$diff;
177 177
         }
178 178
 
179 179
         $goodOrBad = 'neutral';
Please login to merge, or discard this patch.
src/Hal/Violation/Violations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $string = '';
46 46
         foreach ($this->data as $violation) {
47
-            $string .= $violation->getName() . ',';
47
+            $string .= $violation->getName().',';
48 48
         }
49 49
         return $string;
50 50
     }
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                     $output = 0;
53 53
                     $fanout = [];
54 54
 
55
-                    iterate_over_node($node, function ($node) use (&$output, &$fanout) {
55
+                    iterate_over_node($node, function($node) use (&$output, &$fanout) {
56 56
                         switch (true) {
57 57
                             case $node instanceof Stmt\Return_:
58 58
                                 $output++;
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Complexity/KanDefectVisitor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
             $select = $while = $if = 0;
44 44
 
45
-            iterate_over_node($node, function ($node) use (&$while, &$select, &$if) {
45
+            iterate_over_node($node, function($node) use (&$while, &$select, &$if) {
46 46
                 switch (true) {
47 47
                     case $node instanceof Stmt\Do_:
48 48
                     case $node instanceof Stmt\Foreach_:
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 }
59 59
             });
60 60
 
61
-            $defect = 0.15 + 0.23 *  $while + 0.22 *  $select + 0.07 * $if;
61
+            $defect = 0.15 + 0.23 * $while + 0.22 * $select + 0.07 * $if;
62 62
             $class->set('kanDefect', round($defect, 2));
63 63
         }
64 64
     }
Please login to merge, or discard this patch.
artifacts/phar/build.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-chdir(__DIR__ . '/../../');
2
+chdir(__DIR__.'/../../');
3 3
 
4 4
 if (!file_exists('vendor/autoload.php')) {
5
-    echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!' . PHP_EOL;
5
+    echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!'.PHP_EOL;
6 6
     exit(1);
7 7
 }
8 8
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     if (preg_match($exclude, $file)) {
22 22
         continue;
23 23
     }
24
-    $path = str_replace(__DIR__ . '/', '', $file);
24
+    $path = str_replace(__DIR__.'/', '', $file);
25 25
     $phar->addFromString($path, file_get_contents($file));
26 26
 }
27 27
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
 function rglob($pattern = '*', $flags = 0, $path = '')
54 54
 {
55
-    $paths = glob($path . '*', GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT);
56
-    $files = glob($path . $pattern, $flags);
55
+    $paths = glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT);
56
+    $files = glob($path.$pattern, $flags);
57 57
     foreach ($paths as $path) {
58 58
         $files = array_merge($files, rglob($pattern, $flags, $path));
59 59
     }
Please login to merge, or discard this patch.
src/Hal/Component/Output/TestOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function writeln($message)
25 25
     {
26
-        $this->write(PHP_EOL . $message);
26
+        $this->write(PHP_EOL.$message);
27 27
         return $this;
28 28
     }
29 29
 
Please login to merge, or discard this patch.
src/Hal/Component/Output/CliOutput.php 1 patch
Spacing   +2 added lines, -2 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
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function write($message)
36 36
     {
37
-        $this->quietMode||file_put_contents('php://stdout', $message);
37
+        $this->quietMode || file_put_contents('php://stdout', $message);
38 38
         return $this;
39 39
     }
40 40
 
Please login to merge, or discard this patch.
src/Hal/Violation/Package/StableDependenciesPrinciple.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function apply(Metric $metric)
23 23
     {
24
-        if (! $metric instanceof PackageMetric) {
24
+        if (!$metric instanceof PackageMetric) {
25 25
             return;
26 26
         }
27 27
         $instability = $metric->getInstability();
28 28
         $violatingInstabilities = array_filter(
29 29
             $metric->getDependentInstabilities(),
30
-            function ($otherInstability) use ($instability) {
30
+            function($otherInstability) use ($instability) {
31 31
                 return $otherInstability >= $instability;
32 32
             }
33 33
         );
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $count = count($this->violatingInstabilities);
49 49
         $thisInstability = round($this->metric->getInstability(), 3);
50
-        $packages = implode("\n* ", array_map(function ($name, $instability) {
50
+        $packages = implode("\n* ", array_map(function($name, $instability) {
51 51
             $name = $name === '\\' ? 'global' : substr($name, 0, -1);
52 52
             $instability = round($instability, 3);
53 53
             return "$name ($instability)";
Please login to merge, or discard this patch.