예제 #1
0
 /**
  * @param \ReflectionClass|\ReflectionMethod $reflection
  * @param DocInfo $docInfo
  * @param CodeEntity $code
  */
 public function applyInfoToEntity($reflection, DocInfo $docInfo, CodeEntity $code)
 {
     $code->setName($reflection->getName());
     $code->setDescription($docInfo->getDescription());
     $code->setExample($docInfo->getExample());
     if ($docInfo->getDeprecationMessage()) {
         $code->isDeprecated(true);
         $code->setDeprecationMessage($docInfo->getDeprecationMessage());
     }
 }
 /**
  * @param string $name
  */
 function setName($name)
 {
     parent::setName(self::sanitizeClassName($name));
 }
예제 #3
0
 /**
  * @param string $name
  */
 function setName($name)
 {
     parent::setName(Utils::sanitizeClassName($name));
 }
 /**
  * @param \ReflectionClass|\ReflectionMethod $reflection
  * @param CodeEntity $code
  * @return array
  */
 private function createEntity($reflection, $code)
 {
     $comment = $this->getCleanDocComment($reflection);
     $tags = $this->extractTagsFromComment($comment, 'description', $reflection);
     $code->setName($reflection->getName());
     $code->setDescription(!empty($tags['description']) ? $tags['description'] : '');
     $code->setExample(!empty($tags['example']) ? $tags['example'] : '');
     if (!empty($tags['deprecated'])) {
         $code->isDeprecated(true);
         $code->setDeprecationMessage($tags['deprecated']);
     }
     return $tags;
 }