Completed
Push — master ( 55a779...bf7294 )
by
unknown
23s queued 19s
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   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
         $consolidated = new Consolidated($metrics);
41 41
 
42 42
         // history of builds
43
-        $today = (object)[
43
+        $today = (object) [
44 44
             'avg' => $consolidated->getAvg(),
45 45
             'sum' => $consolidated->getSum()
46 46
         ];
47
-        $files = glob($logDir . '/js/history-*.json');
47
+        $files = glob($logDir.'/js/history-*.json');
48 48
         $next = count($files) + 1;
49 49
         $history = [];
50 50
         natsort($files);
@@ -53,39 +53,39 @@  discard block
 block discarded – undo
53 53
         }
54 54
 
55 55
         // copy sources
56
-        if (!file_exists($logDir . '/js')) {
57
-            mkdir($logDir . '/js', 0755, true);
56
+        if (!file_exists($logDir.'/js')) {
57
+            mkdir($logDir.'/js', 0755, true);
58 58
         }
59
-        if (!file_exists($logDir . '/css')) {
60
-            mkdir($logDir . '/css', 0755, true);
59
+        if (!file_exists($logDir.'/css')) {
60
+            mkdir($logDir.'/css', 0755, true);
61 61
         }
62
-        if (!file_exists($logDir . '/images')) {
63
-            mkdir($logDir . '/images', 0755, true);
62
+        if (!file_exists($logDir.'/images')) {
63
+            mkdir($logDir.'/images', 0755, true);
64 64
         }
65
-        if (!file_exists($logDir . '/fonts')) {
66
-            mkdir($logDir . '/fonts', 0755, true);
65
+        if (!file_exists($logDir.'/fonts')) {
66
+            mkdir($logDir.'/fonts', 0755, true);
67 67
         }
68
-        recurse_copy(PROJECT_DIR . '/templates/html_report/js', $logDir . '/js');
69
-        recurse_copy(PROJECT_DIR . '/templates/html_report/css', $logDir . '/css');
70
-        recurse_copy(PROJECT_DIR . '/templates/html_report/images', $logDir . '/images');
71
-        recurse_copy(PROJECT_DIR . '/templates/html_report/fonts', $logDir . '/fonts');
68
+        recurse_copy(PROJECT_DIR.'/templates/html_report/js', $logDir.'/js');
69
+        recurse_copy(PROJECT_DIR.'/templates/html_report/css', $logDir.'/css');
70
+        recurse_copy(PROJECT_DIR.'/templates/html_report/images', $logDir.'/images');
71
+        recurse_copy(PROJECT_DIR.'/templates/html_report/fonts', $logDir.'/fonts');
72 72
 
73 73
         // render dynamic pages
74
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/index.php', $logDir . '/index.html', $consolidated, $history);
75
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/loc.php', $logDir . '/loc.html', $consolidated, $history);
76
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/relations.php', $logDir . '/relations.html', $consolidated, $history);
77
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/coupling.php', $logDir . '/coupling.html', $consolidated, $history);
78
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/all.php', $logDir . '/all.html', $consolidated, $history);
79
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/oop.php', $logDir . '/oop.html', $consolidated, $history);
80
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/complexity.php', $logDir . '/complexity.html', $consolidated, $history);
81
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/panel.php', $logDir . '/panel.html', $consolidated, $history);
82
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/violations.php', $logDir . '/violations.html', $consolidated, $history);
83
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/packages.php', $logDir . '/packages.html', $consolidated, $history);
84
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/package_relations.php', $logDir . '/package_relations.html', $consolidated, $history);
74
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/index.php', $logDir.'/index.html', $consolidated, $history);
75
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/loc.php', $logDir.'/loc.html', $consolidated, $history);
76
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/relations.php', $logDir.'/relations.html', $consolidated, $history);
77
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/coupling.php', $logDir.'/coupling.html', $consolidated, $history);
78
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/all.php', $logDir.'/all.html', $consolidated, $history);
79
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/oop.php', $logDir.'/oop.html', $consolidated, $history);
80
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/complexity.php', $logDir.'/complexity.html', $consolidated, $history);
81
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/panel.php', $logDir.'/panel.html', $consolidated, $history);
82
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/violations.php', $logDir.'/violations.html', $consolidated, $history);
83
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/packages.php', $logDir.'/packages.html', $consolidated, $history);
84
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/package_relations.php', $logDir.'/package_relations.html', $consolidated, $history);
85 85
         if ($this->config->has('git')) {
86
-            $this->renderPage(PROJECT_DIR . '/templates/html_report/git.php', $logDir . '/git.html', $consolidated, $history);
86
+            $this->renderPage(PROJECT_DIR.'/templates/html_report/git.php', $logDir.'/git.html', $consolidated, $history);
87 87
         }
88
-        $this->renderPage(PROJECT_DIR . '/templates/html_report/junit.php', $logDir . '/junit.html', $consolidated, $history);
88
+        $this->renderPage(PROJECT_DIR.'/templates/html_report/junit.php', $logDir.'/junit.html', $consolidated, $history);
89 89
 
90 90
         // js data
91 91
         file_put_contents(
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
         // json data
101 101
         file_put_contents(
102
-            $logDir . '/js/classes.js',
103
-            'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
102
+            $logDir.'/js/classes.js',
103
+            'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
104 104
         );
105 105
 
106 106
         $this->output->writeln(sprintf('HTML report generated in "%s" directory', $logDir));
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         $diff = $newValue - $oldValue;
169 169
         if ($diff > 0) {
170
-            $diff = '+' . $diff;
170
+            $diff = '+'.$diff;
171 171
         }
172 172
 
173 173
         $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/functions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     }
91 91
 
92 92
     if ($node instanceof \PhpParser\Node\Name\FullyQualified) {
93
-        return (string)$node;
93
+        return (string) $node;
94 94
     }
95 95
     if ($node instanceof \PhpParser\Node\Expr\New_) {
96 96
         return getNameOfNode($node->class);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     }
102 102
 
103 103
     if ($node instanceof \PhpParser\Node\Name) {
104
-        return (string)implode($node->parts);
104
+        return (string) implode($node->parts);
105 105
     }
106 106
 
107 107
     if (isset($node->name) && $node->name instanceof \PhpParser\Node\Expr\Variable) {
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
     }
130 130
 
131 131
     if (isset($node->name) && null === $node->name) {
132
-        return 'anonymous@' . spl_object_hash($node);
132
+        return 'anonymous@'.spl_object_hash($node);
133 133
     }
134 134
 
135 135
     if (isset($node->name)) {
136
-        return (string)$node->name;
136
+        return (string) $node->name;
137 137
     }
138 138
 
139 139
     return null;
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
     }
152 152
     while (false !== ($file = readdir($dir))) {
153 153
         if (($file != '.') && ($file != '..')) {
154
-            if (is_dir($src . '/' . $file)) {
155
-                recurse_copy($src . '/' . $file, $dst . '/' . $file);
154
+            if (is_dir($src.'/'.$file)) {
155
+                recurse_copy($src.'/'.$file, $dst.'/'.$file);
156 156
             } else {
157
-                copy($src . '/' . $file, $dst . '/' . $file);
157
+                copy($src.'/'.$file, $dst.'/'.$file);
158 158
             }
159 159
         }
160 160
     }
Please login to merge, or discard this patch.