public function getGitVersion()
    {
        try {
            return $this->getGitTag();
        } catch (RuntimeException $exception) {
            try {
                return $this->getGitHash(true);
            } catch (RuntimeException $exception) {
                throw new RuntimeException(
                    sprintf(
                        'The tag or commit hash could not be retrieved from "%s": %s',
                        dirname($this->file),
                        $exception->getMessage()
                    ),
                    0,
                    $exception
                );
            }
        }
    }
public function getGitVersion()
    {
        try {
            return $this->getGitTag();
        } catch (RuntimeException $exception) {
            try {
                return $this->getGitHash(true);
            } catch (RuntimeException $exception) {
                throw new RuntimeException(
                    sprintf(
                        'The tag or commit hash could not be retrieved from "%s": %s',
                        dirname($this->file),
                        $exception->getMessage()
                    ),
                    0,
                    $exception
                );
            }
        }
    }
public function getGitVersion ( ) { try { return $ this -> getGitTag ( ) ; } catch ( RuntimeException $ exception ) { try { return $ this -> getGitHash ( true ) ; } catch ( RuntimeException $ exception ) { throw new RuntimeException ( sprintf ( 'The tag or commit hash could not be retrieved from "%s": %s' , dirname ( $ this -> file ) , $ exception -> getMessage ( ) ) , 0 , $ exception ) ; } } }
Returns the Git tag name or short commit hash.

@return string The tag name or short commit hash.

@throws RuntimeException If the version could not be retrieved.
Returns the Git tag name or short commit hash .