| @@ -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 | } | 
| @@ -71,9 +71,9 @@ discard block | ||
| 71 | 71 | */ | 
| 72 | 72 | public function __construct($path, array $excludes = [], array $extensions = ['php'], $warning = false) | 
| 73 | 73 |      { | 
| 74 | - $this->path = (array)$path; | |
| 74 | + $this->path = (array) $path; | |
| 75 | 75 | $this->excludes = $excludes; | 
| 76 | -        $this->extensions = \array_map(function ($extension) { | |
| 76 | +        $this->extensions = \array_map(function($extension) { | |
| 77 | 77 |              return \sprintf('*.%s', \ltrim($extension, '.')); | 
| 78 | 78 | }, $extensions); | 
| 79 | 79 | $this->warning = $warning; | 
| @@ -93,7 +93,7 @@ discard block | ||
| 93 | 93 | $files = $this->getFiles(); | 
| 94 | 94 | } | 
| 95 | 95 | |
| 96 | -        $processCallback = is_callable($this->processCallback) ? $this->processCallback : function () { | |
| 96 | +        $processCallback = is_callable($this->processCallback) ? $this->processCallback : function() { | |
| 97 | 97 | }; | 
| 98 | 98 | |
| 99 | 99 | $errors = []; | 
| @@ -193,7 +193,7 @@ discard block | ||
| 193 | 193 | $finder->files() | 
| 194 | 194 | ->ignoreUnreadableDirs() | 
| 195 | 195 | ->ignoreVCS(true) | 
| 196 | -            ->filter(function (SplFileInfo $file) { | |
| 196 | +            ->filter(function(SplFileInfo $file) { | |
| 197 | 197 | return $file->isReadable(); | 
| 198 | 198 | }) | 
| 199 | 199 | ->in(realpath($dir)); | 
| @@ -264,7 +264,7 @@ discard block | ||
| 264 | 264 | protected function createLintProcess($filename) | 
| 265 | 265 |      { | 
| 266 | 266 | $command = [ | 
| 267 | - PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR . '/php', | |
| 267 | + PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR.'/php', | |
| 268 | 268 | '-d error_reporting=E_ALL', | 
| 269 | 269 | '-d display_errors=On', | 
| 270 | 270 | '-l', $filename, | 
| @@ -175,13 +175,13 @@ discard block | ||
| 175 | 175 | $startTime = microtime(true); | 
| 176 | 176 | $startMemUsage = memory_get_usage(true); | 
| 177 | 177 | |
| 178 | - $output->writeln($this->getApplication()->getLongVersion() . " by overtrue and contributors.\n"); | |
| 178 | + $output->writeln($this->getApplication()->getLongVersion()." by overtrue and contributors.\n"); | |
| 179 | 179 | |
| 180 | 180 | $options = $this->mergeOptions(); | 
| 181 | 181 | $verbosity = $output->getVerbosity(); | 
| 182 | 182 | |
| 183 | 183 |          if ($verbosity >= OutputInterface::VERBOSITY_DEBUG) { | 
| 184 | -            $output->writeln('Options: ' . json_encode($options) . "\n"); | |
| 184 | +            $output->writeln('Options: '.json_encode($options)."\n"); | |
| 185 | 185 | } | 
| 186 | 186 | |
| 187 | 187 | $linter = new Linter($options['path'], $options['exclude'], $options['extensions'], $options['warning']); | 
| @@ -303,14 +303,14 @@ discard block | ||
| 303 | 303 | $verbosity = $output->getVerbosity(); | 
| 304 | 304 |          $displayProgress = !$input->getOption('no-progress'); | 
| 305 | 305 | |
| 306 | -        $displayProgress && $linter->setProcessCallback(function ($status, SplFileInfo $file) use ($output, $verbosity, $fileCount, $maxColumns) { | |
| 306 | +        $displayProgress && $linter->setProcessCallback(function($status, SplFileInfo $file) use ($output, $verbosity, $fileCount, $maxColumns) { | |
| 307 | 307 | static $i = 1; | 
| 308 | 308 | |
| 309 | 309 | $percent = floor(($i / $fileCount) * 100); | 
| 310 | 310 |              $process = str_pad(" {$i} / {$fileCount} ({$percent}%)", 18, ' ', STR_PAD_LEFT); | 
| 311 | 311 | |
| 312 | 312 |              if ($verbosity >= OutputInterface::VERBOSITY_VERBOSE) { | 
| 313 | -                $filename = str_pad(" {$i}: " . $file->getRelativePathname(), $maxColumns - 10, ' ', \STR_PAD_RIGHT); | |
| 313 | +                $filename = str_pad(" {$i}: ".$file->getRelativePathname(), $maxColumns - 10, ' ', \STR_PAD_RIGHT); | |
| 314 | 314 |                  if ($status === 'ok') { | 
| 315 | 315 | $status = '<info>OK</info>'; | 
| 316 | 316 |                  } elseif ($status === 'error') { | 
| @@ -353,10 +353,10 @@ discard block | ||
| 353 | 353 | protected function showErrors($errors) | 
| 354 | 354 |      { | 
| 355 | 355 | $i = 0; | 
| 356 | -        $this->output->writeln("\nThere was " . count($errors) . ' errors:'); | |
| 356 | +        $this->output->writeln("\nThere was ".count($errors).' errors:'); | |
| 357 | 357 | |
| 358 | 358 |          foreach ($errors as $filename => $error) { | 
| 359 | -            $this->output->writeln('<comment>' . ++$i . ". {$filename}:{$error['line']}" . '</comment>'); | |
| 359 | +            $this->output->writeln('<comment>'.++$i.". {$filename}:{$error['line']}".'</comment>'); | |
| 360 | 360 | |
| 361 | 361 | $this->output->write($this->getHighlightedCodeSnippet($filename, $error['line'])); | 
| 362 | 362 | |
| @@ -385,7 +385,7 @@ discard block | ||
| 385 | 385 | |
| 386 | 386 |          foreach ($lines as $i => $line) { | 
| 387 | 387 | $snippet .= (abs($lineNumber) === $i + 1 ? ' > ' : ' '); | 
| 388 | - $snippet .= str_pad($i + 1, $lineStrlen, ' ', STR_PAD_LEFT) . '| ' . rtrim($line) . PHP_EOL; | |
| 388 | + $snippet .= str_pad($i + 1, $lineStrlen, ' ', STR_PAD_LEFT).'| '.rtrim($line).PHP_EOL; | |
| 389 | 389 | } | 
| 390 | 390 | |
| 391 | 391 | return $snippet; | 
| @@ -472,7 +472,7 @@ discard block | ||
| 472 | 472 | $dir = is_dir($first) ? $first : dirname($first); | 
| 473 | 473 | } | 
| 474 | 474 | |
| 475 | - $filename = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '.phplint.yml'; | |
| 475 | + $filename = rtrim($dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'.phplint.yml'; | |
| 476 | 476 | |
| 477 | 477 | return realpath($filename); | 
| 478 | 478 | } | 
| @@ -81,7 +81,7 @@ | ||
| 81 | 81 | } | 
| 82 | 82 | |
| 83 | 83 | |
| 84 | -        return (bool)preg_match('/(Warning:|Deprecated:|Notice:)/', $output); | |
| 84 | +        return (bool) preg_match('/(Warning:|Deprecated:|Notice:)/', $output); | |
| 85 | 85 | } | 
| 86 | 86 | |
| 87 | 87 | /** |