/** * Set class file description. * * @param array $description Collection of class file description lines * * @return ClassGenerator */ public function defDescription(array $description) : ClassGenerator { $commentsGenerator = new CommentsGenerator($this); foreach ($description as $line) { $commentsGenerator->defLine($line); } $this->fileDescription = $commentsGenerator->code(); return $this; }
/** * {@inheritdoc} */ public function code(int $indentation = 0) : string { // Add parameters comments foreach ($this->arguments as $argument => $type) { $this->defParam($argument, $type, $this->descriptions[$argument] ?? ''); } return parent::code($indentation); }