예제 #1
0
 /**
  * @return array
  */
 public function toGitHubApiDataArray()
 {
     $data = array('body' => $this->body);
     if (TRUE === $this->commit instanceof Commit) {
         if (NULL !== $this->path) {
             $data['commit_id'] = $this->commit->getId();
             $data['path'] = $this->path;
             $data['position'] = $this->position;
         }
     } elseif (TRUE === $this->pullRequest instanceof PullRequest) {
         $data['sha1'] = $this->pullRequest->getId();
     }
     return $data;
 }