Skip to content

Commit

Permalink
Full and summary reports no longer print when there are no errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Dec 5, 2013
1 parent 1acebf6 commit 63dded0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CodeSniffer/Reports/Full.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ public function generate(
$width=80,
$toScreen=true
) {
if ($cachedData === '') {
return;
}

echo $cachedData;

if ($toScreen === true
Expand Down
4 changes: 4 additions & 0 deletions CodeSniffer/Reports/Summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public function generate(
$width=80,
$toScreen=true
) {
if ($cachedData === '') {
return;
}

echo PHP_EOL.'PHP CODE SNIFFER REPORT SUMMARY'.PHP_EOL;
echo str_repeat('-', $width).PHP_EOL;
echo 'FILE'.str_repeat(' ', ($width - 20)).'ERRORS WARNINGS'.PHP_EOL;
Expand Down

0 comments on commit 63dded0

Please sign in to comment.