phpDocumentor\Reflection\DocBlock\Tag\ParamTag::setVariableName PHP Method

setVariableName() public method

Sets the variable's name.
public setVariableName ( string $name )
$name string The new name for this variable.
    public function setVariableName($name)
    {
        $this->variableName = $name;
        $this->content = null;
        return $this;
    }

Usage Example

 /**
  * Validates whether the name of the argument is the same as that of the
  * param tag.
  *
  * If the param tag does not contain a name then this method will set it
  * based on the argument.
  *
  * @param \phpDocumentor\Reflection\DocBlock\Tag\ParamTag $param    param to
  *     validate with.
  * @param \phpDocumentor\Reflection\FunctionReflector\ArgumentReflector $argument Argument
  *     to validate against.
  *
  * @return bool whether an issue occurred
  */
 protected function doesArgumentNameMatchParam(\phpDocumentor\Reflection\DocBlock\Tag\ParamTag $param, \phpDocumentor\Reflection\FunctionReflector\ArgumentReflector $argument)
 {
     $param_name = $param->getVariableName();
     if ($param_name == $argument->getName()) {
         return true;
     }
     if ($param_name == '') {
         $param->setVariableName($argument->getName());
         return false;
     }
     $this->logParserError('ERROR', 50014, $this->lineNumber, array($argument->getName(), $param_name, $this->entityName . '()'));
     return false;
 }
All Usage Examples Of phpDocumentor\Reflection\DocBlock\Tag\ParamTag::setVariableName