forked from drupal-graphql/graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
53 lines (49 loc) · 2.34 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
53
parameters:
# PHPStan cannot find files in this test directory automatically.
scanDirectories:
- ../../core/tests/Drupal/Tests
level: 6
customRulesetUsed: true
paths:
- .
# We inherit a lot of Drupal core docs that don't specify iterable types on
# arrays, not sure we can fix this in a good way.
checkMissingIterableValueType: false
# Not sure we can specify generic types properly with Drupal coding standards
# yet, disable for now.
checkGenericClassInNonGenericObjectType: false
excludePaths:
# Exclude the RouteLoad producer because the redirect module is not D10
# compatible so we are not downloading it.
- src/Plugin/GraphQL/DataProducer/Routing/RouteLoad.php
ignoreErrors:
# @todo Ignore phpstan-drupal extension's rules for now, activate later.
- '#\Drupal calls should be avoided in classes, use dependency injection instead#'
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static\\(\\)\\.$#"
# Drupal allows object property access to custom fields, so we cannot fix
# that.
- "#^Access to an undefined property Drupal\\\\#"
# We forgot to use return type hints on some interfaces, cannot be changed
# in stable 4.0.
# @todo use return type hints everywhere for 5.0.
-
message: "#^Method Drupal\\\\graphql\\\\Plugin\\\\PersistedQueryPluginInterface\\:\\:setWeight\\(\\) has no return type specified\\.$#"
count: 1
path: src/Plugin/PersistedQueryPluginInterface.php
-
message: "#^Method Drupal\\\\graphql\\\\Plugin\\\\SchemaExtensionPluginInterface\\:\\:registerResolvers\\(\\) has no return type specified\\.$#"
count: 1
path: src/Plugin/SchemaExtensionPluginInterface.php
-
message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:addPersistedQueryInstance\\(\\) has no return type specified\\.$#"
count: 1
path: src/Entity/ServerInterface.php
-
message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:removeAllPersistedQueryInstances\\(\\) has no return type specified\\.$#"
count: 1
path: src/Entity/ServerInterface.php
-
message: "#^Method Drupal\\\\graphql\\\\Entity\\\\ServerInterface\\:\\:removePersistedQueryInstance\\(\\) has no return type specified\\.$#"
count: 1
path: src/Entity/ServerInterface.php