function AbstractLineCondition::isPartOfDo
2 calls to AbstractLineCondition::isPartOfDo()
- AbstractLineCondition::getControlStructureName in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ ControlStructures/ AbstractLineCondition.php - AbstractLineCondition::shouldBeSkipped in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ ControlStructures/ AbstractLineCondition.php
File
-
vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ ControlStructures/ AbstractLineCondition.php, line 97
Class
Namespace
SlevomatCodingStandard\Sniffs\ControlStructuresCode
protected function isPartOfDo(File $phpcsFile, int $whilePointer) : bool {
$tokens = $phpcsFile->getTokens();
$parenthesisCloserPointer = $tokens[$whilePointer]['parenthesis_closer'];
$pointerAfterParenthesisCloser = TokenHelper::findNextEffective($phpcsFile, $parenthesisCloserPointer + 1);
return $tokens[$pointerAfterParenthesisCloser]['code'] !== T_OPEN_CURLY_BRACKET;
}