Skip to content

MethodDoc

One method, as documented on the page of the class that declares it.

final class MethodDoc

SourceIr/MethodDoc.php
PropertyTypeDescription
$abstractboolreadonly.
$docDocBlockreadonly.
$finalboolreadonly.
$fromTrait?``stringreadonly.
$namestringreadonly.
$parametersarrayreadonly.
$returnTypeTypeRefreadonly.
$staticboolreadonly.
$visibilitystringreadonly.

public function __construct(string $name, list<ParamDoc> $parameters, TypeRef $returnType, DocBlock $doc, 'public'|'protected' $visibility = 'public', bool $static = false, bool $abstract = false, bool $final = false, string|null $fromTrait = null): mixed

Fully-qualified trait this method was composed in from, if any.

ParameterTypeDescription
$namestring
$parameterslist``<ParamDoc>
$returnTypeTypeRef
$docDocBlock
$visibility`‘public’““‘protected’`
$staticbool
$abstractbool
$finalbool
$fromTrait`string““null`

Returns mixed

MethodDescription
shortSignature(): stringThe compact form used in an at-a-glance table, without modifiers.
signature(): stringThe full signature line.

public function shortSignature(): string

The compact form used in an at-a-glance table, without modifiers.

Returns string

public function signature(): string

The full signature line.

Modifiers are included because they are part of what a caller needs to know: a static method is called differently, and an abstract one has to be implemented.

Returns string