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

Breadcrumb

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

function DisallowNullSafeObjectOperatorSniff::process

* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

Parameters

int $operatorPointer:

Overrides Sniff::process

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/ControlStructures/DisallowNullSafeObjectOperatorSniff.php, line 28

Class

DisallowNullSafeObjectOperatorSniff

Namespace

SlevomatCodingStandard\Sniffs\ControlStructures

Code

public function process(File $phpcsFile, $operatorPointer) : void {
    $phpcsFile->addError('Operator ?-> is disallowed.', $operatorPointer, self::CODE_DISALLOWED_NULL_SAFE_OBJECT_OPERATOR);
}
RSS feed
Powered by Drupal