@@ -39,7 +39,7 @@ |
||
39 | 39 | if (trim($item) === '') { |
40 | 40 | continue; |
41 | 41 | } |
42 | - $this->exts[] = '*.' . ltrim(trim($item), '*.'); |
|
42 | + $this->exts[] = '*.'.ltrim(trim($item), '*.'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | if (empty($this->exts)) { |
@@ -36,11 +36,11 @@ |
||
36 | 36 | try { |
37 | 37 | $stmt = $this->parser->parse($file->getContents()); |
38 | 38 | } catch (Error $exc) { |
39 | - throw new ParserException($file->getRelativePathname() . ': ' . $exc->getMessage()); |
|
39 | + throw new ParserException($file->getRelativePathname().': '.$exc->getMessage()); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if ($stmt === null) { |
43 | - throw new ParserException('Parse function return null when parsing ' . $file->getRelativePathname()); |
|
43 | + throw new ParserException('Parse function return null when parsing '.$file->getRelativePathname()); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $this->traverser->traverse($stmt); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public static function container(array $rules = []) : ContainerInterface |
23 | 23 | { |
24 | - $dirules = Json::decode(FileSystem::read(__DIR__ . '/dirules.json'), Json::FORCE_ARRAY); |
|
24 | + $dirules = Json::decode(FileSystem::read(__DIR__.'/dirules.json'), Json::FORCE_ARRAY); |
|
25 | 25 | $rlist = new DiRuleList(); |
26 | 26 | $rlist = $rlist->addRules($dirules); |
27 | 27 | $rlist = $rlist->addRules($rules); |
@@ -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,4 +1,4 @@ discard block |
||
1 | -<?php require __DIR__ . '/_header.php'; ?> |
|
1 | +<?php require __DIR__.'/_header.php'; ?> |
|
2 | 2 | |
3 | 3 | |
4 | 4 | <?php |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | |
20 | 20 | // 2. percentile map |
21 | 21 | $json = []; |
22 | -if(count($array) > 1) { |
|
22 | +if (count($array) > 1) { |
|
23 | 23 | $range = range(0.5, 1, .05); |
24 | 24 | foreach ($range as $percentile) { |
25 | - $json[] = (object)[ |
|
25 | + $json[] = (object) [ |
|
26 | 26 | 'lloc' => percentile($array, $percentile), |
27 | 27 | 'percentile' => round($percentile * 100), |
28 | 28 | ]; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | <td><span class="path"><?php echo $class['name']; ?></span></td> |
64 | 64 | <?php foreach (['lloc', 'cloc', 'volume', 'intelligentContent', 'commentWeight'] as $attribute) {?> |
65 | 65 | <td> |
66 | - <span class="badge" <?php echo gradientStyleFor($classes, $attribute, $class[$attribute]);?>);"> |
|
66 | + <span class="badge" <?php echo gradientStyleFor($classes, $attribute, $class[$attribute]); ?>);"> |
|
67 | 67 | <?php echo isset($class[$attribute]) ? $class[$attribute] : ''; ?> |
68 | 68 | </span> |
69 | 69 | </td> |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | </div> |
77 | 77 | |
78 | 78 | |
79 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
79 | +<?php require __DIR__.'/_footer.php'; ?> |
|
80 | 80 | |
81 | 81 | |
82 | 82 | <script> |
@@ -1,11 +1,11 @@ discard block |
||
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"> |
8 | - <a href="http://www.phpmetrics.org"><img src="<?php echo $this->assetPath;?>images/phpmetrics-maintenability.png" |
|
8 | + <a href="http://www.phpmetrics.org"><img src="<?php echo $this->assetPath; ?>images/phpmetrics-maintenability.png" |
|
9 | 9 | alt="Logo PhpMetrics"/></a> |
10 | 10 | <h1>PhpMetrics</h1> |
11 | 11 | </div> |
@@ -28,10 +28,10 @@ discard block |
||
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($this->isHomePage()) {?> |
|
34 | + <?php if ($this->isHomePage()) {?> |
|
35 | 35 | <li> |
36 | 36 | <a href="composer.html"> |
37 | 37 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | </a> |
40 | 40 | </li> |
41 | 41 | <?php } ?> |
42 | - <?php if($this->isHomePage() && $config->has('junit')) { ?> |
|
42 | + <?php if ($this->isHomePage() && $config->has('junit')) { ?> |
|
43 | 43 | <li> |
44 | 44 | <a href="junit.html"> |
45 | 45 | <svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | Package relations |
134 | 134 | </a> |
135 | 135 | </li> |
136 | - <?php if($this->isHomePage() && $config->has('git')) { ?> |
|
136 | + <?php if ($this->isHomePage() && $config->has('git')) { ?> |
|
137 | 137 | <li> |
138 | 138 | <a href="git.html"> |
139 | 139 | <img src="images/logo-git.png" alt=""> |
@@ -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'; ?> |
@@ -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,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -require __DIR__ . '/_header.php'; ?> |
|
2 | +require __DIR__.'/_header.php'; ?> |
|
3 | 3 | <div class="row"> |
4 | 4 | <div class="column"> |
5 | 5 | <div class="bloc bloc-number"> |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | <div class="label"> |
52 | 52 | <a href="junit.html">Assertions in tests</a> |
53 | 53 | </div> |
54 | - <?php if(isset($project['unitTesting'])) { ?> |
|
54 | + <?php if (isset($project['unitTesting'])) { ?> |
|
55 | 55 | <div class="number"> |
56 | 56 | <?php echo $project['unitTesting']['assertions']; ?> |
57 | 57 | </div> |
@@ -147,14 +147,14 @@ discard block |
||
147 | 147 | <tbody id="contentClassRank" class="clusterize-content"> |
148 | 148 | <?php |
149 | 149 | $classesS = $classes; |
150 | - usort($classesS, static function ($a, $b) { |
|
150 | + usort($classesS, static function($a, $b) { |
|
151 | 151 | return strcmp($b['pageRank'], $a['pageRank']); |
152 | 152 | }); |
153 | 153 | //$classesS = array_slice($classesS, 0, 10); |
154 | 154 | foreach ($classesS as $class) { ?> |
155 | 155 | <tr> |
156 | 156 | <td> |
157 | - <span class="badge" <?php echo gradientStyleFor($classes, 'pageRank', $class['pageRank']);?>);"> |
|
157 | + <span class="badge" <?php echo gradientStyleFor($classes, 'pageRank', $class['pageRank']); ?>);"> |
|
158 | 158 | <?php echo $class['pageRank']; ?> |
159 | 159 | </td> |
160 | 160 | </td> |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | $badgeTitleMI = 'Maintainability Index'; |
167 | 167 | $mi = isset($class['mi']) ? $class['mi'] : ''; |
168 | 168 | ?> |
169 | - <span class="badge" title="<?php echo $badgeTitleMI;?>"><?php echo $mi;?></span> |
|
170 | - <span class="badge" title="<?php echo $badgeTitleMIWOC;?>"><?php echo $mIwoC;?></span> |
|
169 | + <span class="badge" title="<?php echo $badgeTitleMI; ?>"><?php echo $mi; ?></span> |
|
170 | + <span class="badge" title="<?php echo $badgeTitleMIWOC; ?>"><?php echo $mIwoC; ?></span> |
|
171 | 171 | </td> |
172 | 172 | </tr> |
173 | 173 | <?php } ?> |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | </div> |
181 | 181 | |
182 | 182 | <div class="row"> |
183 | - <?php if($this->isHomePage()) {?> |
|
183 | + <?php if ($this->isHomePage()) {?> |
|
184 | 184 | <div class="column"> |
185 | 185 | <div class="bloc bloc-number"> |
186 | 186 | <div class="label"> |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | <div class="help number-alternate"><div class="help-inner">No composer.json file found</div></div> |
194 | 194 | <?php } else {?> |
195 | 195 | <div class="number"> |
196 | - <?php echo count($packages);?> dependencies |
|
196 | + <?php echo count($packages); ?> dependencies |
|
197 | 197 | </div> |
198 | 198 | <?php } ?> |
199 | 199 | |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | } |
236 | 236 | } |
237 | 237 | ?> |
238 | - chartLicenses(<?php echo json_encode(array_values($json));?>); |
|
238 | + chartLicenses(<?php echo json_encode(array_values($json)); ?>); |
|
239 | 239 | } |
240 | 240 | }; |
241 | 241 | </script> |
242 | 242 | |
243 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
243 | +<?php require __DIR__.'/_footer.php'; ?> |