Example #1
0
 /**
  * Constructor.
  *
  * @param \Wingu\OctopusCore\Reflection\Annotation\AnnotationDefinition $definition The annotation definition.
  * @throws \Wingu\OctopusCore\Reflection\Annotation\Exceptions\InvalidArgumentException If the definition is not valid.
  */
 public function __construct(AnnotationDefinition $definition)
 {
     if ($definition->getTag() !== 'var') {
         throw new InvalidArgumentException('The definition tag must be "var".');
     }
     parent::__construct($definition);
 }
Example #2
0
 /**
  * Initialize the annotation tag.
  */
 protected function initTag()
 {
     $this->tagName = $this->definition->getTag();
     $description = trim($this->definition->getDescription());
     if ($description !== '') {
         $this->description = trim($this->definition->getDescription());
     }
 }