Skip to content

Commit 33a3d89

Browse files
peterwilsonccjrfnl
authored andcommitted
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 67f13f0 commit 33a3d89

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Reports/Cbf.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ public function generate(
150150
array_pop($lines);
151151

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

0 commit comments

Comments
 (0)