CallFinder
in package
Table of Contents
- $ignore : mixed
- $operator : mixed
- Things we need to do specially for operator tokens: - Refuse to strip spaces around them - Wrap the access path in parentheses if there are any of these in the final short parameter.
- $strip : mixed
- getFunctionCalls() : mixed
- realTokenIndex() : mixed
- tokenIsOperator() : bool
- We need a separate method to check if tokens are operators because we occasionally add "..." to short parameter versions. If we simply check for `$token[0]` then "..." will incorrectly match the "." operator.
- tokensFormatted() : mixed
- tokensToString() : mixed
- tokensTrim() : mixed
Properties
$ignore
private
static mixed
$ignore
= array(T_CLOSE_TAG => true, T_COMMENT => true, T_DOC_COMMENT => true, T_INLINE_HTML => true, T_OPEN_TAG => true, T_OPEN_TAG_WITH_ECHO => true, T_WHITESPACE => true)
$operator
Things we need to do specially for operator tokens: - Refuse to strip spaces around them - Wrap the access path in parentheses if there are any of these in the final short parameter.
private
static mixed
$operator
= array(T_AND_EQUAL => true, T_BOOLEAN_AND => true, T_BOOLEAN_OR => true, T_ARRAY_CAST => true, T_BOOL_CAST => true, T_CLONE => true, T_CONCAT_EQUAL => true, T_DEC => true, T_DIV_EQUAL => true, T_DOUBLE_CAST => true, T_INC => true, T_INCLUDE => true, T_INCLUDE_ONCE => true, T_INSTANCEOF => true, T_INT_CAST => true, T_IS_EQUAL => true, T_IS_GREATER_OR_EQUAL => true, T_IS_IDENTICAL => true, T_IS_NOT_EQUAL => true, T_IS_NOT_IDENTICAL => true, T_IS_SMALLER_OR_EQUAL => true, T_LOGICAL_AND => true, T_LOGICAL_OR => true, T_LOGICAL_XOR => true, T_MINUS_EQUAL => true, T_MOD_EQUAL => true, T_MUL_EQUAL => true, T_NEW => true, T_OBJECT_CAST => true, T_OR_EQUAL => true, T_PLUS_EQUAL => true, T_REQUIRE => true, T_REQUIRE_ONCE => true, T_SL => true, T_SL_EQUAL => true, T_SR => true, T_SR_EQUAL => true, T_STRING_CAST => true, T_UNSET_CAST => true, T_XOR_EQUAL => true, '!' => true, '%' => true, '&' => true, '*' => true, '+' => true, '-' => true, '.' => true, '/' => true, ':' => true, '<' => true, '=' => true, '>' => true, '?' => true, '^' => true, '|' => true, '~' => true)
$strip
private
static mixed
$strip
= array('(' => true, ')' => true, '[' => true, ']' => true, '{' => true, '}' => true, T_OBJECT_OPERATOR => true, T_DOUBLE_COLON => true, T_NS_SEPARATOR => true)
Methods
getFunctionCalls()
public
static getFunctionCalls(mixed $source, mixed $line, mixed $function) : mixed
Parameters
- $source : mixed
- $line : mixed
- $function : mixed
Return values
mixed —realTokenIndex()
private
static realTokenIndex(array<string|int, mixed> $tokens, mixed $index) : mixed
Parameters
- $tokens : array<string|int, mixed>
- $index : mixed
Return values
mixed —tokenIsOperator()
We need a separate method to check if tokens are operators because we occasionally add "..." to short parameter versions. If we simply check for `$token[0]` then "..." will incorrectly match the "." operator.
private
static tokenIsOperator(array<string|int, mixed>|string $token) : bool
Parameters
- $token : array<string|int, mixed>|string
-
The token to check
Return values
bool —tokensFormatted()
private
static tokensFormatted(array<string|int, mixed> $tokens) : mixed
Parameters
- $tokens : array<string|int, mixed>
Return values
mixed —tokensToString()
private
static tokensToString(array<string|int, mixed> $tokens) : mixed
Parameters
- $tokens : array<string|int, mixed>
Return values
mixed —tokensTrim()
private
static tokensTrim(array<string|int, mixed> $tokens) : mixed
Parameters
- $tokens : array<string|int, mixed>