Copied!

Reflection class for an {@}method in a Docblock.

CloneableFinalInstantiable
Methods
public __construct(string $methodName, array $arguments = [], ?phpDocumentor\Reflection\Type $returnType = NULL, bool $static = false, ?phpDocumentor\Reflection\DocBlock\Description $description = NULL, bool $returnsReference = false, ?array $parameters = NULL)
 
  • param array<int,array<string,\Type|string>> $arguments
  • param \MethodParameter[] $parameters
  • phpstan-param array<int, array{name: string, type: Type}|string> $arguments
public __toString() : string
public static create(string $body, ?phpDocumentor\Reflection\TypeResolver $typeResolver = NULL, ?phpDocumentor\Reflection\DocBlock\DescriptionFactory $descriptionFactory = NULL, ?phpDocumentor\Reflection\Types\Context $context = NULL) : ?self
 
  • deprecated Create using static factory is deprecated, this method should not be called directly by library consumers
public getArguments() : array
 
  • deprecated Method deprecated, use {@see \self::getParameters()}
  • return array<int,array<string,\Type|string>>
  • phpstan-return array<int, array{name: string, type: Type}>
public phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription() : ?phpDocumentor\Reflection\DocBlock\Description
public getMethodName() : string
 

Retrieves the method name.

public phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName() : string
 

Gets the name of this tag.

  • return string The name of this tag.
public getParameters() : array
 
  • return \MethodParameter[]
public getReturnType() : phpDocumentor\Reflection\Type
public isStatic() : bool
 

Checks whether the method tag describes a static method or not.

  • return bool TRUE if the method declaration is for a static method, FALSE otherwise.
public phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render(?phpDocumentor\Reflection\DocBlock\Tags\Formatter $formatter = NULL) : string
public returnsReference() : bool
Properties
protected ?phpDocumentor\Reflection\DocBlock\Description phpDocumentor\Reflection\DocBlock\Tags\BaseTag::$description = NULL
 
  • var \Description|null Description of the tag.
protected string $name = 'method'
Properties
private bool $isStatic
private string $methodName
private array $parameters
 
  • var \MethodParameter[]
private bool $returnsReference
private phpDocumentor\Reflection\Type $returnType
Methods
private filterArguments(array $arguments = []) : array
 
  • param array[]|string[] $arguments
  • phpstan-param array<int, array{name: string, type: Type}|string> $arguments
  • return array[]
  • phpstan-return array<int, array{name: string, type: Type}>
private fromLegacyArguments(array $arguments) : array
 
  • param array{name: string, type: \Type} $arguments
  • phpstan-param array<int, array{name: string, type: Type}> $arguments
  • return \MethodParameter[]
private static stripRestArg(string $argument) : string
Methods
public static create(string $body, ?phpDocumentor\Reflection\TypeResolver $typeResolver = NULL, ?phpDocumentor\Reflection\DocBlock\DescriptionFactory $descriptionFactory = NULL, ?phpDocumentor\Reflection\Types\Context $context = NULL) : ?self
 
  • deprecated Create using static factory is deprecated, this method should not be called directly by library consumers
private static stripRestArg(string $argument) : string
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration