@@ -2358,15 +2358,15 @@ public function testValidateEmail()
2358
2358
$ v = new Validator ($ trans , ['x ' => ['not a string ' ]], ['x ' => 'Email ' ]);
2359
2359
$ this ->assertFalse ($ v ->passes ());
2360
2360
2361
- $ v = new Validator ($ trans , ['x ' => new class () {
2361
+ $ v = new Validator ($ trans , ['x ' => new class {
2362
2362
public function __toString ()
2363
2363
{
2364
2364
return 'aslsdlks ' ;
2365
2365
}
2366
2366
}], ['x ' => 'Email ' ]);
2367
2367
$ this ->assertFalse ($ v ->passes ());
2368
2368
2369
- $ v = new Validator ($ trans , ['x ' => new class () {
2369
+ $ v = new Validator ($ trans , ['x ' => new class {
2370
2370
public function __toString ()
2371
2371
{
2372
2372
return 'foo@gmail.com ' ;
@@ -4496,7 +4496,7 @@ public function testCustomValidationObject()
4496
4496
$ v = new Validator (
4497
4497
$ this ->getIlluminateArrayTranslator (),
4498
4498
['name ' => 'taylor ' ],
4499
- ['name ' => new class () implements Rule {
4499
+ ['name ' => new class implements Rule {
4500
4500
public function passes (string $ attribute , mixed $ value ): bool
4501
4501
{
4502
4502
return $ value === 'taylor ' ;
@@ -4515,7 +4515,7 @@ public function message(): array|string
4515
4515
$ v = new Validator (
4516
4516
$ this ->getIlluminateArrayTranslator (),
4517
4517
['name ' => 'adam ' ],
4518
- ['name ' => [new class () implements Rule {
4518
+ ['name ' => [new class implements Rule {
4519
4519
public function passes (string $ attribute , mixed $ value ): bool
4520
4520
{
4521
4521
return $ value === 'taylor ' ;
@@ -4563,7 +4563,7 @@ public function message(): array|string
4563
4563
$ this ->getIlluminateArrayTranslator (),
4564
4564
['name ' => 'taylor ' , 'states ' => ['AR ' , 'TX ' ], 'number ' => 9 ],
4565
4565
[
4566
- 'states.* ' => new class () implements Rule {
4566
+ 'states.* ' => new class implements Rule {
4567
4567
public function passes (string $ attribute , mixed $ value ): bool
4568
4568
{
4569
4569
return in_array ($ value , ['AK ' , 'HI ' ]);
@@ -4600,7 +4600,7 @@ function ($attribute, $value, $fail) {
4600
4600
$ v = new Validator (
4601
4601
$ this ->getIlluminateArrayTranslator (),
4602
4602
['name ' => 42 ],
4603
- ['name ' => new class () implements Rule {
4603
+ ['name ' => new class implements Rule {
4604
4604
public function passes (string $ attribute , mixed $ value ): bool
4605
4605
{
4606
4606
return $ value === 'taylor ' ;
@@ -4621,7 +4621,7 @@ public function message(): array|string
4621
4621
$ v = new Validator (
4622
4622
$ this ->getIlluminateArrayTranslator (),
4623
4623
['name ' => 42 ],
4624
- ['name ' => [new class () implements Rule {
4624
+ ['name ' => [new class implements Rule {
4625
4625
public function passes (string $ attribute , mixed $ value ): bool
4626
4626
{
4627
4627
return $ value === 'taylor ' ;
@@ -4646,7 +4646,7 @@ public function testImplicitCustomValidationObjects()
4646
4646
$ v = new Validator (
4647
4647
$ this ->getIlluminateArrayTranslator (),
4648
4648
['name ' => '' ],
4649
- ['name ' => $ rule = new class () implements ImplicitRule {
4649
+ ['name ' => $ rule = new class implements ImplicitRule {
4650
4650
public $ called = false ;
4651
4651
4652
4652
public function passes (string $ attribute , mixed $ value ): bool
0 commit comments