| @@ -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 | } | 
| @@ -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 | } | 
| @@ -65,9 +65,9 @@ discard block | ||
| 65 | 65 | */ | 
| 66 | 66 | public function __construct($path, array $excludes = [], array $extensions = ['php']) | 
| 67 | 67 |      { | 
| 68 | - $this->path = (array)$path; | |
| 68 | + $this->path = (array) $path; | |
| 69 | 69 | $this->excludes = $excludes; | 
| 70 | -        $this->extensions = \array_map(function ($extension) { | |
| 70 | +        $this->extensions = \array_map(function($extension) { | |
| 71 | 71 |              return \sprintf('*.%s', \ltrim($extension, '.')); | 
| 72 | 72 | }, $extensions); | 
| 73 | 73 | } | 
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 | $files = $this->getFiles(); | 
| 87 | 87 | } | 
| 88 | 88 | |
| 89 | -        $processCallback = is_callable($this->processCallback) ? $this->processCallback : function () { | |
| 89 | +        $processCallback = is_callable($this->processCallback) ? $this->processCallback : function() { | |
| 90 | 90 | }; | 
| 91 | 91 | |
| 92 | 92 | $errors = []; | 
| @@ -183,7 +183,7 @@ discard block | ||
| 183 | 183 | $finder->files() | 
| 184 | 184 | ->ignoreUnreadableDirs() | 
| 185 | 185 | ->ignoreVCS(true) | 
| 186 | -            ->filter(function (SplFileInfo $file) { | |
| 186 | +            ->filter(function(SplFileInfo $file) { | |
| 187 | 187 | return $file->isReadable(); | 
| 188 | 188 | }) | 
| 189 | 189 | ->in(realpath($dir)); | 
| @@ -254,7 +254,7 @@ discard block | ||
| 254 | 254 | protected function createLintProcess($filename) | 
| 255 | 255 |      { | 
| 256 | 256 | $command = [ | 
| 257 | - PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR . '/php', | |
| 257 | + PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR.'/php', | |
| 258 | 258 | '-d error_reporting=E_ALL', | 
| 259 | 259 | '-d display_errors=On', | 
| 260 | 260 | '-l', $filename, |