-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
52 lines (52 loc) · 2.25 KB
/
phpstan.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
parameters:
customRulesetUsed: true
reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: true
checkMissingIterableValueType: true
checkMissingVarTagTypehint: true
checkMissingTypehints: true
ergebnis:
allowAbstractClasses: true
# Ignore phpstan-drupal extension's rules.
ignoreErrors:
- '#[a-zA-Z0-9\\_\(\) ]+ return type has no value type specified in iterable type array#'
- '#Class "[a-zA-Z0-9\\_]+" is not allowed to extend "[a-zA-Z0-9\\_]+".#'
- '#Method [a-zA-Z0-9\\_]+::creat[a-zA-Z]+\(\) has a parameter \$container with a type declaration of [a-zA-Z0-9\\_]+, but containers should not be injected.#'
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has a nullable return type declaration.#'
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) is not final, but since the containing class is abstract, it should be.#'
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with a nullable type declaration.#'
- '#Function [a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with a nullable type declaration.#'
- '#Function [a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with null as default value.#'
- '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with null as default value.#'
drupal:
entityMapping:
node:
class: Drupal\node\Entity\Node
storage: Drupal\node\NodeStorage
taxonomy_term:
class: Drupal\taxonomy\Entity\Term
storage: Drupal\taxonomy\TermStorage
user:
class: Drupal\user\Entity\User
storage: Drupal\user\UserStorage
block:
class: Drupal\block\Entity\Block
includes:
- vendor/mglaman/phpstan-drupal/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/ergebnis/phpstan-rules/rules.neon
services:
-
class: PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule
arguments:
missingTypehintCheck: @PHPStan\Rules\MissingTypehintCheck
tags:
- phpstan.rules.rule
-
class: PHPStan\Rules\Methods\ReturnTypeRule
tags:
- phpstan.rules.rule
- class: PHPStan\Rules\Methods\MissingMethodReturnTypehintRule
tags:
- phpstan.rules.rule