src/Sniffs/DeadCode/UnusedPublicMethodSniff.php
private function shouldSkipFile(File $file): bool
    {
        if (Strings::contains($file->getFilename(), '/tests/')
            && ! Strings::contains($file->getFilename(), 'CodingStandard/tests/')
        ) {
            return true;
        }

        $classWrapper = $this->sniffClassWrapperFactory->createFromFirstClassInFile($file);
        if ($classWrapper === null) {
            return true;
        }

        return $classWrapper->implementsInterface() || $classWrapper->extends();
    }
private function shouldSkipFile(File $file): bool
    {
        if (Strings::contains($file->getFilename(), '/tests/')
            && ! Strings::contains($file->getFilename(), 'CodingStandard/tests/')
        ) {
            return true;
        }

        $classWrapper = $this->sniffClassWrapperFactory->createFromFirstClassInFile($file);
        if ($classWrapper === null) {
            return true;
        }

        return $classWrapper->implementsInterface() || $classWrapper->extends();
    }
private function shouldSkipFile ( File $ file ) : bool { if ( Strings :: contains ( $ file -> getFilename ( ) , '/tests/' ) && ! Strings :: contains ( $ file -> getFilename ( ) , 'CodingStandard/tests/' ) ) { return true ; } $ classWrapper = $ this -> sniffClassWrapperFactory -> createFromFirstClassInFile ( $ file ) ; if ( $ classWrapper === null ) { return true ; } return $ classWrapper -> implementsInterface ( ) || $ classWrapper -> extends ( ) ; }
Skip tests as there might be many unused public methods

Skip anything that implements interface or extends class,
because methods can be enforced by them.
Skip tests as there might be many unused public methods