@@ -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 | ]; |
@@ -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> |
@@ -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'; ?> |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | // JUNIT format |
74 | 74 | foreach ($xpath->query('//testsuite[@file]') as $suite) { |
75 | - array_push($testsuites, (object)[ |
|
75 | + array_push($testsuites, (object) [ |
|
76 | 76 | 'file' => $suite->getAttribute('file'), |
77 | 77 | 'name' => $suite->getAttribute('name'), |
78 | 78 | 'assertions' => $suite->getAttribute('assertions'), |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $assertions = $case === $suite->firstChild->nextSibling ? $suite->getAttribute('assertions') : 0; |
102 | 102 | } |
103 | 103 | |
104 | - $testsuites[$case->getAttribute('class')] = (object)[ |
|
104 | + $testsuites[$case->getAttribute('class')] = (object) [ |
|
105 | 105 | 'file' => $case->getAttribute('file'), |
106 | 106 | 'name' => $case->getAttribute('class'), |
107 | 107 | 'assertions' => $assertions, |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $traverser->addVisitor(new ExternalsVisitor($metricsOfUnitTest)); |
121 | 121 | |
122 | 122 | if (!file_exists($suite->file) || !is_readable($suite->file)) { |
123 | - throw new \LogicException('Cannot find source file referenced in testsuite: ' . $suite->file); |
|
123 | + throw new \LogicException('Cannot find source file referenced in testsuite: '.$suite->file); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | $code = file_get_contents($suite->file); |
@@ -133,10 +133,10 @@ discard block |
||
133 | 133 | |
134 | 134 | // list of externals sources of unit test |
135 | 135 | $metric = $metricsOfUnitTest->get($suite->name); |
136 | - $externals = (array)$metric->get('externals'); |
|
136 | + $externals = (array) $metric->get('externals'); |
|
137 | 137 | |
138 | 138 | // global stats for each test |
139 | - $infoAboutTests[$suite->name] = (object)[ |
|
139 | + $infoAboutTests[$suite->name] = (object) [ |
|
140 | 140 | 'nbExternals' => count(array_unique($externals)), |
141 | 141 | 'externals' => array_unique($externals), |
142 | 142 | 'filename' => $suite->file, |
@@ -71,15 +71,15 @@ |
||
71 | 71 | $files = []; |
72 | 72 | foreach ($paths as $path) { |
73 | 73 | if (is_dir($path)) { |
74 | - $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
|
74 | + $path = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
75 | 75 | $directory = new RecursiveDirectoryIterator($path, $this->flags); |
76 | 76 | $iterator = new RecursiveIteratorIterator($directory); |
77 | 77 | |
78 | 78 | $filterRegex = sprintf( |
79 | 79 | '`^%s%s%s$`', |
80 | 80 | preg_quote($path, '`'), |
81 | - !empty($this->excludedDirs) ? '((?!' . implode('|', array_map('preg_quote', $this->excludedDirs)) . ').)+' : '.+', |
|
82 | - '\.(' . implode('|', $this->extensions) . ')' |
|
81 | + !empty($this->excludedDirs) ? '((?!'.implode('|', array_map('preg_quote', $this->excludedDirs)).').)+' : '.+', |
|
82 | + '\.('.implode('|', $this->extensions).')' |
|
83 | 83 | ); |
84 | 84 | |
85 | 85 | $filteredIterator = new RegexIterator( |
@@ -64,7 +64,7 @@ |
||
64 | 64 | foreach ($node->stmts as $stmt) { |
65 | 65 | if ($stmt instanceof Stmt\ClassMethod) { |
66 | 66 | // iterate over children, recursively |
67 | - $cb = function ($node) use (&$cb) { |
|
67 | + $cb = function($node) use (&$cb) { |
|
68 | 68 | $ccn = 0; |
69 | 69 | |
70 | 70 | foreach (get_object_vars($node) as $name => $member) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | foreach ($rawRequirements as $requirement => $version) { |
45 | 45 | $package = $packagist->get($requirement); |
46 | 46 | |
47 | - $packages[$requirement] = (object)[ |
|
47 | + $packages[$requirement] = (object) [ |
|
48 | 48 | 'name' => $requirement, |
49 | 49 | 'required' => $version, |
50 | 50 | 'installed' => isset($rawInstalled[$requirement]) ? $rawInstalled[$requirement] : null, |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | if (!\preg_match('/composer(-dist)?\.json/', $filename)) { |
76 | 76 | continue; |
77 | 77 | } |
78 | - $composerJson = (object)\json_decode(\file_get_contents($filename)); |
|
78 | + $composerJson = (object) \json_decode(\file_get_contents($filename)); |
|
79 | 79 | |
80 | 80 | if (!isset($composerJson->require)) { |
81 | 81 | continue; |
82 | 82 | } |
83 | 83 | |
84 | - $rawRequirements[] = (array)$composerJson->require; |
|
84 | + $rawRequirements[] = (array) $composerJson->require; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | return \call_user_func_array('array_merge', $rawRequirements); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | if (false === \strpos($filename, 'composer.lock')) { |
106 | 106 | continue; |
107 | 107 | } |
108 | - $composerLockJson = (object)\json_decode(\file_get_contents($filename)); |
|
108 | + $composerLockJson = (object) \json_decode(\file_get_contents($filename)); |
|
109 | 109 | |
110 | 110 | if (!isset($composerLockJson->packages)) { |
111 | 111 | continue; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $output = new CliOutput(); |
23 | 23 | |
24 | 24 | // issues and debug |
25 | - $issuer = (new Issuer($output));//->enable(); |
|
25 | + $issuer = (new Issuer($output)); //->enable(); |
|
26 | 26 | |
27 | 27 | // config |
28 | 28 | $config = (new Parser())->parse($argv); |
@@ -98,7 +98,7 @@ |
||
98 | 98 | return |
99 | 99 | 0 >= version_compare( |
100 | 100 | '10.0.10586', |
101 | - PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD |
|
101 | + PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD |
|
102 | 102 | ) |
103 | 103 | || false !== getenv('ANSICON') |
104 | 104 | || 'ON' === getenv('ConEmuANSI') |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function __construct(Mother $traverser, $stopCondition = null) |
28 | 28 | { |
29 | 29 | if (null === $stopCondition) { |
30 | - $stopCondition = function ($node) { |
|
30 | + $stopCondition = function($node) { |
|
31 | 31 | if ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) { |
32 | 32 | return false; |
33 | 33 | } |