@@ -1,5 +1,5 @@ discard block |
||
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 |
||
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) { |
@@ -1,8 +1,8 @@ discard block |
||
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 |
||
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"> |
@@ -1,17 +1,17 @@ discard block |
||
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 |
||
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 |
||
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"> |
@@ -1,4 +1,4 @@ discard block |
||
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 |
||
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 |
||
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 |
||
158 | 158 | } |
159 | 159 | } |
160 | 160 | </script> |
161 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
161 | +<?php require __DIR__.'/_footer.php'; ?> |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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 |
||
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 |
||
147 | 147 | </script> |
148 | 148 | |
149 | 149 | <?php |
150 | -require __DIR__ . '/_footer.php'; ?> |
|
150 | +require __DIR__.'/_footer.php'; ?> |
@@ -86,7 +86,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -52,7 +52,7 @@ discard block |
||
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 |
||
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 |
||
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; |
@@ -1,13 +1,13 @@ discard block |
||
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 |
||
95 | 95 | </div> |
96 | 96 | </div> |
97 | 97 | |
98 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
98 | +<?php require __DIR__.'/_footer.php'; ?> |
@@ -57,10 +57,10 @@ |
||
57 | 57 | <?php if ([] !== $this->groups) {?> |
58 | 58 | <div class="content-full group-tabs"> |
59 | 59 | <ul class="tabs"> |
60 | - <li class="<?php if(!$this->currentGroup) { echo 'active'; }?>"><a href="<?php echo $this->assetPath;?>index.html">All</a></li> |
|
60 | + <li class="<?php if (!$this->currentGroup) { echo 'active'; }?>"><a href="<?php echo $this->assetPath; ?>index.html">All</a></li> |
|
61 | 61 | <?php foreach ($this->groups as $group) { ?> |
62 | 62 | <li class="<?php if ($group->getName() === $this->currentGroup) { echo 'active'; }?> "> |
63 | - <a href="<?php echo $this->assetPath . $group->getName();?>/index.html"><?php echo $group->getName();?></a> |
|
63 | + <a href="<?php echo $this->assetPath.$group->getName(); ?>/index.html"><?php echo $group->getName(); ?></a> |
|
64 | 64 | </li> |
65 | 65 | <?php } ?> |
66 | 66 | </ul> |