/** * {@inheritdoc} * * @see \Contrib\Bundle\CoverallsBundle\Entity\ArrayConvertable::toArray() */ public function toArray() { $remotes = array(); foreach ($this->remotes as $remote) { $remotes[] = $remote->toArray(); } return array('branch' => $this->branch, 'head' => $this->head->toArray(), 'remotes' => $remotes); }