lib/GitCommit.php
static function fromJson(object $map): self {
    return (new static(isset($map->id) && is_string($map->id) ? $map->id : '', isset($map->message) && is_string($map->message) ? $map->message : ''))
      ->setAuthorEmail(isset($map->author_email) && is_string($map->author_email) ? $map->author_email : '')
      ->setAuthorName(isset($map->author_name) && is_string($map->author_name) ? $map->author_name : '')
      ->setCommitterEmail(isset($map->committer_email) && is_string($map->committer_email) ? $map->committer_email : '')
      ->setCommitterName(isset($map->committer_name) && is_string($map->committer_name) ? $map->committer_name : '');
  }
static function fromJson(object $map): self {
    return (new static(isset($map->id) && is_string($map->id) ? $map->id : '', isset($map->message) && is_string($map->message) ? $map->message : ''))
      ->setAuthorEmail(isset($map->author_email) && is_string($map->author_email) ? $map->author_email : '')
      ->setAuthorName(isset($map->author_name) && is_string($map->author_name) ? $map->author_name : '')
      ->setCommitterEmail(isset($map->committer_email) && is_string($map->committer_email) ? $map->committer_email : '')
      ->setCommitterName(isset($map->committer_name) && is_string($map->committer_name) ? $map->committer_name : '');
  }
static function fromJson ( object $ map ) : self { return ( new static ( isset ( $ map -> id ) && is_string ( $ map -> id ) ? $ map -> id : '' , isset ( $ map -> message ) && is_string ( $ map -> message ) ? $ map -> message : '' ) ) -> setAuthorEmail ( isset ( $ map -> author_email ) && is_string ( $ map -> author_email ) ? $ map -> author_email : '' ) -> setAuthorName ( isset ( $ map -> author_name ) && is_string ( $ map -> author_name ) ? $ map -> author_name : '' ) -> setCommitterEmail ( isset ( $ map -> committer_email ) && is_string ( $ map -> committer_email ) ? $ map -> committer_email : '' ) -> setCommitterName ( isset ( $ map -> committer_name ) && is_string ( $ map -> committer_name ) ? $ map -> committer_name : '' ) ; }
Creates a new Git commit from the specified JSON map.
@param object $map A JSON map representing a Git commit.
@return static The instance corresponding to the specified JSON map.
Creates a new Git commit from the specified JSON map .