| @@ -63,10 +63,10 @@ | ||
| 63 | 63 | |
| 64 | 64 | public function __invoke($feature) | 
| 65 | 65 |      { | 
| 66 | - $formatted = $feature->getLanguage() && $feature->getLanguage() !== 'en' ? '# language: ' . trim($feature->getLanguage()) . "\n" : ''; | |
| 67 | - $formatted .= $feature->hasTags() ? $this->tags->format($feature->getTags()) . "\n" : ''; | |
| 68 | - $formatted .= $this->featureDescription->format($feature) . "\n\n"; | |
| 69 | - $formatted .= $feature->hasBackground() ? $this->background->format($feature->getBackground()) . "\n" : ''; | |
| 66 | + $formatted = $feature->getLanguage() && $feature->getLanguage() !== 'en' ? '# language: '.trim($feature->getLanguage())."\n" : ''; | |
| 67 | + $formatted .= $feature->hasTags() ? $this->tags->format($feature->getTags())."\n" : ''; | |
| 68 | + $formatted .= $this->featureDescription->format($feature)."\n\n"; | |
| 69 | + $formatted .= $feature->hasBackground() ? $this->background->format($feature->getBackground())."\n" : ''; | |
| 70 | 70 | $formatted .= $feature->hasScenarios() ? $this->scenario->format($feature->getScenarios()) : ''; | 
| 71 | 71 | |
| 72 | 72 | return $formatted; | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 |          $directory = $input->getArgument('directory'); | 
| 90 | 90 | $finder = (new FeatureResolve($directory))->__invoke(); | 
| 91 | 91 | |
| 92 | -        $output->writeln("\nFinding files on <info>" . $directory . "</info>\n"); | |
| 92 | +        $output->writeln("\nFinding files on <info>".$directory."</info>\n"); | |
| 93 | 93 | |
| 94 | 94 | /* @var $file \Symfony\Component\Finder\SplFileInfo */ | 
| 95 | 95 |          foreach ($finder as $file) { | 
| @@ -108,7 +108,7 @@ discard block | ||
| 108 | 108 |              $filePointer = $file->openFile('w'); | 
| 109 | 109 | $filePointer->fwrite($formatted); | 
| 110 | 110 | |
| 111 | -            $output->writeln('<info>' . $file->getRealPath() . '</info>'); | |
| 111 | +            $output->writeln('<info>'.$file->getRealPath().'</info>'); | |
| 112 | 112 | } | 
| 113 | 113 | } | 
| 114 | 114 | } | 
| @@ -94,7 +94,7 @@ discard block | ||
| 94 | 94 |          $directory = $input->getArgument('directory'); | 
| 95 | 95 | $finder = (new FeatureResolve($directory))->__invoke(); | 
| 96 | 96 | |
| 97 | -        $output->writeln("\nFinding files on <info>" . $directory . "</info>\n"); | |
| 97 | +        $output->writeln("\nFinding files on <info>".$directory."</info>\n"); | |
| 98 | 98 | |
| 99 | 99 | /* @var $file \Symfony\Component\Finder\SplFileInfo */ | 
| 100 | 100 |          foreach ($finder as $file) { | 
| @@ -113,13 +113,13 @@ discard block | ||
| 113 | 113 | |
| 114 | 114 |              if ($formatted !== $contentWithoutComments) { | 
| 115 | 115 | |
| 116 | -                if (! defined('FAILED')) { | |
| 116 | +                if (!defined('FAILED')) { | |
| 117 | 117 |                      define('FAILED', true); | 
| 118 | 118 | } | 
| 119 | 119 | |
| 120 | 120 |                  $diff = new Differ("--- Original\n+++ Expected\n", false); | 
| 121 | 121 | |
| 122 | -                $output->writeln('<error>Wrong style: ' . $file->getRealPath() . '</error>'); | |
| 122 | +                $output->writeln('<error>Wrong style: '.$file->getRealPath().'</error>'); | |
| 123 | 123 | $output->writeln($diff->diff($contentWithoutComments, $formatted)); | 
| 124 | 124 | } | 
| 125 | 125 | } | 
| @@ -142,17 +142,17 @@ discard block | ||
| 142 | 142 | implode( | 
| 143 | 143 | array_filter( | 
| 144 | 144 | array_map( | 
| 145 | -                        function ($line) { | |
| 145 | +                        function($line) { | |
| 146 | 146 |                              if (0 === mb_strpos(ltrim($line), '#')) { | 
| 147 | 147 | return ''; | 
| 148 | 148 | } | 
| 149 | 149 | |
| 150 | - return rtrim($line) . "\n"; | |
| 150 | + return rtrim($line)."\n"; | |
| 151 | 151 | }, | 
| 152 | 152 |                          explode("\n", $fileContent) | 
| 153 | 153 | ) | 
| 154 | 154 | ) | 
| 155 | 155 | ) | 
| 156 | - ) . "\n"; | |
| 156 | + )."\n"; | |
| 157 | 157 | } | 
| 158 | 158 | } |