@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function canReviewFile(FileInterface $file) |
| 30 | 30 | { |
| 31 | - return ($file->getExtension() === 'php' && substr($file->getFileName(),-strlen('blade.php'))!='blade.php'); |
|
| 31 | + return ($file->getExtension() === 'php' && substr($file->getFileName(), -strlen('blade.php')) != 'blade.php'); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $process = $this->getProcess($cmd); |
| 45 | 45 | $process->run(); |
| 46 | 46 | |
| 47 | - if (! in_array(trim($process->getOutput()), ['<?php', '#!/usr/bin/env php'])) { |
|
| 47 | + if (!in_array(trim($process->getOutput()), ['<?php', '#!/usr/bin/env php'])) { |
|
| 48 | 48 | $message = 'File must begin with `<?php` or `#!/usr/bin/env php`'; |
| 49 | 49 | $reporter->error($message, $this, $file); |
| 50 | 50 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * |
| 61 | 61 | * @param string $option |
| 62 | 62 | * @param string $value |
| 63 | - * @return PhpCodeSnifferReview |
|
| 63 | + * @return PhpCodeSnifferReviewNoBlade |
|
| 64 | 64 | */ |
| 65 | 65 | public function setOption($option, $value) |
| 66 | 66 | { |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function canReviewFile(FileInterface $file) |
| 83 | 83 | { |
| 84 | - return ($file->getExtension() === 'php' && substr($file->getFileName(),-strlen('blade.php'))!='blade.php'); |
|
| 84 | + return ($file->getExtension() === 'php' && substr($file->getFileName(), -strlen('blade.php')) != 'blade.php'); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -101,11 +101,11 @@ discard block |
||
| 101 | 101 | $process = $this->getProcess($cmd); |
| 102 | 102 | $process->run(); |
| 103 | 103 | |
| 104 | - if (! $process->isSuccessful()) { |
|
| 104 | + if (!$process->isSuccessful()) { |
|
| 105 | 105 | // Create the array of outputs and remove empty values. |
| 106 | 106 | $output = json_decode($process->getOutput(), true); |
| 107 | 107 | |
| 108 | - $filter = function ($acc, $file) { |
|
| 108 | + $filter = function($acc, $file) { |
|
| 109 | 109 | if ($file['errors'] > 0 || $file['warnings'] > 0) { |
| 110 | 110 | return $acc + $file['messages']; |
| 111 | 111 | } |