Documentation

ValidFunctionNamePass extends NamespaceAwarePass
in package

Validate that function calls will succeed.

This pass throws a FatalErrorException rather than letting PHP run headfirst into a real fatal error and die.

Table of Contents

$currentScope  : mixed
$namespace  : mixed
$conditionalScopes  : mixed
afterTraverse()  : null|array<string|int, Node>
Called once after traversal.
beforeTraverse()  : null|array<string|int, Node>
Called once before traversal.
enterNode()  : mixed
Store newly defined function names on the way in, to allow recursion.
leaveNode()  : mixed
Validate that function calls will succeed.
getFullyQualifiedName()  : string
Get a fully-qualified name (class, function, interface, etc).
isConditional()  : mixed

Properties

Methods

afterTraverse()

Called once after traversal.

public afterTraverse(array<string|int, mixed> $nodes) : null|array<string|int, Node>

Return value semantics:

  • null: $nodes stays as-is
  • otherwise: $nodes is set to the return value
Parameters
$nodes : array<string|int, mixed>

Array of nodes

Return values
null|array<string|int, Node>

Array of nodes

beforeTraverse()

Called once before traversal.

public beforeTraverse(array<string|int, mixed> $nodes) : null|array<string|int, Node>

Return value semantics:

  • null: $nodes stays as-is
  • otherwise: $nodes is set to the return value
Parameters
$nodes : array<string|int, mixed>

Array of nodes

Return values
null|array<string|int, Node>

Array of nodes

enterNode()

Store newly defined function names on the way in, to allow recursion.

public enterNode(Node $node) : mixed
Parameters
$node : Node
Return values
mixed

getFullyQualifiedName()

Get a fully-qualified name (class, function, interface, etc).

protected getFullyQualifiedName(mixed $name) : string
Parameters
$name : mixed
Return values
string

Search results