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

Breadcrumb

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

function AbstractLineCall::isCall

2 calls to AbstractLineCall::isCall()
RequireMultiLineCallSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/RequireMultiLineCallSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
RequireSingleLineCallSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/RequireSingleLineCallSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/AbstractLineCall.php, line 32

Class

AbstractLineCall

Namespace

SlevomatCodingStandard\Sniffs\Functions

Code

protected function isCall(File $phpcsFile, int $stringPointer) : bool {
    $tokens = $phpcsFile->getTokens();
    $nextPointer = TokenHelper::findNextEffective($phpcsFile, $stringPointer + 1);
    if ($tokens[$nextPointer]['code'] !== T_OPEN_PARENTHESIS) {
        return false;
    }
    $previousPointer = TokenHelper::findPreviousEffective($phpcsFile, $stringPointer - 1);
    return $tokens[$previousPointer]['code'] !== T_FUNCTION;
}

API Navigation

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