lib/GitData.php
static function fromJson(object $map): self {
    return new static(
      isset($map->head) && is_object($map->head) ? GitCommit::fromJson($map->head) : null,
      isset($map->branch) && is_string($map->branch) ? $map->branch : '',
      isset($map->remotes) && is_array($map->remotes) ? array_map([GitRemote::class, 'fromJson'], $map->remotes) : []
    );
  }
static function fromJson(object $map): self {
    return new static(
      isset($map->head) && is_object($map->head) ? GitCommit::fromJson($map->head) : null,
      isset($map->branch) && is_string($map->branch) ? $map->branch : '',
      isset($map->remotes) && is_array($map->remotes) ? array_map([GitRemote::class, 'fromJson'], $map->remotes) : []
    );
  }
static function fromJson ( object $ map ) : self { return new static ( isset ( $ map -> head ) && is_object ( $ map -> head ) ? GitCommit :: fromJson ( $ map -> head ) : null , isset ( $ map -> branch ) && is_string ( $ map -> branch ) ? $ map -> branch : '' , isset ( $ map -> remotes ) && is_array ( $ map -> remotes ) ? array_map ( [ GitRemote :: class , 'fromJson' ] , $ map -> remotes ) : [ ] ) ; }
Creates a new Git data from the specified JSON map.
@param object $map A JSON map representing a Git data.
@return static The instance corresponding to the specified JSON map.
Creates a new Git data from the specified JSON map .