-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathphpstan.neon
More file actions
93 lines (88 loc) · 3.25 KB
/
Copy pathphpstan.neon
File metadata and controls
93 lines (88 loc) · 3.25 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
##
# 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
paths:
- web/modules/custom
- web/themes/custom
- web/themes/contrib/civictheme
- web/sites/default/settings.php
- web/sites/default/includes
- tests
excludePaths:
analyseAndScan:
- vendor/*
- node_modules/*
- ../*/vendor/*
- ../*/node_modules/*
- web/themes/contrib/civictheme/node_modules/*
- web/themes/contrib/civictheme/dist/*
- web/themes/contrib/civictheme/lib/*
- web/themes/contrib/civictheme/storybook-static/*
- web/themes/contrib/civictheme/.storybook/*
- web/themes/contrib/civictheme/civictheme_starter_kit/*
- web/themes/contrib/civictheme/tests/*
# Do not report on ignored errors that do not occur in the results. This is
# required to allow code generated by a sub-theme to be ignored.
reportUnmatchedIgnoredErrors: 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:
- tests/phpunit/*
-
# Hook implementations do not provide docblocks for parameters, so there
# is no way to provide this information.
messages:
- '#.* no value type specified in iterable type array#'
- '#.* has no return type specified#'
paths:
- web/modules/custom/*
- web/themes/custom/*
- web/themes/contrib/civictheme/*
reportUnmatched: false
-
message: '#.* with no value type specified in iterable type array#'
reportUnmatched: false
-
# Included settings files are not aware about global variables.
message: '#Variable .* might not be defined.#'
paths:
- web/sites/default/includes
-
# Allow using Drupal::service() in tests and Drush commands.
message: '#\Drupal calls should be avoided in classes, use dependency injection instead#'
paths:
- tests/behat
-
# Allow using direct callable calls for generated content.
message: '#Parameter \#1 \$callback of function call_user_func expects callable.*#'
paths:
- web/modules/custom/cs_generated_content/src/CsGeneratedContentCivicthemeTrait.php
-
# D10/D11 compatibility: ThemeSettingsProvider service may or may not exist.
identifier: ternary.alwaysTrue
paths:
- web/themes/contrib/civictheme/src/CivicthemeConfigManager.php
reportUnmatched: false
-
identifier: ternary.alwaysFalse
paths:
- web/themes/contrib/civictheme/src/CivicthemeConfigManager.php
reportUnmatched: false
-
# D10 fallback: theme_get_setting() is deprecated in D11.3.
identifier: function.deprecated
paths:
- web/themes/contrib/civictheme/src/CivicthemeConfigManager.php
reportUnmatched: false