Skip to content

Commit d004d99

Browse files
committed
Updated PHPStan config to ignore array types for hooks @return params.
1 parent 794d348 commit d004d99

16 files changed

Lines changed: 123 additions & 148 deletions

File tree

.vortex/installer/tests/Fixtures/handler_process/_baseline/phpstan.neon

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,18 @@ parameters:
3030
treatPhpDocTypesAsCertain: false
3131

3232
ignoreErrors:
33-
-
34-
# Since tests and data providers do not have to have parameter docblocks,
33+
- # Hook implementations do not provide full type information for
34+
# parameters or return values in iterable type arrays.
35+
message: '#.*no value type specified in iterable type array#'
36+
paths:
37+
- web/modules/custom/*
38+
- web/themes/custom/*
39+
- # Included settings files are not aware about global variables.
40+
message: '#Variable .* might not be defined.#'
41+
paths:
42+
- web/sites/default/includes
43+
reportUnmatched: false
44+
- # Since tests and data providers do not have to have parameter docblocks,
3545
# it is not possible to specify the type of the parameter, so we ignore
3646
# this error.
3747
message: '#.*no value type specified in iterable type array.#'
@@ -40,17 +50,3 @@ parameters:
4050
- web/themes/custom/*/tests/*
4151
- tests/phpunit/*
4252
reportUnmatched: false
43-
-
44-
# Hook implementations do not provide docblocks for parameters, so there
45-
# is no way to provide this information.
46-
message: '#.* with no value type specified in iterable type array#'
47-
paths:
48-
- web/modules/custom/*
49-
- web/themes/custom/*
50-
reportUnmatched: false
51-
-
52-
# Included settings files are not aware about global variables.
53-
message: '#Variable .* might not be defined.#'
54-
paths:
55-
- web/sites/default/includes
56-
reportUnmatched: false

.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/phpstan.neon

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,29 @@
1313
- tests
1414

1515
excludePaths:
16-
@@ -36,8 +36,8 @@
17-
# this error.
18-
message: '#.*no value type specified in iterable type array.#'
19-
paths:
20-
- - web/modules/custom/*/tests/*
21-
- - web/themes/custom/*/tests/*
22-
+ - docroot/modules/custom/*/tests/*
23-
+ - docroot/themes/custom/*/tests/*
24-
- tests/phpunit/*
25-
reportUnmatched: false
26-
-
27-
@@ -45,12 +45,12 @@
28-
# is no way to provide this information.
29-
message: '#.* with no value type specified in iterable type array#'
16+
@@ -34,12 +34,12 @@
17+
# parameters or return values in iterable type arrays.
18+
message: '#.*no value type specified in iterable type array#'
3019
paths:
3120
- - web/modules/custom/*
3221
- - web/themes/custom/*
3322
+ - docroot/modules/custom/*
3423
+ - docroot/themes/custom/*
35-
reportUnmatched: false
36-
-
37-
# Included settings files are not aware about global variables.
24+
- # Included settings files are not aware about global variables.
3825
message: '#Variable .* might not be defined.#'
3926
paths:
4027
- - web/sites/default/includes
4128
+ - docroot/sites/default/includes
4229
reportUnmatched: false
30+
- # Since tests and data providers do not have to have parameter docblocks,
31+
# it is not possible to specify the type of the parameter, so we ignore
32+
@@ -46,7 +46,7 @@
33+
# this error.
34+
message: '#.*no value type specified in iterable type array.#'
35+
paths:
36+
- - web/modules/custom/*/tests/*
37+
- - web/themes/custom/*/tests/*
38+
+ - docroot/modules/custom/*/tests/*
39+
+ - docroot/themes/custom/*/tests/*
40+
- tests/phpunit/*
41+
reportUnmatched: false

.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/phpstan.neon

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,29 @@
1313
- tests
1414

1515
excludePaths:
16-
@@ -36,8 +36,8 @@
17-
# this error.
18-
message: '#.*no value type specified in iterable type array.#'
19-
paths:
20-
- - web/modules/custom/*/tests/*
21-
- - web/themes/custom/*/tests/*
22-
+ - docroot/modules/custom/*/tests/*
23-
+ - docroot/themes/custom/*/tests/*
24-
- tests/phpunit/*
25-
reportUnmatched: false
26-
-
27-
@@ -45,12 +45,12 @@
28-
# is no way to provide this information.
29-
message: '#.* with no value type specified in iterable type array#'
16+
@@ -34,12 +34,12 @@
17+
# parameters or return values in iterable type arrays.
18+
message: '#.*no value type specified in iterable type array#'
3019
paths:
3120
- - web/modules/custom/*
3221
- - web/themes/custom/*
3322
+ - docroot/modules/custom/*
3423
+ - docroot/themes/custom/*
35-
reportUnmatched: false
36-
-
37-
# Included settings files are not aware about global variables.
24+
- # Included settings files are not aware about global variables.
3825
message: '#Variable .* might not be defined.#'
3926
paths:
4027
- - web/sites/default/includes
4128
+ - docroot/sites/default/includes
4229
reportUnmatched: false
30+
- # Since tests and data providers do not have to have parameter docblocks,
31+
# it is not possible to specify the type of the parameter, so we ignore
32+
@@ -46,7 +46,7 @@
33+
# this error.
34+
message: '#.*no value type specified in iterable type array.#'
35+
paths:
36+
- - web/modules/custom/*/tests/*
37+
- - web/themes/custom/*/tests/*
38+
+ - docroot/modules/custom/*/tests/*
39+
+ - docroot/themes/custom/*/tests/*
40+
- tests/phpunit/*
41+
reportUnmatched: false

.vortex/installer/tests/Fixtures/handler_process/theme_claro/phpstan.neon

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
- web/sites/default/settings.php
77
- web/sites/default/includes
88
- tests
9-
@@ -37,7 +36,6 @@
9+
@@ -35,7 +34,6 @@
10+
message: '#.*no value type specified in iterable type array#'
11+
paths:
12+
- web/modules/custom/*
13+
- - web/themes/custom/*
14+
- # Included settings files are not aware about global variables.
15+
message: '#Variable .* might not be defined.#'
16+
paths:
17+
@@ -47,6 +45,5 @@
1018
message: '#.*no value type specified in iterable type array.#'
1119
paths:
1220
- web/modules/custom/*/tests/*
1321
- - web/themes/custom/*/tests/*
1422
- tests/phpunit/*
1523
reportUnmatched: false
16-
-
17-
@@ -46,7 +44,6 @@
18-
message: '#.* with no value type specified in iterable type array#'
19-
paths:
20-
- web/modules/custom/*
21-
- - web/themes/custom/*
22-
reportUnmatched: false
23-
-
24-
# Included settings files are not aware about global variables.

.vortex/installer/tests/Fixtures/handler_process/theme_olivero/phpstan.neon

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
- web/sites/default/settings.php
77
- web/sites/default/includes
88
- tests
9-
@@ -37,7 +36,6 @@
9+
@@ -35,7 +34,6 @@
10+
message: '#.*no value type specified in iterable type array#'
11+
paths:
12+
- web/modules/custom/*
13+
- - web/themes/custom/*
14+
- # Included settings files are not aware about global variables.
15+
message: '#Variable .* might not be defined.#'
16+
paths:
17+
@@ -47,6 +45,5 @@
1018
message: '#.*no value type specified in iterable type array.#'
1119
paths:
1220
- web/modules/custom/*/tests/*
1321
- - web/themes/custom/*/tests/*
1422
- tests/phpunit/*
1523
reportUnmatched: false
16-
-
17-
@@ -46,7 +44,6 @@
18-
message: '#.* with no value type specified in iterable type array#'
19-
paths:
20-
- web/modules/custom/*
21-
- - web/themes/custom/*
22-
reportUnmatched: false
23-
-
24-
# Included settings files are not aware about global variables.

.vortex/installer/tests/Fixtures/handler_process/theme_stark/phpstan.neon

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
- web/sites/default/settings.php
77
- web/sites/default/includes
88
- tests
9-
@@ -37,7 +36,6 @@
9+
@@ -35,7 +34,6 @@
10+
message: '#.*no value type specified in iterable type array#'
11+
paths:
12+
- web/modules/custom/*
13+
- - web/themes/custom/*
14+
- # Included settings files are not aware about global variables.
15+
message: '#Variable .* might not be defined.#'
16+
paths:
17+
@@ -47,6 +45,5 @@
1018
message: '#.*no value type specified in iterable type array.#'
1119
paths:
1220
- web/modules/custom/*/tests/*
1321
- - web/themes/custom/*/tests/*
1422
- tests/phpunit/*
1523
reportUnmatched: false
16-
-
17-
@@ -46,7 +44,6 @@
18-
message: '#.* with no value type specified in iterable type array#'
19-
paths:
20-
- web/modules/custom/*
21-
- - web/themes/custom/*
22-
reportUnmatched: false
23-
-
24-
# Included settings files are not aware about global variables.
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
@@ -38,7 +38,6 @@
1+
@@ -48,5 +48,4 @@
22
paths:
33
- web/modules/custom/*/tests/*
44
- web/themes/custom/*/tests/*
55
- - tests/phpunit/*
66
reportUnmatched: false
7-
-
8-
# Hook implementations do not provide docblocks for parameters, so there
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
@@ -38,7 +38,6 @@
1+
@@ -48,5 +48,4 @@
22
paths:
33
- web/modules/custom/*/tests/*
44
- web/themes/custom/*/tests/*
55
- - tests/phpunit/*
66
reportUnmatched: false
7-
-
8-
# Hook implementations do not provide docblocks for parameters, so there

.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/phpstan.neon

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
- web/sites/default/settings.php
77
- web/sites/default/includes
88
- tests
9-
@@ -37,7 +36,6 @@
9+
@@ -35,7 +34,6 @@
10+
message: '#.*no value type specified in iterable type array#'
11+
paths:
12+
- web/modules/custom/*
13+
- - web/themes/custom/*
14+
- # Included settings files are not aware about global variables.
15+
message: '#Variable .* might not be defined.#'
16+
paths:
17+
@@ -47,6 +45,5 @@
1018
message: '#.*no value type specified in iterable type array.#'
1119
paths:
1220
- web/modules/custom/*/tests/*
1321
- - web/themes/custom/*/tests/*
1422
- tests/phpunit/*
1523
reportUnmatched: false
16-
-
17-
@@ -46,7 +44,6 @@
18-
message: '#.* with no value type specified in iterable type array#'
19-
paths:
20-
- web/modules/custom/*
21-
- - web/themes/custom/*
22-
reportUnmatched: false
23-
-
24-
# Included settings files are not aware about global variables.

.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/web/modules/custom/sw_demo/js/-sw_demo.test.js

Whitespace-only changes.

0 commit comments

Comments
 (0)