Skip to content

Commit 6bcb8e8

Browse files
committed
Update levels tests
1 parent 04a737b commit 6bcb8e8

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

tests/PHPStan/Levels/data/acceptTypes-5.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@
129129
"line": 494,
130130
"ignorable": true
131131
},
132+
{
133+
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array<callable(): mixed> given.",
134+
"line": 577,
135+
"ignorable": true
136+
},
137+
{
138+
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array<string> given.",
139+
"line": 578,
140+
"ignorable": true
141+
},
132142
{
133143
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array<int> given.",
134144
"line": 579,
@@ -144,6 +154,11 @@
144154
"line": 582,
145155
"ignorable": true
146156
},
157+
{
158+
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array{foo: 'date', bar: 'date'} given.",
159+
"line": 583,
160+
"ignorable": true
161+
},
147162
{
148163
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array{foo: 'nonexistent'} given.",
149164
"line": 584,
@@ -154,6 +169,11 @@
154169
"line": 585,
155170
"ignorable": true
156171
},
172+
{
173+
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, non-empty-array<callable(): mixed> given.",
174+
"line": 588,
175+
"ignorable": true
176+
},
157177
{
158178
"message": "Parameter #1 $static of method Levels\\AcceptTypes\\RequireObjectWithoutClassType::requireStatic() expects static(Levels\\AcceptTypes\\RequireObjectWithoutClassType), object given.",
159179
"line": 648,
@@ -189,4 +209,4 @@
189209
"line": 763,
190210
"ignorable": true
191211
}
192-
]
212+
]

tests/PHPStan/Levels/data/acceptTypes-7.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@
104104
"line": 543,
105105
"ignorable": true
106106
},
107-
{
108-
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array<callable(): mixed> given.",
109-
"line": 577,
110-
"ignorable": true
111-
},
112-
{
113-
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array<string> given.",
114-
"line": 578,
115-
"ignorable": true
116-
},
117107
{
118108
"message": "Parameter #1 $one of method Levels\\AcceptTypes\\ArrayShapes::doBar() expects array{foo: callable(): mixed}, array{}|array{foo: 'date'} given.",
119109
"line": 596,
@@ -169,4 +159,4 @@
169159
"line": 756,
170160
"ignorable": true
171161
}
172-
]
162+
]

0 commit comments

Comments
 (0)