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

Breadcrumb

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

function ConstantHelper::getAllConstantPointers

*

Return value

Generator<int>

1 call to ConstantHelper::getAllConstantPointers()
ConstantHelper::getAllNames in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/ConstantHelper.php
*

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/ConstantHelper.php, line 65

Class

ConstantHelper
@internal

Namespace

SlevomatCodingStandard\Helpers

Code

private static function getAllConstantPointers(File $phpcsFile, int &$previousConstantPointer) : Generator {
    do {
        $nextConstantPointer = TokenHelper::findNext($phpcsFile, T_CONST, $previousConstantPointer + 1);
        if ($nextConstantPointer === null) {
            break;
        }
        $previousConstantPointer = $nextConstantPointer;
        (yield $nextConstantPointer);
    } while (true);
}

API Navigation

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