@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | // build a fingerprint of the given method |
49 | 49 | $fingerprintOfMethod = []; |
50 | - iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) { |
|
50 | + iterate_over_node($node, function($node) use (&$fingerprintOfMethod) { |
|
51 | 51 | |
52 | 52 | // avoid cast |
53 | 53 | if ($node instanceof Cast) { |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -chdir(__DIR__ . '/../../'); |
|
2 | +chdir(__DIR__.'/../../'); |
|
3 | 3 | |
4 | 4 | if (!file_exists('vendor/autoload.php')) { |
5 | - echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!' . PHP_EOL; |
|
5 | + echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!'.PHP_EOL; |
|
6 | 6 | exit(1); |
7 | 7 | } |
8 | 8 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | if (preg_match($exclude, $file)) { |
22 | 22 | continue; |
23 | 23 | } |
24 | - $path = str_replace(__DIR__ . '/', '', $file); |
|
24 | + $path = str_replace(__DIR__.'/', '', $file); |
|
25 | 25 | $phar->addFromString($path, file_get_contents($file)); |
26 | 26 | } |
27 | 27 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | |
53 | 53 | function rglob($pattern = '*', $flags = 0, $path = '') |
54 | 54 | { |
55 | - $paths = glob($path . '*', GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT); |
|
56 | - $files = glob($path . $pattern, $flags); |
|
55 | + $paths = glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT); |
|
56 | + $files = glob($path.$pattern, $flags); |
|
57 | 57 | foreach ($paths as $path) { |
58 | 58 | $files = array_merge($files, rglob($pattern, $flags, $path)); |
59 | 59 | } |
@@ -60,18 +60,18 @@ discard block |
||
60 | 60 | // extends |
61 | 61 | if (isset($node->extends)) { |
62 | 62 | if (is_array($node->extends)) { |
63 | - foreach ((array)$node->extends as $interface) { |
|
64 | - array_push($dependencies, (string)$interface); |
|
63 | + foreach ((array) $node->extends as $interface) { |
|
64 | + array_push($dependencies, (string) $interface); |
|
65 | 65 | } |
66 | 66 | } else { |
67 | - array_push($dependencies, (string)$node->extends); |
|
67 | + array_push($dependencies, (string) $node->extends); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | 71 | // implements |
72 | 72 | if (isset($node->implements)) { |
73 | 73 | foreach ($node->implements as $interface) { |
74 | - array_push($dependencies, (string)$interface); |
|
74 | + array_push($dependencies, (string) $interface); |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | // return |
81 | 81 | if (isset($stmt->returnType)) { |
82 | 82 | if ($stmt->returnType instanceof Node\Name\FullyQualified) { |
83 | - array_push($dependencies, (string)$stmt->returnType); |
|
83 | + array_push($dependencies, (string) $stmt->returnType); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | foreach ($stmt->params as $param) { |
89 | 89 | if ($param->type) { |
90 | 90 | if ($param->type instanceof Node\Name\FullyQualified) { |
91 | - array_push($dependencies, (string)$param->type); |
|
91 | + array_push($dependencies, (string) $param->type); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | 96 | // instantiations, static calls |
97 | - \iterate_over_node($stmt, function ($node) use (&$dependencies) { |
|
97 | + \iterate_over_node($stmt, function($node) use (&$dependencies) { |
|
98 | 98 | switch (true) { |
99 | 99 | case $node instanceof Node\Expr\New_: |
100 | 100 | // new MyClass |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | foreach ($matches[1] as $check) { |
114 | 114 | foreach ($this->uses as $use) { |
115 | 115 | if ($use->alias === $check) { |
116 | - array_push($dependencies, (string)($use->name)); |
|
116 | + array_push($dependencies, (string) ($use->name)); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require __DIR__ . '/_header.php'; ?> |
|
1 | +<?php require __DIR__.'/_header.php'; ?> |
|
2 | 2 | <div class="row"> |
3 | 3 | <div class="column"> |
4 | 4 | <div class="bloc bloc-number"> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | <tbody> |
62 | 62 | <?php |
63 | 63 | $classesS = $classes; |
64 | - usort($classesS, function ($a, $b) { |
|
64 | + usort($classesS, function($a, $b) { |
|
65 | 65 | return strcmp($b['pageRank'], $a['pageRank']); |
66 | 66 | }); |
67 | 67 | $classesS = array_slice($classesS, 0, 10); |
@@ -90,4 +90,4 @@ discard block |
||
90 | 90 | }; |
91 | 91 | </script> |
92 | 92 | |
93 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
93 | +<?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 | |
4 | 4 | <?php |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | |
20 | 20 | // 2. percentile map |
21 | 21 | $json = []; |
22 | -if(sizeof($array) > 1) { |
|
22 | +if (sizeof($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' => procentile($array, $percentile), |
27 | 27 | 'percentile' => $percentile * 100, |
28 | 28 | ]; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | </div> |
75 | 75 | |
76 | 76 | |
77 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
77 | +<?php require __DIR__.'/_footer.php'; ?> |
|
78 | 78 | |
79 | 79 | |
80 | 80 | <script> |