private function fileShouldBeIgnored(SplFileInfo $file): bool
    {
        foreach ($this->filesToIgnore as $fileToIgnore) {
            $regex = $this->patternToRegex($fileToIgnore);
            if (preg_match("#{$regex}#", $file->getPathName())) {
                return true;
            }
        }

        return false;
    }
private function fileShouldBeIgnored(SplFileInfo $file): bool
    {
        foreach ($this->filesToIgnore as $fileToIgnore) {
            $regex = $this->patternToRegex($fileToIgnore);
            if (preg_match("#{$regex}#", $file->getPathName())) {
                return true;
            }
        }

        return false;
    }
private function fileShouldBeIgnored ( SplFileInfo $ file ) : bool { foreach ( $ this -> filesToIgnore as $ fileToIgnore ) { $ regex = $ this -> patternToRegex ( $ fileToIgnore ) ; if ( preg_match ( "#{$regex}#" , $ file -> getPathName ( ) ) ) { return true ; } } return false ; }
Determines if a file should be ignored.
@param \SplFileInfo $file File.
@return boolean
Determines if a file should be ignored .