Skip to content

Commit 702b989

Browse files
kukulichondrejmirtes
authored andcommitted
UnusedPrivateElementsSniff - optimization for classes without methods and properties
1 parent 1986b15 commit 702b989

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SlevomatCodingStandard/Sniffs/Classes/UnusedPrivateElementsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $classPointer)
7373
$reportedProperties = $this->getProperties($phpcsFile, $tokens, $classToken);
7474
$reportedMethods = $this->getMethods($phpcsFile, $tokens, $classToken);
7575

76-
if (count($reportedProperties) === 0) {
76+
if (count($reportedProperties) + count($reportedMethods) === 0) {
7777
return;
7878
}
7979

0 commit comments

Comments
 (0)