Пример #1
0
 public static function castFrom(Model\Issue $issue)
 {
     $cast = new static($issue->project, $issue->id, $issue->getClient());
     foreach (static::$properties as $property) {
         $cast->{$property} = $issue->{$property};
     }
     return $cast;
 }
Пример #2
0
 /**
  * @param int $id
  * @return Issue
  */
 public function openIssue($id)
 {
     $issue = new Issue($this, $id, $this->getClient());
     return $issue->open();
 }
Пример #3
0
 /**
  * @return Issue[]
  */
 public function issues()
 {
     $data = $this->api('milestones')->issues($this->project->id, $this->id);
     $issues = array();
     foreach ($data as $issue) {
         $issues[] = Issue::fromArray($this->getClient(), $this->project, $issue);
     }
     return $issues;
 }