Skip to content

Commit 6472698

Browse files
PHPBCF: Show no errors were found when there are no errors to fix. (#807)
Modifies the output of PHPCBF when the exiting without fixing any errors to show a message indicating that the reasons was due to no coding standards violations in the code base.
1 parent 8b7c477 commit 6472698

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Reports/Cbf.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,12 @@ public function generate(
149149
array_pop($lines);
150150

151151
if (empty($lines) === true) {
152-
echo PHP_EOL.'No fixable errors were found'.PHP_EOL;
152+
if (($totalErrors + $totalWarnings) === 0) {
153+
echo PHP_EOL.'No violations were found'.PHP_EOL;
154+
} else {
155+
echo PHP_EOL.'No fixable errors were found'.PHP_EOL;
156+
}
157+
153158
return;
154159
}
155160

0 commit comments

Comments
 (0)