src/Model/Git/Ref.php
public function getCommit()
    {
        $data = $this->object;
        if ($data['type'] !== 'commit') {
            throw new \RuntimeException('This ref is not a commit');
        }
        $url = Project::getProjectBaseFromUrl($this->getUri()) . '/git/commits';

        return Commit::get($data['sha'], $url, $this->client);
    }
public function getCommit()
    {
        $data = $this->object;
        if ($data['type'] !== 'commit') {
            throw new \RuntimeException('This ref is not a commit');
        }
        $url = Project::getProjectBaseFromUrl($this->getUri()) . '/git/commits';

        return Commit::get($data['sha'], $url, $this->client);
    }
public function getCommit ( ) { $ data = $ this -> object ; if ( $ data [ 'type' ] !== 'commit' ) { throw new \ RuntimeException ( 'This ref is not a commit' ) ; } $ url = Project :: getProjectBaseFromUrl ( $ this -> getUri ( ) ) . '/git/commits' ; return Commit :: get ( $ data [ 'sha' ] , $ url , $ this -> client ) ; }
Get the commit for this ref.

@return Commit|false
Get the commit for this ref .