-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
70 lines (70 loc) · 2.17 KB
/
phpstan.neon
File metadata and controls
70 lines (70 loc) · 2.17 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
parameters:
level: 9
phpVersion: 80400
tmpDir: %currentWorkingDirectory%/var/cache/phpstan
fileExtensions:
- php
paths:
- src
ignoreErrors:
# MapEntrySet and MapValueCollection are @internal view classes whose
# generic parameters cause false positives in trait-in-context analysis.
# MapEntry<K,V> is invariant, causing Closure(MapEntry<K,V>):bool to be
# seen as incompatible with itself; MapEntry is never scalar/null; and
# MapValueCollection's newCollection(iterable<E>) conflicts with
# type-changing operations like map/flatMap.
-
message: '#MapEntry#'
path: src/CollectionLogic.php
-
identifier: booleanOr.alwaysFalse
path: src/CollectionLogic.php
-
identifier: smallerOrEqual.alwaysFalse
path: src/CollectionLogic.php
-
identifier: missingType.generics
path: src/CollectionLogic.php
-
identifier: deadCode.unreachable
path: src/CollectionLogic.php
# MapKeySet has E bounded to string|int|bool|float|object, so null/array
# checks in CollectionLogic/SetLogic are always-false/always-true in that context.
-
identifier: identical.alwaysFalse
path: src/CollectionLogic.php
-
identifier: function.impossibleType
path: src/CollectionLogic.php
-
identifier: notIdentical.alwaysTrue
path: src/Set/SetLogic.php
-
identifier: return.type
path: src/Set/SetLogic.php
# Narrowing sections narrow Collection<E> → ImmutableList<E> / ImmutableSet<E> etc.
# in child return types, which PHPStan flags as incompatible.
-
identifier: method.childReturnType
paths:
- src/ImmutableCollection.php
- src/WritableCollection.php
- src/List/ListInterface.php
- src/List/ImmutableList.php
- src/List/WritableList.php
- src/Set/Set.php
- src/Set/ImmutableSet.php
- src/Set/WritableSet.php
# classes which implement ImmutableMap<string,...>. The trait's put()/putFirst()
# accepts string|int|bool|float|object but the store expects string.
-
identifier: method.childReturnType
path: src/Map/ImmutableMapLogic.php
-
identifier: argument.type
path: src/Map/ImmutableMapLogic.php
-
message: '#MapValueCollection#'
path: src/CollectionLogic.php
includes:
- phpstan-tests.neon