Documentation

Method extends BaseTag
in package
implements StaticMethod

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

Interfaces, Classes, Traits and Enums

StaticMethod

Table of Contents

$description  : Description|null
$name  : string
$arguments  : array<int, array<string, \phpDocumentor\Reflection\Type|string>>
$isStatic  : bool
$methodName  : string
$returnType  : Type
__construct()  : mixed
__toString()  : string
create()  : mixed
getArguments()  : array<int, array<string, \phpDocumentor\Reflection\Type|string>>
getDescription()  : Description|null
getMethodName()  : string
Retrieves the method name.
getName()  : string
Gets the name of this tag.
getReturnType()  : Type
isStatic()  : bool
Checks whether the method tag describes a static method or not.
render()  : string
filterArguments()  : array<string|int, array<string|int, mixed>>
stripRestArg()  : string

Properties

$name

protected string $name = 'method'

$arguments

private array<int, array<string, \phpDocumentor\Reflection\Type|string>> $arguments
Tags
phpstan-var

array<int, array{name: string, type: Type}>

$isStatic

private bool $isStatic

$methodName

private string $methodName

Methods

__construct()

public __construct(string $methodName[, array<int, array<string, \phpDocumentor\Reflection\Type|string>> $arguments = [] ][, Type|null $returnType = null ][, bool $static = false ][, Description|null $description = null ]) : mixed
Parameters
$methodName : string
$arguments : array<int, array<string, \phpDocumentor\Reflection\Type|string>> = []
$returnType : Type|null = null
$static : bool = false
$description : Description|null = null
Tags
phpstan-param

array<int, array{name: string, type: Type}|string> $arguments

Return values
mixed

__toString()

public __toString() : string
Return values
string

getArguments()

public getArguments() : array<int, array<string, \phpDocumentor\Reflection\Type|string>>
Tags
phpstan-return

array<int, array{name: string, type: Type}>

Return values
array<int, array<string, \phpDocumentor\Reflection\Type|string>>

getMethodName()

Retrieves the method name.

public getMethodName() : string
Return values
string

getName()

Gets the name of this tag.

public getName() : string
Return values
string

The name of this tag.

isStatic()

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

public isStatic() : bool
Return values
bool

TRUE if the method declaration is for a static method, FALSE otherwise.

render()

public render([Formatter|null $formatter = null ]) : string
Parameters
$formatter : Formatter|null = null
Return values
string

filterArguments()

private filterArguments([array<string|int, array<string|int, mixed>>|array<string|int, string> $arguments = [] ]) : array<string|int, array<string|int, mixed>>
Parameters
$arguments : array<string|int, array<string|int, mixed>>|array<string|int, string> = []
Tags
phpstan-param

array<int, array{name: string, type: Type}|string> $arguments

phpstan-return

array<int, array{name: string, type: Type}>

Return values
array<string|int, array<string|int, mixed>>

stripRestArg()

private static stripRestArg(string $argument) : string
Parameters
$argument : string
Return values
string

Search results