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

Breadcrumb

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

function TokenHelper::getContent

68 calls to TokenHelper::getContent()
AbstractControlStructureSpacing::checkLinesBefore in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/AbstractControlStructureSpacing.php
AbstractLineCall::getLineEnd in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/AbstractLineCall.php
AbstractLineCall::getLineStart in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/AbstractLineCall.php
AbstractLineCondition::getCondition in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/AbstractLineCondition.php
AbstractLineCondition::getLineEnd in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/AbstractLineCondition.php

... See full list

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/TokenHelper.php, line 454

Class

TokenHelper
@internal

Namespace

SlevomatCodingStandard\Helpers

Code

public static function getContent(File $phpcsFile, int $startPointer, ?int $endPointer = null) : string {
    $tokens = $phpcsFile->getTokens();
    $endPointer = $endPointer ?? self::getLastTokenPointer($phpcsFile);
    $content = '';
    for ($i = $startPointer; $i <= $endPointer; $i++) {
        $content .= $tokens[$i]['content'];
    }
    return $content;
}

API Navigation

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