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

Breadcrumb

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

function ModernClassNameReferenceSniff::process

* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

Parameters

int $pointer:

Overrides Sniff::process

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Classes/ModernClassNameReferenceSniff.php, line 48

Class

ModernClassNameReferenceSniff

Namespace

SlevomatCodingStandard\Sniffs\Classes

Code

public function process(File $phpcsFile, $pointer) : void {
    $this->enableOnObjects = SniffSettingsHelper::isEnabledByPhpVersion($this->enableOnObjects, 80000);
    $tokens = $phpcsFile->getTokens();
    if ($tokens[$pointer]['code'] === T_CLASS_C) {
        $this->checkMagicConstant($phpcsFile, $pointer);
        return;
    }
    $this->checkFunctionCall($phpcsFile, $pointer);
}
RSS feed
Powered by Drupal