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

Breadcrumb

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

function UseStatementHelper::isGroupUse

1 call to UseStatementHelper::isGroupUse()
UseStatementHelper::getUseStatementPointers in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/UseStatementHelper.php
* Searches for all use statements in a file, skips bodies of classes and traits. * *

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/UseStatementHelper.php, line 262

Class

UseStatementHelper
@internal

Namespace

SlevomatCodingStandard\Helpers

Code

private static function isGroupUse(File $phpcsFile, int $usePointer) : bool {
    $tokens = $phpcsFile->getTokens();
    $semicolonOrGroupUsePointer = TokenHelper::findNext($phpcsFile, [
        T_SEMICOLON,
        T_OPEN_USE_GROUP,
    ], $usePointer + 1);
    return $tokens[$semicolonOrGroupUsePointer]['code'] === T_OPEN_USE_GROUP;
}

API Navigation

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