Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
135 lines (126 loc) · 5.16 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
135 lines (126 loc) · 5.16 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
level: 6
checkMissingOverrideMethodAttribute: true
paths:
- .
excludePaths:
- vendor
ignoreErrors:
- '~^Unsafe usage of new static\(\)\.$~'
# relax strict rules
- '~^Only booleans are allowed in .+, .+ given( on the (left|right) side)?\.$~'
- '~^Variable (static )?(property access|method call) on .+\.$~'
# @return $this is not inferred as impure https://github.com/phpstan/phpstan/issues/15320
-
path: '*'
identifier: staticMethod.alreadyNarrowedType
message: '~^Call to static method PHPUnit\\Framework\\Assert::assert\w+\(\) .* and .* will always evaluate to true\.$~'
count: 23
# assign to generic callable property is broken https://github.com/phpstan/phpstan/issues/8964
-
path: '*'
identifier: assign.propertyType
message: '~^Property Atk4\\Data\\Model\\UserAction::\$(enabled|preview) .*Closure<.+ does not accept .*Closure\(.+\.$~'
count: 3
# https://github.com/phpstan/phpstan/issues/15434
-
path: 'tests/Reference/WeakAnalysingMapTest.php'
identifier: argument.type
message: '~^Parameter #3 \$owner of method Atk4\\Data\\Reference\\WeakAnalysingMap<.*>::set\(\) expects .*, .* given\.$~'
count: 2
# TODO report to phpstan, errors cannot be ignored inline
-
path: 'src/Persistence/Sql/Postgresql/PlatformTrait.php'
identifier: classConstant.deprecated
message: '~^Fetching deprecated class constant CREATE_INDEXES of class Doctrine\\DBAL\\Platforms\\AbstractPlatform\.$~'
count: 1
-
path: 'src/Persistence/Sql/Postgresql/PlatformTrait.php'
identifier: arguments.count
message: '~^Method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getCreateTableSQL\(\) invoked with 2 parameters, 1 required\.$~'
count: 1
# TODO once DBAL 3.x is dropped
-
path: '*'
identifier: method.deprecated
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: property.deprecated
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: method.internal
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: method.internalClass
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: property.internalClass
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: classConstant.internalClass
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: parameter.internalClass
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: return.internalClass
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: new.internalClass
message: '~^.*\\DBAL\\~'
-
path: '*'
identifier: generics.internalClassBound
message: '~^.*\\DBAL\\~'
# TODO these rules are generated, this ignores should be fixed in the code
# for src/Schema/TestCase.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::dsql\(\)\.$~'
# for src/Field/SqlExpressionField.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Model::expr\(\)\.$~'
# for src/Model.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::export\(\)\.$~'
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::prepareIterator\(\)\.$~'
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Persistence::action\(\)\.$~'
# for src/Model/ReferencesTrait.php (in context of class Atk4\Data\Model)
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference::refLink\(\)\.$~'
# for tests/FieldTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addTitle\(\)\.$~'
# for tests/JoinSqlTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addField\(\)\.$~'
# for tests/ReferenceSqlTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference\\HasOne::addFields\(\)\.$~'
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Reference::addTitle\(\)\.$~'
# for tests/ScopeTest.php
-
identifier: method.notFound
message: '~^Call to an undefined method Atk4\\Data\\Tests\\SUser::expr\(\)\.$~'