Skip to content

Commit 2f57ad8

Browse files
committed
Use phpstan identifiers.
1 parent 34f7d61 commit 2f57ad8

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

phpstan.neon

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,20 @@ parameters:
55
- src
66
- tests
77
ignoreErrors:
8-
- message: '#(Array shape contains unspecified keys|Parameter .+ of method .+ contains unspecified keys|Array shape is not compatible with|Property .+ type with generic class .+ does not specify its types|Cannot access offset .+ on array\{.+\}|array\{.+\} does not accept key .+|Array has no value type specified in iterable type array)#'
9-
paths:
10-
- tests/*
8+
# PHPStan is overly aggressive on readonly properties.
9+
- identifier: property.uninitializedReadonly
1110
reportUnmatched: false
12-
13-
- message: '#Method [a-zA-Z0-9\\_\\\\:\\(\\)]+ (has parameter \\\$[a-zA-Z0-9_]+|return type) with no value type specified in iterable type array#'
14-
paths:
15-
- tests/*
11+
- identifier: property.readOnlyAssignNotInConstructor
1612
reportUnmatched: false
1713

18-
- message: '#Property [a-zA-Z0-9\\\$\\_\\\\:\\(\\)]+ type has no value type specified in iterable type array#'
14+
# We don't need to be pedantic about iterable types in tests.
15+
- identifier: missingType.iterableValue
1916
paths:
2017
- tests/*
2118
reportUnmatched: false
19+
2220
# PHPStan doesn't understand PHPUnit's self-termination methods.
23-
- message: '#Unreachable statement - code above always terminates.#'
21+
- identifier: deadCode.unreachable
2422
paths:
2523
- tests/*
2624
reportUnmatched: false
27-
# PHPStan is overly aggressive on readonly properties.
28-
- message: '#Class (.*) has an uninitialized readonly property (.*). Assign it in the constructor.#'
29-
reportUnmatched: false
30-
- message: '#Readonly property (.*) is assigned outside of the constructor.#'
31-
reportUnmatched: false

0 commit comments

Comments
 (0)