public function report() { $msg = 'Class ' . $this->class->getName() . ' misses the following interface method'; if (count($this->methods) > 1) { $msg .= 's'; } $msg .= ': '; $lastInterface = NULL; $msg .= join(', ', array_map(function (ParsedMethod $cam) use(&$lastInterface) { $str = ''; if ($lastInterface !== $cam->getInterface()) { $lastInterface = $cam->getInterface(); $str .= $cam->getInterface()->getName(); } return $str . '::' . $cam->getMethod()->name . '()'; }, $this->methods)); return $msg; }
public function toArray() { return ['class' => $this->class->getName(), 'methods' => array_map(function (ParsedMethod $cam) { return $cam->getClass()->getName() . '::' . $cam->getMethod()->name . '()'; }, $this->methods)] + parent::toArray(); }