-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
72 lines (65 loc) · 2.22 KB
/
phpstan.neon
File metadata and controls
72 lines (65 loc) · 2.22 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
##
# Configuration file for PHPStan static code checking, see https://phpstan.org .
#
# Note that drupal-specific rules are automatically included by phpstan/extension-installer
# from vendor/mglaman/phpstan-drupal/extension.neon and vendor/mglaman/phpstan-drupal/rules.neon
# @see https://github.com/mglaman/phpstan-drupal
#
# Paths are passed as CLI arguments.
parameters:
level: 7
phpVersion: 80328
paths:
- web/modules/custom
- web/themes/custom
- web/sites/default/settings.php
- web/sites/default/includes
- tests
excludePaths:
- vendor/*
- node_modules/*
- ../*/vendor/*
- ../*/node_modules/*
# Prefer type checking over docblocks, which can easily become outdated.
treatPhpDocTypesAsCertain: false
ignoreErrors:
-
# Since tests and data providers do not have to have parameter docblocks,
# it is not possible to specify the type of the parameter, so we ignore
# this error.
message: '#.*no value type specified in iterable type array.#'
paths:
- web/modules/custom/*/tests/*
- web/themes/custom/*/tests/*
- tests/phpunit/*
reportUnmatched: false
-
# Hook implementations do not provide docblocks for parameters, so there
# is no way to provide this information.
message: '#.* with no value type specified in iterable type array#'
paths:
- web/modules/custom/*
- web/themes/custom/*
reportUnmatched: false
-
# Included settings files are not aware about global variables.
message: '#Variable .* might not be defined.#'
paths:
- web/sites/default/includes
reportUnmatched: false
-
# PHPUnit mock method calls are not recognized by PHPStan.
message: '#Call to an undefined method .+::(method|expects)\(\)#'
paths:
- web/modules/custom/*/tests/*
- web/themes/custom/*/tests/*
- tests/phpunit/*
reportUnmatched: false
-
# PHPUnit mock objects have union types.
message: '#Parameter .+ expects .+, .+\|PHPUnit\\Framework\\MockObject\\MockObject given#'
paths:
- web/modules/custom/*/tests/*
- web/themes/custom/*/tests/*
- tests/phpunit/*
reportUnmatched: false