@@ -415,7 +415,7 @@ private function validate_date(mixed $value) : string
415
415
return '' ;
416
416
}
417
417
418
- return $ this ->testIt (\checkdate ((int )($ parts [$ month ] ?? 0 ), (int )($ parts [$ day ] ?? 0 ), (int )( $ parts [$ year ] ?? 0 ) ), 'date ' , ['value ' => $ value ]);
418
+ return $ this ->testIt (\checkdate ((int )($ parts [$ month ] ?? 0 ), (int )($ parts [$ day ] ?? 0 ), (int )$ parts [$ year ]), 'date ' , ['value ' => $ value ]);
419
419
}
420
420
421
421
private function validate_dateISO (mixed $ value ) : string
@@ -424,7 +424,7 @@ private function validate_dateISO(mixed $value) : string
424
424
$ month = 1 ;
425
425
$ day = 2 ;
426
426
$ parts = \explode ('- ' , (string )$ value );
427
- $ year = \sprintf ('%04d ' , (int )( $ parts [$ year ] ?? 0 ) );
427
+ $ year = \sprintf ('%04d ' , (int )$ parts [$ year ]);
428
428
$ month = \sprintf ('%02d ' , (int )($ parts [$ month ] ?? 0 ));
429
429
$ day = \sprintf ('%02d ' , (int )($ parts [$ day ] ?? 0 ));
430
430
@@ -465,7 +465,7 @@ private function validate_day_month_year(mixed $value) : string
465
465
return '' ;
466
466
}
467
467
468
- return $ this ->testIt (\checkdate ((int )($ parts [$ month ] ?? 0 ), (int )( $ parts [$ day ] ?? 0 ) , (int )($ parts [$ year ] ?? 0 )), 'day_month_year ' , ['value ' => $ value ]);
468
+ return $ this ->testIt (\checkdate ((int )($ parts [$ month ] ?? 0 ), (int )$ parts [$ day ], (int )($ parts [$ year ] ?? 0 )), 'day_month_year ' , ['value ' => $ value ]);
469
469
}
470
470
471
471
private function validate_domain (mixed $ value ) : string
@@ -648,7 +648,7 @@ private function validate_month_day_year(mixed $value) : string
648
648
return '' ;
649
649
}
650
650
651
- return $ this ->testIt (\checkdate ((int )( $ parts [$ month ] ?? 0 ) , (int )($ parts [$ day ] ?? 0 ), (int )($ parts [$ year ] ?? 0 )), 'month_day_year ' , ['value ' => $ value ]);
651
+ return $ this ->testIt (\checkdate ((int )$ parts [$ month ], (int )($ parts [$ day ] ?? 0 ), (int )($ parts [$ year ] ?? 0 )), 'month_day_year ' , ['value ' => $ value ]);
652
652
}
653
653
654
654
private function validate_month_year (mixed $ value ) : string
@@ -658,7 +658,7 @@ private function validate_month_year(mixed $value) : string
658
658
$ day = 1 ;
659
659
$ parts = \explode ('/ ' , \str_replace (self ::$ dateSeparators , '/ ' , (string )$ value ));
660
660
661
- return $ this ->testIt (\checkdate ((int )( $ parts [$ month ] ?? 0 ) , $ day , (int )($ parts [$ year ] ?? 0 )), 'month_year ' , ['value ' => $ value ]);
661
+ return $ this ->testIt (\checkdate ((int )$ parts [$ month ], $ day , (int )($ parts [$ year ] ?? 0 )), 'month_year ' , ['value ' => $ value ]);
662
662
}
663
663
664
664
private function validate_neq_field (mixed $ value ) : string
@@ -794,7 +794,7 @@ private function validate_year_month(mixed $value) : string
794
794
$ day = 1 ;
795
795
$ parts = \explode ('/ ' , \str_replace (self ::$ dateSeparators , '/ ' , (string )$ value ));
796
796
797
- return $ this ->testIt (\checkdate ((int )($ parts [$ month ] ?? 0 ), $ day , (int )( $ parts [$ year ] ?? 0 ) ), 'year_month ' , ['value ' => $ value ]);
797
+ return $ this ->testIt (\checkdate ((int )($ parts [$ month ] ?? 0 ), $ day , (int )$ parts [$ year ]), 'year_month ' , ['value ' => $ value ]);
798
798
}
799
799
800
800
/**
0 commit comments