Completed
Pull Request — master (#405)
by personal
01:35
created
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/Report/Html/template/junit.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/_header.php'; ?>
2
+require __DIR__.'/_header.php'; ?>
3 3
 
4 4
 <?php
5 5
 if (!isset($project['unitTesting'])) {
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 }
9 9
 
10 10
 $unit = $project['unitTesting'];
11
-$getMetricForClass = function ($classname, $metric) use ($classes) {
11
+$getMetricForClass = function($classname, $metric) use ($classes) {
12 12
     foreach ($classes as $class) {
13 13
         if ($classname !== $class['name']) {
14 14
             continue;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         </div>
137 137
     </div>
138 138
 
139
-    <?php require __DIR__ . '/_footer.php'; ?>
139
+    <?php require __DIR__.'/_footer.php'; ?>
140 140
 
141 141
     <script type="text/javascript">
142 142
         var clusterize = new Clusterize({
@@ -191,12 +191,12 @@  discard block
 block discarded – undo
191 191
             foreach ($unit['tests'] as $test) {
192 192
                 array_push($unitTimeJson->children, [
193 193
                     'name' => $test->classname,
194
-                    'time' => (float)$test->time,
194
+                    'time' => (float) $test->time,
195 195
                 ]);
196 196
             }
197 197
             ?>
198 198
 
199
-            var json = <?php echo json_encode($unitTimeJson);?>;
199
+            var json = <?php echo json_encode($unitTimeJson); ?>;
200 200
             root = json;
201 201
             var nodes = treemap.nodes(json)
202 202
                 .filter(function (d) {
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.
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.
src/Hal/Report/Html/template/_footer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 </div>
2 2
 
3 3
 <!-- Sidebar -->
4
-<?php if(!isset($fullwidth) || $fullwidth === false) {?>
4
+<?php if (!isset($fullwidth) || $fullwidth === false) {?>
5 5
 <div id="sidebar">
6 6
     <div class="content">
7 7
         <div class="logo">
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
                             <path d="M0 0h24v24H0z" fill="none"/>
29 29
                             <path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/>
30 30
                         </svg>
31
-                        Violations (<?php echo $sum->violations->total;?>)
31
+                        Violations (<?php echo $sum->violations->total; ?>)
32 32
                     </a>
33 33
                 </li>
34
-                <?php if($config->has('junit')) { ?>
34
+                <?php if ($config->has('junit')) { ?>
35 35
                     <li>
36 36
                         <a href="junit.html">
37 37
                             <svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                         Package relations
126 126
                     </a>
127 127
                 </li>
128
-                <?php if($config->has('git')) { ?>
128
+                <?php if ($config->has('git')) { ?>
129 129
                 <li>
130 130
                     <a href="git.html">
131 131
                         <img src="images/logo-git.png" alt="">
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/packages.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/_header.php'; ?>
2
+require __DIR__.'/_header.php'; ?>
3 3
 
4 4
     <div class="row">
5 5
         <div class="column">
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             </div>
41 41
         </div>
42 42
     </div>
43
-<?php require __DIR__ . '/_footer.php'; ?>
43
+<?php require __DIR__.'/_footer.php'; ?>
44 44
 <?php
45 45
 $spots = [];
46 46
 foreach ($packages as $each) {
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/package_relations.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 <?php
4 4
 $relations = [];
5
-$getPackageName = function ($name) {
5
+$getPackageName = function($name) {
6 6
     return $name === '\\' ? 'global' : substr($name, 0, -1);
7 7
 };
8 8
 foreach ($packages as $package) {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     </div>
42 42
 </div>
43 43
 
44
-<?php require __DIR__ . '/_footer.php'; ?>
44
+<?php require __DIR__.'/_footer.php'; ?>
45 45
 
46 46
 
47 47
 <script type="text/javascript">
Please login to merge, or discard this patch.