PHP Трейт Psecio\Parse\Rule\Helper\IsFunctionCallTrait

Показать файл Открыть проект

Защищенные методы

Метод Описание
countCalledFunctionArguments ( PhpParser\Node $node ) : integer Count the arguments of called function
getCalledFunctionArgument ( PhpParser\Node $node, integer $index ) : PhpParser\Node\Arg Get argument of called function
getCalledFunctionName ( PhpParser\Node $node ) : string Get name of called function
isFunctionCall ( PhpParser\Node $node, string | string[] $names = '' ) : boolean Check if $node is a function call

Описание методов

countCalledFunctionArguments() защищенный Метод

Count the arguments of called function
protected countCalledFunctionArguments ( PhpParser\Node $node ) : integer
$node PhpParser\Node
Результат integer

getCalledFunctionArgument() защищенный Метод

Get argument of called function
protected getCalledFunctionArgument ( PhpParser\Node $node, integer $index ) : PhpParser\Node\Arg
$node PhpParser\Node
$index integer Index of argument to fetch
Результат PhpParser\Node\Arg If argument is not found an empty string is returned

getCalledFunctionName() защищенный Метод

Get name of called function
protected getCalledFunctionName ( PhpParser\Node $node ) : string
$node PhpParser\Node
Результат string Empty string if name could not be parsed

isFunctionCall() защищенный Метод

Check for name too if provided
protected isFunctionCall ( PhpParser\Node $node, string | string[] $names = '' ) : boolean
$node PhpParser\Node
$names string | string[] One or more function names to search for
Результат boolean