function IdentificatorHelper::getEndPointerAfterOperator
2 calls to IdentificatorHelper::getEndPointerAfterOperator()
- IdentificatorHelper::findEndPointer in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Helpers/ IdentificatorHelper.php - IdentificatorHelper::getEndPointerAfterVariablePart in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Helpers/ IdentificatorHelper.php
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Helpers/ IdentificatorHelper.php, line 179
Class
- IdentificatorHelper
- @internal
Namespace
SlevomatCodingStandard\HelpersCode
private static function getEndPointerAfterOperator(File $phpcsFile, int $operatorPointer) : int {
$tokens = $phpcsFile->getTokens();
/** @var int $nextPointer */
$nextPointer = TokenHelper::findNextEffective($phpcsFile, $operatorPointer + 1);
if ($tokens[$nextPointer]['code'] === T_DOLLAR) {
/** @var int $nextPointer */
$nextPointer = TokenHelper::findNextEffective($phpcsFile, $nextPointer + 1);
}
if ($tokens[$nextPointer]['code'] === T_OPEN_CURLY_BRACKET) {
return self::getEndPointerAfterVariablePart($phpcsFile, $tokens[$nextPointer]['bracket_closer']);
}
return self::getEndPointerAfterVariablePart($phpcsFile, $nextPointer);
}