/** * Creates a new Descriptor from the given Reflector. * * @param VarTag $data * * @return VarDescriptor */ public function create($data) { $descriptor = new VarDescriptor($data->getName()); $descriptor->setDescription($data->getDescription()); $descriptor->setTypes($data->getTypes()); $descriptor->setVariableName($data->getVariableName()); return $descriptor; }
/** * Creates a new Descriptor from the given Reflector. * * @param VarTag $data * * @return VarDescriptor */ public function create($data) { $descriptor = new VarDescriptor($data->getName()); $descriptor->setDescription($data->getDescription()); $descriptor->setVariableName($data->getVariableName()); $types = $this->builder->buildDescriptor(new Collection($data->getVariableName() == '$this' ? array('$this') : $data->getTypes())); $descriptor->setTypes($types); return $descriptor; }