/**
  * Creates a new Descriptor from the given Reflector.
  *
  * @param ParamTag $data
  *
  * @return ParamDescriptor
  */
 public function create($data)
 {
     $descriptor = new ParamDescriptor($data->getName());
     $descriptor->setDescription($data->getDescription());
     $descriptor->setVariableName($data->getVariableName());
     $descriptor->setTypes($data->getTypes());
     return $descriptor;
 }
 /**
  * Overwrites the type and description in the Argument Descriptor with that from the tag if the names match.
  *
  * @param ArgumentReflector  $argument
  * @param ParamDescriptor    $paramDescriptor
  * @param ArgumentDescriptor $argumentDescriptor
  *
  * @return void
  */
 protected function overwriteTypeAndDescriptionFromParamTag(ArgumentReflector $argument, ParamDescriptor $paramDescriptor, ArgumentDescriptor $argumentDescriptor)
 {
     if ($paramDescriptor->getVariableName() != $argument->getName()) {
         return;
     }
     $argumentDescriptor->setDescription($paramDescriptor->getDescription());
     $argumentDescriptor->setTypes($paramDescriptor->getTypes() ?: $this->builder->buildDescriptor(new Collection(array($argument->getType() ?: 'mixed'))));
 }
 /**
  * Creates a new Descriptor from the given Reflector.
  *
  * @param ParamTag $data
  *
  * @return ParamDescriptor
  */
 public function create($data)
 {
     $descriptor = new ParamDescriptor($data->getName());
     $descriptor->setDescription($data->getDescription());
     $descriptor->setVariableName($data->getVariableName());
     /** @var Collection $types */
     $types = $this->builder->buildDescriptor(new Collection($data->getTypes()));
     $descriptor->setTypes($types);
     return $descriptor;
 }