@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | $string = ''; |
46 | 46 | foreach ($this->data as $violation) { |
47 | - $string .= $violation->getName() . ','; |
|
47 | + $string .= $violation->getName().','; |
|
48 | 48 | } |
49 | 49 | return $string; |
50 | 50 | } |
@@ -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"> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | </div> |
40 | 40 | |
41 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
41 | +<?php require __DIR__.'/_footer.php'; ?> |
|
42 | 42 | |
43 | 43 | |
44 | 44 | <script type="text/javascript"> |
@@ -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 | } |
@@ -3,7 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Hal\Application\Config\Config; |
5 | 5 | use Hal\Component\Output\Output; |
6 | -use Hal\Metric\Consolided; |
|
7 | 6 | use Hal\Metric\Metrics; |
8 | 7 | use Hal\Violation\Violation; |
9 | 8 |
@@ -18,9 +18,9 @@ |
||
18 | 18 | * @package Hal\Component\Issue |
19 | 19 | */ |
20 | 20 | /** |
21 | - * Class ProgressBar |
|
22 | - * @package Hal\Component\Output |
|
23 | - */ |
|
21 | + * Class ProgressBar |
|
22 | + * @package Hal\Component\Output |
|
23 | + */ |
|
24 | 24 | class ProgressBar |
25 | 25 | { |
26 | 26 |
@@ -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') |
@@ -120,7 +120,7 @@ |
||
120 | 120 | |
121 | 121 | /** |
122 | 122 | * Standardize the output error when an exception occurs. |
123 | - * @param Throwable $e Throwable object we will get its message to output. |
|
123 | + * @param ConfigException $e Throwable object we will get its message to output. |
|
124 | 124 | * @return CliOutput |
125 | 125 | */ |
126 | 126 | private function outputException(Throwable $e) |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | if ($this->config->has('version')) { |
72 | - $outputFormat = 'PhpMetrics %s <http://phpmetrics.org>' . \PHP_EOL . |
|
73 | - 'by Jean-François Lépine <https://twitter.com/Halleck45>' . \PHP_EOL; |
|
72 | + $outputFormat = 'PhpMetrics %s <http://phpmetrics.org>'.\PHP_EOL. |
|
73 | + 'by Jean-François Lépine <https://twitter.com/Halleck45>'.\PHP_EOL; |
|
74 | 74 | $this->output->writeln(\sprintf($outputFormat, \getVersion())); |
75 | 75 | exit(0); |
76 | 76 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | (new Report\Violations\Xml\Reporter($this->config, $this->output))->generate($metrics); |
116 | 116 | |
117 | 117 | // 5. Enjoy the end. |
118 | - $this->output->writeln(\PHP_EOL . 'Done' . \PHP_EOL); |
|
118 | + $this->output->writeln(\PHP_EOL.'Done'.\PHP_EOL); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -125,6 +125,6 @@ discard block |
||
125 | 125 | */ |
126 | 126 | private function outputException(Throwable $e) |
127 | 127 | { |
128 | - return $this->output->err(\sprintf(\PHP_EOL .'<error>%s</error>' . \PHP_EOL, $e->getMessage())); |
|
128 | + return $this->output->err(\sprintf(\PHP_EOL.'<error>%s</error>'.\PHP_EOL, $e->getMessage())); |
|
129 | 129 | } |
130 | 130 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
141 | - * @param $status |
|
141 | + * @param integer $status |
|
142 | 142 | */ |
143 | 143 | protected function terminate($status) |
144 | 144 | { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
149 | - * @param $logfile |
|
149 | + * @param string $logfile |
|
150 | 150 | * @param $log |
151 | 151 | * @return $this |
152 | 152 | */ |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * @param $debugKey |
|
164 | + * @param string $debugKey |
|
165 | 165 | * @param $value |
166 | 166 | * @return $this |
167 | 167 | */ |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
175 | - * @param $debugKey |
|
175 | + * @param string $debugKey |
|
176 | 176 | * @return $this |
177 | 177 | */ |
178 | 178 | public function clear($debugKey) |
@@ -3,7 +3,6 @@ |
||
3 | 3 | |
4 | 4 | |
5 | 5 | use Hal\Metric\Metrics; |
6 | -use Hoa\Ruler\Model\Bag\Scalar; |
|
7 | 6 | use PhpParser\Node; |
8 | 7 | use PhpParser\Node\Stmt; |
9 | 8 | use PhpParser\NodeVisitorAbstract; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function leaveNode(Node $node) |
49 | 49 | { |
50 | 50 | if ($node instanceof Stmt\Class_ || $node instanceof Stmt\Trait_) { |
51 | - $name = (string)(isset($node->namespacedName) ? $node->namespacedName : 'anonymous@'. \spl_object_hash($node)); |
|
51 | + $name = (string) (isset($node->namespacedName) ? $node->namespacedName : 'anonymous@'.\spl_object_hash($node)); |
|
52 | 52 | $classOrFunction = $this->metrics->get($name); |
53 | 53 | |
54 | 54 | if (null === $lloc = $classOrFunction->get('lloc')) { |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * Reporter constructor. |
30 | 30 | * |
31 | 31 | * @param Config $config |
32 | - * @param Output|OutputInterface $output |
|
32 | + * @param Output $output |
|
33 | 33 | */ |
34 | 34 | public function __construct(Config $config, Output $output) |
35 | 35 | { |
@@ -53,7 +53,7 @@ |
||
53 | 53 | return; |
54 | 54 | } |
55 | 55 | if (!\file_exists(\dirname($logFile)) || !\is_writable(\dirname($logFile))) { |
56 | - throw new \RuntimeException('You don\'t have permissions to write CSV report in ' . $logFile); |
|
56 | + throw new \RuntimeException('You don\'t have permissions to write CSV report in '.$logFile); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | $availables = (new Registry())->allForStructures(); |