private function matchPattern($pathName, $pattern)
    {
        if ($pattern[0] !== '/') {
            $pattern = '**/' . $pattern;
        }

        if (\fnmatch($pattern, $pathName)) {
            return true;
        }

        return false;
    }
private function matchPattern($pathName, $pattern)
    {
        if ($pattern[0] !== '/') {
            $pattern = '**/' . $pattern;
        }

        if (\fnmatch($pattern, $pathName)) {
            return true;
        }

        return false;
    }
private function matchPattern ( $ pathName , $ pattern ) { if ( $ pattern [ 0 ] !== '/' ) { $ pattern = '**/' . $ pattern ; } if ( \ fnmatch ( $ pattern , $ pathName ) ) { return true ; } return false ; }
Match the passed path name against the pattern.

@param string $pathName The path name to match.
@param string $pattern  The pattern.

@return bool True if the pattern matches, false otherwise.
Match the passed path name against the pattern .