/** * @return Parameter[] * @throws \Exception */ public function parameters() { $parameters = []; foreach ($this->reader->readInterface() as $property) { if ($property->canSet()) { $parameters[] = (new Parameter($property->name(), $property->type(), $property->isRequired()))->setDescription($this->parser->parse($property->comment())); } } return $parameters; }
/** * @return Parameter[] */ public function parameters() { $analyzer = new MethodAnalyzer($this->method); $parameters = []; foreach ($this->method->getParameters() as $parameter) { $type = $analyzer->getType($parameter, $this->types); $parameters[] = (new Parameter($parameter->name, $type, !$parameter->isDefaultValueAvailable()))->setDescription($this->parser->parse($analyzer->getComment($parameter))); } return $parameters; }
public function parse($comment) { if (class_exists(\Parsedown::class)) { return (new \Parsedown())->text($comment); } return nl2br(parent::parse($comment)); }