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

Breadcrumb

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

function AbstractLineCondition::getControlStructureName

2 calls to AbstractLineCondition::getControlStructureName()
RequireMultiLineConditionSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/RequireMultiLineConditionSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
RequireSingleLineConditionSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/RequireSingleLineConditionSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/AbstractLineCondition.php, line 88

Class

AbstractLineCondition

Namespace

SlevomatCodingStandard\Sniffs\ControlStructures

Code

protected function getControlStructureName(File $phpcsFile, int $controlStructurePointer) : string {
    $tokens = $phpcsFile->getTokens();
    return $tokens[$controlStructurePointer]['code'] === T_WHILE && $this->isPartOfDo($phpcsFile, $controlStructurePointer) ? 'do-while' : $tokens[$controlStructurePointer]['content'];
}

API Navigation

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