Skip to content

Commit dccde3a

Browse files
authored
Add default PHPStan exclusions
1 parent 01b1161 commit dccde3a

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

phpstan.neon

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,28 @@ parameters:
44
paths:
55
- src
66
- tests
7-
7+
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/*
11+
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/*
16+
reportUnmatched: false
17+
18+
- message: '#Property [a-zA-Z0-9\\\$\\_\\\\:\\(\\)]+ type has no value type specified in iterable type array#'
19+
paths:
20+
- tests/*
21+
reportUnmatched: false
22+
# PHPStan doesn't understand PHPUnit's self-termination methods.
23+
- message: '#Unreachable statement - code above always terminates.#'
24+
paths:
25+
- tests/*
26+
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)