| @@ 271-275 (lines=5) @@ | ||
| 268 | $phpCsFixer = $processBuilder->getProcess(); |
|
| 269 | $phpCsFixer->run(); |
|
| 270 | ||
| 271 | if (!$phpCsFixer->isSuccessful()) { |
|
| 272 | $this->output->writeln(sprintf('<error>%s</error>', trim($phpCsFixer->getOutput()))); |
|
| 273 | ||
| 274 | return false; |
|
| 275 | } |
|
| 276 | } else { |
|
| 277 | foreach (GitUtils::commitedFiles() as $file) { |
|
| 278 | $processBuilder = new ProcessBuilder(array( |
|
| @@ 292-295 (lines=4) @@ | ||
| 289 | $phpCsFixer = $processBuilder->getProcess(); |
|
| 290 | $phpCsFixer->run(); |
|
| 291 | ||
| 292 | if (!$phpCsFixer->isSuccessful()) { |
|
| 293 | $this->output->writeln(sprintf('<error>%s</error>', trim($phpCsFixer->getOutput()))); |
|
| 294 | $succeed = false; |
|
| 295 | } |
|
| 296 | } |
|
| 297 | } |
|
| 298 | ||
| @@ 326-330 (lines=5) @@ | ||
| 323 | $this->output->write($buffer); |
|
| 324 | }); |
|
| 325 | ||
| 326 | if (!$phpCsFixer->isSuccessful()) { |
|
| 327 | $this->output->writeln(sprintf('<error>%s</error>', trim($phpCsFixer->getOutput()))); |
|
| 328 | ||
| 329 | return false; |
|
| 330 | } |
|
| 331 | } else { |
|
| 332 | foreach (GitUtils::commitedFiles() as $file) { |
|
| 333 | $processBuilder = new ProcessBuilder( |
|
| @@ 343-346 (lines=4) @@ | ||
| 340 | $this->output->write($buffer); |
|
| 341 | }); |
|
| 342 | ||
| 343 | if (!$phpCsFixer->isSuccessful()) { |
|
| 344 | $this->output->writeln(sprintf('<error>%s</error>', trim($phpCsFixer->getOutput()))); |
|
| 345 | $succeed = false; |
|
| 346 | } |
|
| 347 | } |
|
| 348 | } |
|
| 349 | ||