public function fetchHeadCommitHash () : ?string
    {
        if (!\is_dir("{$this->projectDir}/.git"))
        {
            return null;
        }

        $git = $this->run('command -v git');

        return null !== $git
            ? $this->run("{$git} rev-parse HEAD")
            : null;
    }
public function fetchHeadCommitHash () : ?string
    {
        if (!\is_dir("{$this->projectDir}/.git"))
        {
            return null;
        }

        $git = $this->run('command -v git');

        return null !== $git
            ? $this->run("{$git} rev-parse HEAD")
            : null;
    }
public function fetchHeadCommitHash ( ) : ? string { if ( ! \ is_dir ( "{$this->projectDir}/.git" ) ) { return null ; } $ git = $ this -> run ( 'command -v git' ) ; return null !== $ git ? $ this -> run ( "{$git} rev-parse HEAD" ) : null ; }
Fetches the commit hash of the current HEAD

@return string|null
Fetches the commit hash of the current HEAD