Completed
Push — master ( e51b3d...b64695 )
by personal
01:12 queued 46s
created
templates/html_report/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.
templates/html_report/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.
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'; ?>
41 40
\ No newline at end of file
41
+<?php require __DIR__.'/_footer.php'; ?>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
templates/html_report/relations.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  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 5
 $classesCp = [];
6 6
 foreach ($classes as $class) {
7 7
 
8
-    $class['name'] = '\\' . $class['name'];
8
+    $class['name'] = '\\'.$class['name'];
9 9
     $classesCp[$class['name']] = $class;
10 10
     $classesCp[$class['name']]['externals'] = [];
11 11
 
12 12
 
13 13
     foreach ($class['externals'] as &$ext) {
14
-        $ext = '\\' . $ext;
14
+        $ext = '\\'.$ext;
15 15
         if (!isset($classes[$ext])) {
16 16
             $classesCp[$ext] = [
17 17
                 'name' => $ext,
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
     }
23 23
 }
24 24
 foreach ($classesCp as $class) {
25
-    array_push($relations, (object)[
25
+    array_push($relations, (object) [
26 26
         'name' => $class['name'],
27 27
         'size' => 3000,
28
-        'relations' => (array)array_values(array_unique($class['externals'])),
28
+        'relations' => (array) array_values(array_unique($class['externals'])),
29 29
     ]);
30 30
 }
31 31
 ?>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     </div>
41 41
 </div>
42 42
 
43
-<?php require __DIR__ . '/_footer.php'; ?>
43
+<?php require __DIR__.'/_footer.php'; ?>
44 44
 
45 45
 
46 46
 <script type="text/javascript">
Please login to merge, or discard this patch.
templates/html_report/violations.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 <?php
4 4
 $map = [
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                     <tbody>
58 58
                     <?php foreach ($classes as $class) {
59 59
                         if (count($class['violations']) > 0) {
60
-                            $currentId = 'bloc-' . uniqid('', true);
60
+                            $currentId = 'bloc-'.uniqid('', true);
61 61
                             ?>
62 62
 
63 63
                             <tr>
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                     <tbody>
109 109
                     <?php foreach ($packages as $package) {
110 110
                         if (count($package['violations']) > 0) {
111
-                            $currentId = 'bloc-' . uniqid();
111
+                            $currentId = 'bloc-'.uniqid();
112 112
                             ?>
113 113
 
114 114
                             <tr>
@@ -158,4 +158,4 @@  discard block
 block discarded – undo
158 158
             }
159 159
         }
160 160
     </script>
161
-<?php require __DIR__ . '/_footer.php'; ?>
161
+<?php require __DIR__.'/_footer.php'; ?>
Please login to merge, or discard this patch.
templates/html_report/panel.php 1 patch
Spacing   +5 added lines, -5 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
     <div class="row">
6 6
         <div class="column">
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                     <tbody>
82 82
                     <?php
83 83
                     $classesS = $classes;
84
-                    usort($classesS, static function ($a, $b) {
84
+                    usort($classesS, static function($a, $b) {
85 85
                         return strcmp($b['pageRank'], $a['pageRank']);
86 86
                     });
87 87
                     $classesS = array_slice($classesS, 0, 10);
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
                                 $badgeTitleMI = 'Maintainability Index';
95 95
                                 $mi = isset($class['mi']) ? $class['mi'] : '';
96 96
                                 ?>
97
-                                <span class="badge" title="<?php echo $badgeTitleMI;?>"><?php echo $mi;?></span>
98
-                                <span class="badge" title="<?php echo $badgeTitleMIWOC;?>"><?php echo $mIwoC;?></span>
97
+                                <span class="badge" title="<?php echo $badgeTitleMI; ?>"><?php echo $mi; ?></span>
98
+                                <span class="badge" title="<?php echo $badgeTitleMIWOC; ?>"><?php echo $mIwoC; ?></span>
99 99
                             </td>
100 100
                             <td><?php echo $class['pageRank']; ?></td>
101 101
                         </tr>
@@ -147,4 +147,4 @@  discard block
 block discarded – undo
147 147
     </script>
148 148
 
149 149
 <?php
150
-require __DIR__ . '/_footer.php'; ?>
150
+require __DIR__.'/_footer.php'; ?>
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     }
87 87
 
88 88
     if ($node instanceof \PhpParser\Node\Name\FullyQualified) {
89
-        return (string)$node;
89
+        return (string) $node;
90 90
     }
91 91
     if ($node instanceof \PhpParser\Node\Expr\New_) {
92 92
         return getNameOfNode($node->class);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     }
98 98
 
99 99
     if ($node instanceof \PhpParser\Node\Name) {
100
-        return (string)implode($node->parts);
100
+        return (string) implode($node->parts);
101 101
     }
102 102
 
103 103
     if (isset($node->name) && $node->name instanceof \PhpParser\Node\Expr\Variable) {
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
     }
126 126
 
127 127
     if (isset($node->name) && null === $node->name) {
128
-        return 'anonymous@' . spl_object_hash($node);
128
+        return 'anonymous@'.spl_object_hash($node);
129 129
     }
130 130
 
131 131
     if (isset($node->name)) {
132
-        return (string)$node->name;
132
+        return (string) $node->name;
133 133
     }
134 134
 
135 135
     return null;
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
     }
148 148
     while (false !== ($file = readdir($dir))) {
149 149
         if (($file != '.') && ($file != '..')) {
150
-            if (is_dir($src . '/' . $file)) {
151
-                recurse_copy($src . '/' . $file, $dst . '/' . $file);
150
+            if (is_dir($src.'/'.$file)) {
151
+                recurse_copy($src.'/'.$file, $dst.'/'.$file);
152 152
             } else {
153
-                copy($src . '/' . $file, $dst . '/' . $file);
153
+                copy($src.'/'.$file, $dst.'/'.$file);
154 154
             }
155 155
         }
156 156
     }
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
 {
176 176
     // memory cache
177 177
     static $caches;
178
-    if(null === $caches) {
178
+    if (null === $caches) {
179 179
         $caches = [];
180 180
     }
181 181
 
182
-    if(!isset($caches[$attribute])) {
182
+    if (!isset($caches[$attribute])) {
183 183
         // avoid to iterate over array too many times
184 184
         $max = 0;
185 185
         $min = 1;
186
-        foreach($array as $item) {
187
-            if(!isset($item[$attribute])) {
186
+        foreach ($array as $item) {
187
+            if (!isset($item[$attribute])) {
188 188
                 continue;
189 189
             }
190 190
 
Please login to merge, or discard this patch.
src/Hal/Metric/System/Packages/Composer/Composer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         // exclude extensions
55
-        $packages = array_filter($packages, function ($package) {
55
+        $packages = array_filter($packages, function($package) {
56 56
             return !preg_match('!(^php$|^ext\-)!', $package->name);
57 57
         });
58 58
 
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
             if (!\preg_match('/composer(-dist)?\.json/', $filename)) {
77 77
                 continue;
78 78
             }
79
-            $composerJson = (object)\json_decode(\file_get_contents($filename));
79
+            $composerJson = (object) \json_decode(\file_get_contents($filename));
80 80
 
81 81
             if (!isset($composerJson->require)) {
82 82
                 continue;
83 83
             }
84 84
 
85
-            $rawRequirements[] = (array)$composerJson->require;
85
+            $rawRequirements[] = (array) $composerJson->require;
86 86
         }
87 87
 
88 88
         return \call_user_func_array('array_merge', $rawRequirements);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             if (false === \strpos($filename, 'composer.lock')) {
107 107
                 continue;
108 108
             }
109
-            $composerLockJson = (object)\json_decode(\file_get_contents($filename));
109
+            $composerLockJson = (object) \json_decode(\file_get_contents($filename));
110 110
 
111 111
             if (!isset($composerLockJson->packages)) {
112 112
                 continue;
Please login to merge, or discard this patch.
templates/html_report/composer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/_header.php';
2
+require __DIR__.'/_header.php';
3 3
 
4 4
 $packages = isset($project['composer']['packages']) ? $project['composer']['packages'] : [];
5
-usort($packages, function ($a, $b) {
5
+usort($packages, function($a, $b) {
6 6
     return strcmp($a->name, $b->name);
7 7
 });
8 8
 if ([] === $packages) {
9 9
     echo '<div class="row"><div class="column"><div class="bloc">No composer.json file found in this project</div></div></div>';
10
-    require __DIR__ . '/_footer.php';
10
+    require __DIR__.'/_footer.php';
11 11
     return;
12 12
 }
13 13
 ?>
@@ -95,4 +95,4 @@  discard block
 block discarded – undo
95 95
     </div>
96 96
 </div>
97 97
 
98
-<?php require __DIR__ . '/_footer.php'; ?>
98
+<?php require __DIR__.'/_footer.php'; ?>
Please login to merge, or discard this patch.