public static function castFrom(Model\MergeRequest $mr) { $cast = new static($mr->project, $mr->id, $mr->getClient()); foreach (static::$properties as $property) { $cast->{$property} = $mr->{$property}; } return $cast; }
/** * @param int $id * @return MergeRequest */ public function mergeMergeRequest($id) { $mr = new MergeRequest($this, $id, $this->getClient()); return $mr->merge(); }