Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractLineCondition.php

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

AbstractLineCondition

Namespace

SlevomatCodingStandard\Sniffs\ControlStructures

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal