private function patternHasMatch($globPattern)
    {
        if (substr(trim($globPattern), 0, 1) === '/') {
            $globPattern = trim(substr($globPattern, 1));
        } elseif (substr(trim($globPattern), -1) === '/') {
            $globPattern = trim(substr($globPattern, 0, -1));
        } else {
            $globPattern = '{' . trim($globPattern) . '}*';
        }

        $initialWorkingDirectory = (string) getcwd();
        chdir($this->directory);

        $matches = glob($globPattern, GLOB_BRACE);

        chdir($initialWorkingDirectory);

        return is_array($matches) && count($matches) > 0;
    }
private function patternHasMatch($globPattern)
    {
        if (substr(trim($globPattern), 0, 1) === '/') {
            $globPattern = trim(substr($globPattern, 1));
        } elseif (substr(trim($globPattern), -1) === '/') {
            $globPattern = trim(substr($globPattern, 0, -1));
        } else {
            $globPattern = '{' . trim($globPattern) . '}*';
        }

        $initialWorkingDirectory = (string) getcwd();
        chdir($this->directory);

        $matches = glob($globPattern, GLOB_BRACE);

        chdir($initialWorkingDirectory);

        return is_array($matches) && count($matches) > 0;
    }
private function patternHasMatch ( $ globPattern ) { if ( substr ( trim ( $ globPattern ) , 0 , 1 ) === '/' ) { $ globPattern = trim ( substr ( $ globPattern , 1 ) ) ; } elseif ( substr ( trim ( $ globPattern ) , - 1 ) === '/' ) { $ globPattern = trim ( substr ( $ globPattern , 0 , - 1 ) ) ; } else { $ globPattern = '{' . trim ( $ globPattern ) . '}*' ; } $ initialWorkingDirectory = ( string ) getcwd ( ) ; chdir ( $ this -> directory ) ; $ matches = glob ( $ globPattern , GLOB_BRACE ) ; chdir ( $ initialWorkingDirectory ) ; return is_array ( $ matches ) && count ( $ matches ) > 0 ; }
Check if a given pattern produces a match
against the repository directory.

@param  string  $globPattern
@return boolean
Check if a given pattern produces a match against the repository directory .