function UnusedVariableSniff::findOwnerOfNestedParentheses
2 calls to UnusedVariableSniff::findOwnerOfNestedParentheses()
- UnusedVariableSniff::isAssignment in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Variables/ UnusedVariableSniff.php - UnusedVariableSniff::isUsedInForLoopCondition in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Variables/ UnusedVariableSniff.php
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Variables/ UnusedVariableSniff.php, line 694
Class
Namespace
SlevomatCodingStandard\Sniffs\VariablesCode
private function findOwnerOfNestedParentheses(File $phpcsFile, int $pointer) : ?int {
$tokens = $phpcsFile->getTokens();
$parenthesisOpenerPointer = $this->findOpenerOfNestedParentheses($phpcsFile, $pointer);
if ($parenthesisOpenerPointer === null) {
return null;
}
return array_key_exists('parenthesis_owner', $tokens[$parenthesisOpenerPointer]) ? $tokens[$parenthesisOpenerPointer]['parenthesis_owner'] : null;
}