function Helpers::getIntOrNull
*
Parameters
int|bool $value: * * @return ?int
7 calls to Helpers::getIntOrNull()
- Helpers::findContainingOpeningSquareBracket in vendor/
sirbrillig/ phpcs-variable-analysis/ VariableAnalysis/ Lib/ Helpers.php - * Find the position of the square bracket containing the token at $stackPtr, * if any. * *
- Helpers::getFunctionIndexForFunctionCallArgument in vendor/
sirbrillig/ phpcs-variable-analysis/ VariableAnalysis/ Lib/ Helpers.php - * Find the index of the function keyword for a token in a function call's arguments * * For the variable `$foo` in the expression `doSomething($foo)`, this will * return the index of the `doSomething` token. * *
- Helpers::getFunctionIndexForFunctionParameter in vendor/
sirbrillig/ phpcs-variable-analysis/ VariableAnalysis/ Lib/ Helpers.php - * Find the index of the function keyword for a token in a function * definition's parameters. * * Does not work for tokens inside the "use". * * Will also work for the parenthesis that make up the function definition's …
- Helpers::getUseIndexForUseImport in vendor/
sirbrillig/ phpcs-variable-analysis/ VariableAnalysis/ Lib/ Helpers.php - * Find the token index of the "use" for a token inside a function use import * *
- Helpers::isVariableArrayPushShortcut in vendor/
sirbrillig/ phpcs-variable-analysis/ VariableAnalysis/ Lib/ Helpers.php - *
File
-
vendor/
sirbrillig/ phpcs-variable-analysis/ VariableAnalysis/ Lib/ Helpers.php, line 35
Class
Namespace
VariableAnalysis\LibCode
public static function getIntOrNull($value) {
return is_int($value) ? $value : null;
}