Skip to content
This repository was archived by the owner on Jan 14, 2019. It is now read-only.

Commit d3f4672

Browse files
authored
Merge pull request #10 from Hexanet/9-php-cs-fixer-fail
Add exception if php-cs-fixer failed to check files
2 parents 1096d43 + b4cf9e0 commit d3f4672

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Task/PhpCsFixerTask.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ private function checkWithPhpCsFixer(array $files)
7070
$output = json_decode($phpCsFixer->getOutput(), true);
7171

7272
if (!$output) {
73-
continue;
73+
throw new \RuntimeException(sprintf(
74+
'PHP-CS-Fixer failed to check the files, to have more informations execute: %s',
75+
$phpCsFixer->getCommandLine()
76+
));
7477
}
7578

7679
$resultForFile = reset($output['files']);

0 commit comments

Comments
 (0)