@@ -268,7 +268,7 @@ public function testConditionalRulesCanBeAddedToForEachWithAssociativeArray()
268
268
],
269
269
],
270
270
[
271
- 'foo.* ' => Rule::forEach (fn (mixed $ value , string $ attribute ) => [
271
+ 'foo.* ' => Rule::forEach (fn (mixed $ value , string $ attribute ) => [
272
272
'bar ' => Rule::when (true , ['accepted ' ], ['declined ' ]),
273
273
]),
274
274
]
@@ -278,6 +278,7 @@ public function testConditionalRulesCanBeAddedToForEachWithAssociativeArray()
278
278
'foo.1.bar ' => ['validation.accepted ' ],
279
279
], $ v ->getMessageBag ()->toArray ());
280
280
}
281
+
281
282
public function testConditionalRulesCanBeAddedToForEachWithList ()
282
283
{
283
284
$ v = new Validator (
@@ -289,15 +290,14 @@ public function testConditionalRulesCanBeAddedToForEachWithList()
289
290
],
290
291
],
291
292
[
292
- 'foo.*.bar ' => Rule::forEach (fn (mixed $ value , string $ attribute ) => [
293
+ 'foo.*.bar ' => Rule::forEach (fn (mixed $ value , string $ attribute ) => [
293
294
Rule::when (true , ['accepted ' ], ['declined ' ]),
294
295
]),
295
296
]);
296
297
297
298
$ this ->assertEquals ([
298
299
'foo.1.bar ' => ['validation.accepted ' ],
299
300
], $ v ->getMessageBag ()->toArray ());
300
-
301
301
}
302
302
303
303
public function testConditionalRulesCanBeAddedToForEachWithObject ()
@@ -311,10 +311,9 @@ public function testConditionalRulesCanBeAddedToForEachWithObject()
311
311
],
312
312
],
313
313
[
314
- 'foo.*.bar ' => Rule::forEach (fn (mixed $ value , string $ attribute ) =>
315
- Rule::when (true , ['accepted ' ], ['declined ' ]),
316
- ),
317
- ]);
314
+ 'foo.*.bar ' => Rule::forEach (fn (mixed $ value , string $ attribute ) => Rule::when (true , ['accepted ' ], ['declined ' ]),
315
+ ),
316
+ ]);
318
317
319
318
$ this ->assertEquals ([
320
319
'foo.1.bar ' => ['validation.accepted ' ],
0 commit comments