Skip to content

Commit

Permalink
UnusedPrivateElementsSniff - optimization for classes without methods…
Browse files Browse the repository at this point in the history
… and properties
  • Loading branch information
kukulich authored and ondrejmirtes committed Apr 29, 2016
1 parent 1986b15 commit 702b989
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $classPointer)
$reportedProperties = $this->getProperties($phpcsFile, $tokens, $classToken);
$reportedMethods = $this->getMethods($phpcsFile, $tokens, $classToken);

if (count($reportedProperties) === 0) {
if (count($reportedProperties) + count($reportedMethods) === 0) {
return;
}

Expand Down

0 comments on commit 702b989

Please sign in to comment.