@@ -100,6 +100,6 @@ |
||
100 | 100 | return self::$filename; |
101 | 101 | } |
102 | 102 | |
103 | - return (getcwd() ?: './') . '/' . self::$filename; |
|
103 | + return (getcwd() ?: './').'/'.self::$filename; |
|
104 | 104 | } |
105 | 105 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $files = $this->getFiles(); |
85 | 85 | } |
86 | 86 | |
87 | - $processCallback = is_callable($this->processCallback) ? $this->processCallback : function () { |
|
87 | + $processCallback = is_callable($this->processCallback) ? $this->processCallback : function() { |
|
88 | 88 | }; |
89 | 89 | |
90 | 90 | $errors = []; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | foreach ($this->extensions as $extension) { |
188 | - $finder->name('*.' . $extension); |
|
188 | + $finder->name('*.'.$extension); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | return iterator_to_array($finder); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | protected function createLintProcess($filename) |
252 | 252 | { |
253 | 253 | $command = [ |
254 | - PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR . '/php', |
|
254 | + PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR.'/php', |
|
255 | 255 | '-d error_reporting=E_ALL', |
256 | 256 | '-d display_errors=On', |
257 | 257 | '-l', $filename, |
@@ -167,13 +167,13 @@ discard block |
||
167 | 167 | $startTime = microtime(true); |
168 | 168 | $startMemUsage = memory_get_usage(true); |
169 | 169 | |
170 | - $output->writeln($this->getApplication()->getLongVersion() . " by overtrue and contributors.\n"); |
|
170 | + $output->writeln($this->getApplication()->getLongVersion()." by overtrue and contributors.\n"); |
|
171 | 171 | |
172 | 172 | $options = $this->mergeOptions(); |
173 | 173 | $verbosity = $output->getVerbosity(); |
174 | 174 | |
175 | 175 | if ($verbosity >= OutputInterface::VERBOSITY_DEBUG) { |
176 | - $output->writeln('Options: ' . json_encode($options) . "\n"); |
|
176 | + $output->writeln('Options: '.json_encode($options)."\n"); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | $linter = new Linter($options['path'], $options['exclude'], $options['extensions']); |
@@ -295,14 +295,14 @@ discard block |
||
295 | 295 | $verbosity = $output->getVerbosity(); |
296 | 296 | $displayProgress = !$input->getOption('no-progress'); |
297 | 297 | |
298 | - $displayProgress && $linter->setProcessCallback(function ($status, SplFileInfo $file) use ($output, $verbosity, $fileCount, $maxColumns) { |
|
298 | + $displayProgress && $linter->setProcessCallback(function($status, SplFileInfo $file) use ($output, $verbosity, $fileCount, $maxColumns) { |
|
299 | 299 | static $i = 1; |
300 | 300 | |
301 | 301 | $percent = floor(($i / $fileCount) * 100); |
302 | 302 | $process = str_pad(" {$i} / {$fileCount} ({$percent}%)", 18, ' ', STR_PAD_LEFT); |
303 | 303 | |
304 | 304 | if ($verbosity >= OutputInterface::VERBOSITY_VERBOSE) { |
305 | - $filename = str_pad(" {$i}: " . $file->getRelativePathname(), $maxColumns - 10, ' ', \STR_PAD_RIGHT); |
|
305 | + $filename = str_pad(" {$i}: ".$file->getRelativePathname(), $maxColumns - 10, ' ', \STR_PAD_RIGHT); |
|
306 | 306 | $status = \str_pad(('ok' === $status ? '<info>OK</info>' : '<error>Error</error>'), 20, ' ', \STR_PAD_RIGHT); |
307 | 307 | $output->writeln(\sprintf("%s\t%s\t%s", $filename, $status, $process)); |
308 | 308 | } else { |
@@ -329,10 +329,10 @@ discard block |
||
329 | 329 | protected function showErrors($errors) |
330 | 330 | { |
331 | 331 | $i = 0; |
332 | - $this->output->writeln("\nThere was " . count($errors) . ' errors:'); |
|
332 | + $this->output->writeln("\nThere was ".count($errors).' errors:'); |
|
333 | 333 | |
334 | 334 | foreach ($errors as $filename => $error) { |
335 | - $this->output->writeln('<comment>' . ++$i . ". {$filename}:{$error['line']}" . '</comment>'); |
|
335 | + $this->output->writeln('<comment>'.++$i.". {$filename}:{$error['line']}".'</comment>'); |
|
336 | 336 | |
337 | 337 | $this->output->write($this->getHighlightedCodeSnippet($filename, $error['line'])); |
338 | 338 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | foreach ($lines as $i => $line) { |
363 | 363 | $snippet .= (abs($lineNumber) === $i + 1 ? ' > ' : ' '); |
364 | - $snippet .= str_pad($i + 1, $lineStrlen, ' ', STR_PAD_LEFT) . '| ' . rtrim($line) . PHP_EOL; |
|
364 | + $snippet .= str_pad($i + 1, $lineStrlen, ' ', STR_PAD_LEFT).'| '.rtrim($line).PHP_EOL; |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | return $snippet; |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $dir = is_dir($first) ? $first : dirname($first); |
446 | 446 | } |
447 | 447 | |
448 | - $filename = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '.phplint.yml'; |
|
448 | + $filename = rtrim($dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'.phplint.yml'; |
|
449 | 449 | |
450 | 450 | return realpath($filename); |
451 | 451 | } |