예제 #1
0
 public function createFromData($data)
 {
     parent::createFromData($data);
     $this->forkedRepository = Repository::createFromData($data['forkee']);
     $this->owner = $this->forkedRepository->getOwner();
     $this->forker = $this->repository->getOwner();
     return $this;
 }
 public function createFromData($data)
 {
     $this->data = $data;
     try {
         $this->repository = Repository::createFromData($data['repository']);
     } catch (\Exception $e) {
         throw new RepositoryNotFoundException($e->getMessage());
     }
 }
 public function createFromData($data)
 {
     parent::createFromData($data);
     $this->action = $data['action'];
     $this->number = $data['number'];
     $this->pullRequest = PullRequest::createFromData($data['pull_request']);
     $this->repository = Repository::createFromData($data['repository']);
     $this->sender = User::createFromData($data['sender']);
     return $this;
 }
 public function createFromData($data)
 {
     parent::createFromData($data);
     $this->action = $data['action'];
     $this->assignee = isset($data['assignee']) ? User::createFromData($data['assignee']) : null;
     $this->label = isset($data['label']) ? Label::createFromData($data['label']) : null;
     $this->issue = Issue::createFromData($data['issue']);
     $this->repository = Repository::createFromData($data['repository']);
     $this->sender = User::createFromData($data['sender']);
     return $this;
 }