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

Breadcrumb

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

function SuppressHelper::isSniffSuppressed

16 calls to SuppressHelper::isSniffSuppressed()
DisallowMixedTypeHintSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DisallowMixedTypeHintSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
NullableTypeForNullDefaultValueSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/NullableTypeForNullDefaultValueSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
ParameterTypeHintSniff::checkTraversableTypeHintSpecification in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/ParameterTypeHintSniff.php
*
ParameterTypeHintSniff::checkTypeHints in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/ParameterTypeHintSniff.php
*
ParameterTypeHintSniff::checkUselessAnnotations in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/ParameterTypeHintSniff.php
*

... See full list

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/SuppressHelper.php, line 24

Class

SuppressHelper
@internal

Namespace

SlevomatCodingStandard\Helpers

Code

public static function isSniffSuppressed(File $phpcsFile, int $pointer, string $suppressName) : bool {
    
    /** @var list<Annotation<GenericTagValueNode>> $annotations */
    $annotations = AnnotationHelper::getAnnotations($phpcsFile, $pointer, self::ANNOTATION);
    return array_reduce($annotations, static function (bool $carry, Annotation $annotation) use ($suppressName) : bool {
        $annotationSuppressName = explode(' ', $annotation->getValue()->value)[0];
        if ($suppressName === $annotationSuppressName || strpos($suppressName, sprintf('%s.', $annotationSuppressName)) === 0) {
            $carry = true;
        }
        return $carry;
    }, false);
}

API Navigation

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