Skip to content
Snippets Groups Projects
Select Git revision
  • 2.0.x
  • 3525775-computed-entity-ref
  • 3519543-bug--sample-entity
  • 8.x-1.x
  • previous/3525775-computed-entity-ref/2025-06-13
  • previous/3525775-computed-entity-ref/2025-06-10-1
  • previous/3525775-computed-entity-ref/2025-06-10
  • previous/3525775-computed-entity-ref/2025-05-27-1
  • previous/3525775-computed-entity-ref/2025-05-27
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 2.0.0-rc2
  • 2.0.0-rc1
  • 2.0.0-beta6
  • 2.0.0-beta5
  • 2.0.0-beta4
  • 8.x-1.10
  • 2.0.0-beta3
  • 2.0.0-beta2
  • previous/3461566-2.0.0-beta2-ux-slots/2024-09-09-1
  • previous/3469814-2.0.0-beta2-kernel-source/2024-09-05
  • previous/3470386--2.0.0-beta2-render/2024-08-26
24 results

phpstan.neon

Blame
  • Forked from project / ui_patterns
    19 commits behind the upstream repository.
    Misha Lavrenchuk's avatar
    Issue #3506207 by reinfate, pdureau, grimreaper, smustgrave: [2.0.4] PHPSTAN next minor warnings
    Misha Lavrenchuk authored and Florent Torregrosa committed
    5c0b47e9
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    phpstan.neon 3.28 KiB
    parameters:
      excludePaths:
        - */bower_components/*
        - */node_modules/*
      # Ignore some type hint errors due to hooks that should not have typed hint
      # parameters or return.
      ignoreErrors:
        - identifier: missingType.generics
        - identifier: missingType.iterableValue
        # new static() is a best practice in Drupal, so we cannot fix that.
        - "#^Unsafe usage of new static#"
        -
          message: '#Function [a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no typehint specified\.#'
          paths:
            - *.inc
            - *.install
            - *.module
            - *.profile
            - *.theme
        -
          message: '#Function [a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no value type specified in iterable type [a-zA-Z0-9\\_]+\.#'
          paths:
            - *.inc
            - *.install
            - *.module
            - *.profile
            - *.theme
        -
          message: '#Function [a-zA-Z0-9\\_]+\(\) has no return typehint specified\.#'
          paths:
            - *.inc
            - *.install
            - *.module
            - *.profile
            - *.theme
        -
          message: '#Parameter \#1 \$label of method Drupal\\Core\\TypedData\\DataDefinition\:\:setLabel\(\) expects string, Drupal\\Core\\StringTranslation\\TranslatableMarkup given\.#'
          paths:
            - *.inc
            - *.install
            - *.module
            - *.profile
            - *.theme
        - '#expects string\|null, Drupal\\Core\\StringTranslation\\TranslatableMarkup given\.#'
        - '#expects string, Drupal\\Core\\StringTranslation\\TranslatableMarkup given\.#'
        - '#expects string, Drupal\\Core\\StringTranslation\\TranslatableMarkup\|string given\.#'
        - '#should return array\<string\> but returns array\<int, Drupal\\Core\\StringTranslation\\TranslatableMarkup\>\.#'
        - '#should return string but returns Drupal\\Core\\StringTranslation\\TranslatableMarkup\.#'
        - '#Parameter \#1 \$field of method Drupal\\Core\\Entity\\Query\\QueryInterface::condition\(\) expects Drupal\\Core\\Condition\\ConditionInterface\|string, Drupal\\Core\\Entity\\Query\\ConditionInterface given\.#'
        -
          identifier: missingType.iterableValue
        - '#Method Drupal\\ui_patterns_views\\Plugin\\views\\row\\ComponentRow::buildOptionsForm\(\) has parameter \$form with no type specified.#'
        - '#Method Drupal\\ui_patterns_views\\Plugin\\views\\row\\ComponentRow::submitOptionsForm\(\) has parameter \$form with no type specified.#'
        - '#Method Drupal\\ui_patterns_views\\Plugin\\views\\style\\ComponentStyle::buildOptionsForm\(\) has parameter \$form with no type specified.#'
        - '#Method Drupal\\ui_patterns\\Element\\UiPatternsOperations::preRenderDropbutton\(\) has parameter \$element with no type specified.#'
        - '#Method Drupal\\ui_patterns_views\\Plugin\\views\\row\\ComponentRow::render\(\) should return string but returns array.#'
    #    - '#Plugin definitions cannot be altered.#'
        - '#Method Drupal\\Tests\\ui_patterns[a-zA-Z0-9:\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no type specified.#'
        - '#Method Drupal\\Tests\\ui_patterns[a-zA-Z0-9:\\_]+\(\) has no return type specified.#'
        - '#Method Drupal\\ui_patterns\\ComponentPluginManager::processDefinitionCategory\(\) has parameter \$definition with no type specified.#'
      treatPhpDocTypesAsCertain: false
      inferPrivatePropertyTypeFromConstructor: true
      level: 7
      reportUnmatchedIgnoredErrors: false