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

Breadcrumb

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

function EarlyExitSniff::getScopeCode

1 call to EarlyExitSniff::getScopeCode()
EarlyExitSniff::processElse in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/EarlyExitSniff.php

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/EarlyExitSniff.php, line 364

Class

EarlyExitSniff

Namespace

SlevomatCodingStandard\Sniffs\ControlStructures

Code

private function getScopeCode(File $phpcsFile, int $scopePointer) : string {
    $tokens = $phpcsFile->getTokens();
    return TokenHelper::getContent($phpcsFile, $tokens[$scopePointer]['scope_opener'] + 1, $tokens[$scopePointer]['scope_closer'] - 1);
}

API Navigation

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