private function validateIncludeRegex(string $path): bool
    {
        $includeRegex = $this->config->getIncludeRegex();
        return $includeRegex === null || Validator::regex($includeRegex)->validate($path) === true;
    }
private function validateIncludeRegex(string $path): bool
    {
        $includeRegex = $this->config->getIncludeRegex();
        return $includeRegex === null || Validator::regex($includeRegex)->validate($path) === true;
    }
private function validateIncludeRegex ( string $ path ) : bool { $ includeRegex = $ this -> config -> getIncludeRegex ( ) ; return $ includeRegex === null || Validator :: regex ( $ includeRegex ) -> validate ( $ path ) === true ; }
Validate file has the include regex if this regex is set.

@param string $path The file path.

@return bool True if it pass this validation.
Validate file has the include regex if this regex is set .