示例#1
0
文件: Json.php 项目: mfn/php-analyzer
 /**
  * @param Report $report
  * @return string
  */
 public function formatReport(Report $report)
 {
     return json_encode($report->toArray(), $this->options);
 }
 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();
 }