@@ -49,7 +49,7 @@ |
||
49 | 49 | |
50 | 50 | // build a fingerprint of the given method |
51 | 51 | $fingerprintOfMethod = []; |
52 | - \iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) { |
|
52 | + \iterate_over_node($node, function($node) use (&$fingerprintOfMethod) { |
|
53 | 53 | |
54 | 54 | // avoid cast |
55 | 55 | if ($node instanceof Cast) { |
@@ -17,7 +17,6 @@ |
||
17 | 17 | public static function getName(Node $node) |
18 | 18 | { |
19 | 19 | return ($node instanceof Node\Stmt\Class_ && $node->isAnonymous()) ? |
20 | - 'anonymous@' . \spl_object_hash($node) : |
|
21 | - $node->namespacedName->toString(); |
|
20 | + 'anonymous@'.\spl_object_hash($node) : $node->namespacedName->toString(); |
|
22 | 21 | } |
23 | 22 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | return; |
51 | 51 | } |
52 | 52 | if (!\file_exists(\dirname($logFile)) || !\is_writable(\dirname($logFile))) { |
53 | - throw new \RuntimeException('You don\'t have permissions to write JSON report in ' . $logFile); |
|
53 | + throw new \RuntimeException('You don\'t have permissions to write JSON report in '.$logFile); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | \file_put_contents($logFile, \json_encode($metrics, \JSON_PRETTY_PRINT)); |
@@ -1,16 +1,16 @@ 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 | - $class['name'] = '\\' . $class['name']; |
|
7 | + $class['name'] = '\\'.$class['name']; |
|
8 | 8 | $classesCp[$class['name']] = $class; |
9 | 9 | $classesCp[$class['name']]['externals'] = []; |
10 | 10 | |
11 | 11 | |
12 | 12 | foreach ($class['externals'] as &$ext) { |
13 | - $ext = '\\' . $ext; |
|
13 | + $ext = '\\'.$ext; |
|
14 | 14 | if (!isset($classes[$ext])) { |
15 | 15 | $classesCp[$ext] = [ |
16 | 16 | 'name' => $ext, |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | } unset($ext); |
22 | 22 | } |
23 | 23 | foreach ($classesCp as $class) { |
24 | - $relations[] = (object)[ |
|
24 | + $relations[] = (object) [ |
|
25 | 25 | 'name' => $class['name'], |
26 | 26 | 'size' => 3000, |
27 | 27 | 'relations' => array_values(array_unique($class['externals'])), |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | |
42 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
42 | +<?php require __DIR__.'/_footer.php'; ?> |
|
43 | 43 | |
44 | 44 | |
45 | 45 | <script type="text/javascript"> |
@@ -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 |
@@ -12,12 +12,12 @@ discard block |
||
12 | 12 | $history = array_slice($history, -24); |
13 | 13 | $json = []; |
14 | 14 | foreach ($history as $date => $values) { |
15 | - $json[] = (object)[ |
|
15 | + $json[] = (object) [ |
|
16 | 16 | 'date' => $date, |
17 | 17 | 'key' => 'Additions', |
18 | 18 | 'value' => abs($values['additions']), |
19 | 19 | ]; |
20 | - $json[] = (object)[ |
|
20 | + $json[] = (object) [ |
|
21 | 21 | 'date' => $date, |
22 | 22 | 'key' => 'Removes', |
23 | 23 | 'value' => abs($values['removes']), |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | </div> |
95 | 95 | </div> |
96 | 96 | |
97 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
97 | +<?php require __DIR__.'/_footer.php'; ?> |
|
98 | 98 | |
99 | 99 | |
100 | 100 | <script type="text/javascript"> |
@@ -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"> |
@@ -83,4 +83,4 @@ discard block |
||
83 | 83 | </div> |
84 | 84 | |
85 | 85 | |
86 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
86 | +<?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 | |
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; |
@@ -136,7 +136,7 @@ discard block |
||
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 |
||
191 | 191 | foreach ($unit['tests'] as $test) { |
192 | 192 | $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) { |
@@ -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'; ?> |
@@ -28,7 +28,7 @@ |
||
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 | 34 | <?php if ($this->config->has('junit')) { ?> |