@@ -63,7 +63,7 @@ |
||
63 | 63 | ); |
64 | 64 | |
65 | 65 | $config = $this->config->get('searches')->get($searchName)->getConfig(); |
66 | - if(!empty($foundSearch) && !empty($config->failIfFound) && true === $config->failIfFound) { |
|
66 | + if (!empty($foundSearch) && !empty($config->failIfFound) && true === $config->failIfFound) { |
|
67 | 67 | $title = sprintf( |
68 | 68 | '<error>[ERR] Found %d occurrences for search "%s"</error>', |
69 | 69 | sizeof($foundSearch), |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | public function generate(Metrics $metrics) |
34 | 34 | { |
35 | - if(!class_exists('\DOMDocument')) { |
|
35 | + if (!class_exists('\DOMDocument')) { |
|
36 | 36 | $this->output->writeln('<error>The DOM extension is not available. Please install it if you want to use the Xml Violations report.</error>'); |
37 | 37 | return; |
38 | 38 | } |
@@ -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 | <?php |
6 | 6 | |
@@ -37,4 +37,4 @@ discard block |
||
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | </div> |
40 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
40 | +<?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> |
@@ -140,14 +140,14 @@ discard block |
||
140 | 140 | <tbody id="contentClassRank" class="clusterize-content"> |
141 | 141 | <?php |
142 | 142 | $classesS = $classes; |
143 | - usort($classesS, static function ($a, $b) { |
|
143 | + usort($classesS, static function($a, $b) { |
|
144 | 144 | return strcmp($b['pageRank'], $a['pageRank']); |
145 | 145 | }); |
146 | 146 | //$classesS = array_slice($classesS, 0, 10); |
147 | 147 | foreach ($classesS as $class) { ?> |
148 | 148 | <tr> |
149 | 149 | <td> |
150 | - <span class="badge" <?php echo gradientStyleFor($classes, 'pageRank', $class['pageRank']);?>><?php echo $class['pageRank']; ?></span> |
|
150 | + <span class="badge" <?php echo gradientStyleFor($classes, 'pageRank', $class['pageRank']); ?>><?php echo $class['pageRank']; ?></span> |
|
151 | 151 | </td> |
152 | 152 | <td> |
153 | 153 | <span class="path"><?php echo $class['name']; ?></span> |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | $badgeTitleMI = 'Maintainability Index'; |
158 | 158 | $mi = isset($class['mi']) ? $class['mi'] : ''; |
159 | 159 | ?> |
160 | - <span class="badge" title="<?php echo $badgeTitleMI;?>"><?php echo $mi;?></span> |
|
161 | - <span class="badge" title="<?php echo $badgeTitleMIWOC;?>"><?php echo $mIwoC;?></span> |
|
160 | + <span class="badge" title="<?php echo $badgeTitleMI; ?>"><?php echo $mi; ?></span> |
|
161 | + <span class="badge" title="<?php echo $badgeTitleMIWOC; ?>"><?php echo $mIwoC; ?></span> |
|
162 | 162 | </td> |
163 | 163 | </tr> |
164 | 164 | <?php } ?> |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | </div> |
172 | 172 | |
173 | 173 | <div class="row"> |
174 | - <?php if($this->isHomePage()) {?> |
|
174 | + <?php if ($this->isHomePage()) {?> |
|
175 | 175 | <div class="column"> |
176 | 176 | <div class="bloc bloc-number"> |
177 | 177 | <div class="label"> |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | <div class="help number-alternate"><div class="help-inner">No composer.json file found</div></div> |
185 | 185 | <?php } else {?> |
186 | 186 | <div class="number"> |
187 | - <?php echo count($packages);?> dependencies |
|
187 | + <?php echo count($packages); ?> dependencies |
|
188 | 188 | </div> |
189 | 189 | <?php } ?> |
190 | 190 | |
@@ -225,9 +225,9 @@ discard block |
||
225 | 225 | } |
226 | 226 | } |
227 | 227 | ?> |
228 | - chartLicenses(<?php echo json_encode(array_values($json));?>); |
|
228 | + chartLicenses(<?php echo json_encode(array_values($json)); ?>); |
|
229 | 229 | } |
230 | 230 | }; |
231 | 231 | </script> |
232 | 232 | |
233 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
233 | +<?php require __DIR__.'/_footer.php'; ?> |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $this->config = $config; |
56 | 56 | $this->output = $output; |
57 | - $this->templateDir = __DIR__ . '/../../../../templates'; |
|
57 | + $this->templateDir = __DIR__.'/../../../../templates'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | |
@@ -79,11 +79,11 @@ discard block |
||
79 | 79 | $consolidated = new Consolidated($metrics); |
80 | 80 | |
81 | 81 | // history of builds |
82 | - $today = (object)[ |
|
82 | + $today = (object) [ |
|
83 | 83 | 'avg' => $consolidated->getAvg(), |
84 | 84 | 'sum' => $consolidated->getSum() |
85 | 85 | ]; |
86 | - $files = glob($logDir . '/js/history-*.json'); |
|
86 | + $files = glob($logDir.'/js/history-*.json'); |
|
87 | 87 | $next = count($files) + 1; |
88 | 88 | $history = []; |
89 | 89 | natsort($files); |
@@ -92,47 +92,47 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | // copy sources |
95 | - if (!file_exists($logDir . '/js')) { |
|
96 | - mkdir($logDir . '/js', 0755, true); |
|
95 | + if (!file_exists($logDir.'/js')) { |
|
96 | + mkdir($logDir.'/js', 0755, true); |
|
97 | 97 | } |
98 | - if (!file_exists($logDir . '/css')) { |
|
99 | - mkdir($logDir . '/css', 0755, true); |
|
98 | + if (!file_exists($logDir.'/css')) { |
|
99 | + mkdir($logDir.'/css', 0755, true); |
|
100 | 100 | } |
101 | - if (!file_exists($logDir . '/images')) { |
|
102 | - mkdir($logDir . '/images', 0755, true); |
|
101 | + if (!file_exists($logDir.'/images')) { |
|
102 | + mkdir($logDir.'/images', 0755, true); |
|
103 | 103 | } |
104 | - if (!file_exists($logDir . '/fonts')) { |
|
105 | - mkdir($logDir . '/fonts', 0755, true); |
|
104 | + if (!file_exists($logDir.'/fonts')) { |
|
105 | + mkdir($logDir.'/fonts', 0755, true); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | if (!is_writable($logDir)) { |
109 | 109 | throw new RuntimeExceptionAlias(sprintf('Unable to write in the directory "%s"', $logDir)); |
110 | 110 | } |
111 | 111 | |
112 | - copy($this->templateDir . '/html_report/favicon.ico', $logDir . '/favicon.ico'); |
|
112 | + copy($this->templateDir.'/html_report/favicon.ico', $logDir.'/favicon.ico'); |
|
113 | 113 | |
114 | - recurse_copy($this->templateDir . '/html_report/js', $logDir . '/js'); |
|
115 | - recurse_copy($this->templateDir . '/html_report/css', $logDir . '/css'); |
|
116 | - recurse_copy($this->templateDir . '/html_report/images', $logDir . '/images'); |
|
117 | - recurse_copy($this->templateDir . '/html_report/fonts', $logDir . '/fonts'); |
|
114 | + recurse_copy($this->templateDir.'/html_report/js', $logDir.'/js'); |
|
115 | + recurse_copy($this->templateDir.'/html_report/css', $logDir.'/css'); |
|
116 | + recurse_copy($this->templateDir.'/html_report/images', $logDir.'/images'); |
|
117 | + recurse_copy($this->templateDir.'/html_report/fonts', $logDir.'/fonts'); |
|
118 | 118 | |
119 | 119 | // render dynamic pages |
120 | - $this->renderPage($this->templateDir . '/html_report/index.php', $logDir . '/index.html', $consolidated, $history); |
|
121 | - $this->renderPage($this->templateDir . '/html_report/loc.php', $logDir . '/loc.html', $consolidated, $history); |
|
122 | - $this->renderPage($this->templateDir . '/html_report/relations.php', $logDir . '/relations.html', $consolidated, $history); |
|
123 | - $this->renderPage($this->templateDir . '/html_report/coupling.php', $logDir . '/coupling.html', $consolidated, $history); |
|
124 | - $this->renderPage($this->templateDir . '/html_report/all.php', $logDir . '/all.html', $consolidated, $history); |
|
125 | - $this->renderPage($this->templateDir . '/html_report/oop.php', $logDir . '/oop.html', $consolidated, $history); |
|
126 | - $this->renderPage($this->templateDir . '/html_report/complexity.php', $logDir . '/complexity.html', $consolidated, $history); |
|
127 | - $this->renderPage($this->templateDir . '/html_report/panel.php', $logDir . '/panel.html', $consolidated, $history); |
|
128 | - $this->renderPage($this->templateDir . '/html_report/violations.php', $logDir . '/violations.html', $consolidated, $history); |
|
129 | - $this->renderPage($this->templateDir . '/html_report/packages.php', $logDir . '/packages.html', $consolidated, $history); |
|
130 | - $this->renderPage($this->templateDir . '/html_report/package_relations.php', $logDir . '/package_relations.html', $consolidated, $history); |
|
131 | - $this->renderPage($this->templateDir . '/html_report/composer.php', $logDir . '/composer.html', $consolidated, $history); |
|
120 | + $this->renderPage($this->templateDir.'/html_report/index.php', $logDir.'/index.html', $consolidated, $history); |
|
121 | + $this->renderPage($this->templateDir.'/html_report/loc.php', $logDir.'/loc.html', $consolidated, $history); |
|
122 | + $this->renderPage($this->templateDir.'/html_report/relations.php', $logDir.'/relations.html', $consolidated, $history); |
|
123 | + $this->renderPage($this->templateDir.'/html_report/coupling.php', $logDir.'/coupling.html', $consolidated, $history); |
|
124 | + $this->renderPage($this->templateDir.'/html_report/all.php', $logDir.'/all.html', $consolidated, $history); |
|
125 | + $this->renderPage($this->templateDir.'/html_report/oop.php', $logDir.'/oop.html', $consolidated, $history); |
|
126 | + $this->renderPage($this->templateDir.'/html_report/complexity.php', $logDir.'/complexity.html', $consolidated, $history); |
|
127 | + $this->renderPage($this->templateDir.'/html_report/panel.php', $logDir.'/panel.html', $consolidated, $history); |
|
128 | + $this->renderPage($this->templateDir.'/html_report/violations.php', $logDir.'/violations.html', $consolidated, $history); |
|
129 | + $this->renderPage($this->templateDir.'/html_report/packages.php', $logDir.'/packages.html', $consolidated, $history); |
|
130 | + $this->renderPage($this->templateDir.'/html_report/package_relations.php', $logDir.'/package_relations.html', $consolidated, $history); |
|
131 | + $this->renderPage($this->templateDir.'/html_report/composer.php', $logDir.'/composer.html', $consolidated, $history); |
|
132 | 132 | if ($this->config->has('git')) { |
133 | - $this->renderPage($this->templateDir . '/html_report/git.php', $logDir . '/git.html', $consolidated, $consolidatedGroups, $history); |
|
133 | + $this->renderPage($this->templateDir.'/html_report/git.php', $logDir.'/git.html', $consolidated, $consolidatedGroups, $history); |
|
134 | 134 | } |
135 | - $this->renderPage($this->templateDir . '/html_report/junit.php', $logDir . '/junit.html', $consolidated, $consolidatedGroups, $history); |
|
135 | + $this->renderPage($this->templateDir.'/html_report/junit.php', $logDir.'/junit.html', $consolidated, $consolidatedGroups, $history); |
|
136 | 136 | |
137 | 137 | // js data |
138 | 138 | file_put_contents( |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | |
147 | 147 | // json data |
148 | 148 | file_put_contents( |
149 | - $logDir . '/classes.js', |
|
150 | - 'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT) |
|
149 | + $logDir.'/classes.js', |
|
150 | + 'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT) |
|
151 | 151 | ); |
152 | 152 | |
153 | 153 | // HTML files to generate |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | // consolidated by groups |
170 | 170 | foreach ($consolidatedGroups as $name => $consolidated) { |
171 | - $outDir = $logDir . DIRECTORY_SEPARATOR . $name; |
|
171 | + $outDir = $logDir.DIRECTORY_SEPARATOR.$name; |
|
172 | 172 | $this->currentGroup = $name; |
173 | 173 | $this->assetPath = '../'; |
174 | 174 | |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | ); |
186 | 186 | |
187 | 187 | file_put_contents( |
188 | - $outDir . '/classes.js', |
|
189 | - 'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT) |
|
188 | + $outDir.'/classes.js', |
|
189 | + 'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT) |
|
190 | 190 | ); |
191 | 191 | } |
192 | 192 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | |
264 | 264 | $diff = $newValue - $oldValue; |
265 | 265 | if ($diff > 0) { |
266 | - $diff = '+' . $diff; |
|
266 | + $diff = '+'.$diff; |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | $goodOrBad = 'neutral'; |
@@ -1,5 +1,5 @@ discard block |
||
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 |
||
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; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | <td><span class="path"><?php echo $class['name']; ?></span></td> |
83 | 83 | <?php foreach (['ccn', 'bugs'] as $attribute) {?> |
84 | 84 | <td> |
85 | - <span class="badge" <?php echo gradientStyleFor($classes, $attribute, $class[$attribute]);?>> |
|
85 | + <span class="badge" <?php echo gradientStyleFor($classes, $attribute, $class[$attribute]); ?>> |
|
86 | 86 | <?php echo isset($class[$attribute]) ? $class[$attribute] : ''; ?> |
87 | 87 | </span> |
88 | 88 | </td> |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | </div> |
147 | 147 | </div> |
148 | 148 | </div> |
149 | - <?php require __DIR__ . '/_footer.php'; ?> |
|
149 | + <?php require __DIR__.'/_footer.php'; ?> |
|
150 | 150 | |
151 | 151 | <script> |
152 | 152 | var clusterize = new Clusterize({ |
@@ -201,12 +201,12 @@ discard block |
||
201 | 201 | foreach ($unit['tests'] as $test) { |
202 | 202 | array_push($unitTimeJson->children, [ |
203 | 203 | 'name' => $test->classname, |
204 | - 'time' => (float)$test->time, |
|
204 | + 'time' => (float) $test->time, |
|
205 | 205 | ]); |
206 | 206 | } |
207 | 207 | ?> |
208 | 208 | |
209 | - var json = <?php echo json_encode($unitTimeJson);?>; |
|
209 | + var json = <?php echo json_encode($unitTimeJson); ?>; |
|
210 | 210 | root = json; |
211 | 211 | var nodes = treemap.nodes(json) |
212 | 212 | .filter(function (d) { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require __DIR__ . '/_header.php'; ?> |
|
1 | +<?php require __DIR__.'/_header.php'; ?> |
|
2 | 2 | |
3 | 3 | <div class="row"> |
4 | 4 | <div class="column"> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | <td><span class="path"><?php echo $class['name']; ?></span></td> |
27 | 27 | <?php foreach (['afferentCoupling', 'efferentCoupling', 'instability', 'pageRank'] as $attribute) {?> |
28 | 28 | <td> |
29 | - <span class="badge" <?php echo gradientStyleFor($classes, $attribute, $class[$attribute]);?>> |
|
29 | + <span class="badge" <?php echo gradientStyleFor($classes, $attribute, $class[$attribute]); ?>> |
|
30 | 30 | <?php echo isset($class[$attribute]) ? $class[$attribute] : ''; ?> |
31 | 31 | </span> |
32 | 32 | </td> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | </div> |
43 | 43 | |
44 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
44 | +<?php require __DIR__.'/_footer.php'; ?> |
|
45 | 45 | |
46 | 46 | |
47 | 47 | <script> |
@@ -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> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -require __DIR__ . '/_header.php'; ?> |
|
2 | +require __DIR__.'/_header.php'; ?> |
|
3 | 3 | |
4 | 4 | |
5 | 5 | <?php |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | $history = array_slice($history, -24); |
17 | 17 | $json = []; |
18 | 18 | foreach ($history as $date => $values) { |
19 | - array_push($json, (object)[ |
|
19 | + array_push($json, (object) [ |
|
20 | 20 | 'date' => $date, |
21 | 21 | 'key' => 'Additions', |
22 | 22 | 'value' => abs($values['additions']), |
23 | 23 | ]); |
24 | - array_push($json, (object)[ |
|
24 | + array_push($json, (object) [ |
|
25 | 25 | 'date' => $date, |
26 | 26 | 'key' => 'Removes', |
27 | 27 | 'value' => abs($values['removes']), |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | </div> |
99 | 99 | </div> |
100 | 100 | |
101 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
101 | +<?php require __DIR__.'/_footer.php'; ?> |
|
102 | 102 | |
103 | 103 | |
104 | 104 | <script> |