diff --git a/SlevomatCodingStandard/Sniffs/Classes/UnusedPrivateElementsSniff.php b/SlevomatCodingStandard/Sniffs/Classes/UnusedPrivateElementsSniff.php index 45a5f62c9..96a05421b 100644 --- a/SlevomatCodingStandard/Sniffs/Classes/UnusedPrivateElementsSniff.php +++ b/SlevomatCodingStandard/Sniffs/Classes/UnusedPrivateElementsSniff.php @@ -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; }