Completed
Push — master ( 832b11...ea8f5e )
by Carlos
01:19
created
src/Cache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,6 +100,6 @@
 block discarded – undo
100 100
             return self::$filename;
101 101
         }
102 102
 
103
-        return (getcwd() ?: './') . '/' . self::$filename;
103
+        return (getcwd() ?: './').'/'.self::$filename;
104 104
     }
105 105
 }
Please login to merge, or discard this patch.
src/Command/LintCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -167,13 +167,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Linter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             ->name($this->extensions)
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     protected function createLintProcess($filename)
254 254
     {
255 255
         $command = [
256
-            PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR . '/php',
256
+            PHP_SAPI == 'cli' ? PHP_BINARY : PHP_BINDIR.'/php',
257 257
             '-d error_reporting=E_ALL',
258 258
             '-d display_errors=On',
259 259
             '-l', $filename,
Please login to merge, or discard this patch.