BetterReflection\Reflection\ReflectionParameter::getName PHP Method

getName() public method

Get the name of the parameter.
public getName ( ) : string
return string
    public function getName()
    {
        return $this->node->name;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @return string
  */
 public function getDescription()
 {
     $docBlock = new DocBlock($this->reflectionParameter->getDeclaringFunction()->getDocComment());
     /** @var \phpDocumentor\Reflection\DocBlock\Tag\ParamTag[] $paramTags */
     $paramTags = $docBlock->getTagsByName('param');
     foreach ($paramTags as $paramTag) {
         if ($paramTag->getVariableName() === '$' . $this->reflectionParameter->getName()) {
             $lines = Multiline::create($paramTag->getDescription());
             $lines->apply('ltrim');
             return (string) $lines;
         }
     }
     return '';
 }
All Usage Examples Of BetterReflection\Reflection\ReflectionParameter::getName