/** * 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); }
/** * 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()); } }