@@ -415,7 +415,7 @@ private function validate_date(mixed $value) : string
415415return '' ;
416416}
417417
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 ]);
419419}
420420
421421private function validate_dateISO (mixed $ value ) : string
@@ -424,7 +424,7 @@ private function validate_dateISO(mixed $value) : string
424424$ month = 1 ;
425425$ day = 2 ;
426426$ parts = \explode ('- ' , (string )$ value );
427- $ year = \sprintf ('%04d ' , (int )( $ parts [$ year ] ?? 0 ) );
427+ $ year = \sprintf ('%04d ' , (int )$ parts [$ year ]);
428428$ month = \sprintf ('%02d ' , (int )($ parts [$ month ] ?? 0 ));
429429$ day = \sprintf ('%02d ' , (int )($ parts [$ day ] ?? 0 ));
430430
@@ -465,7 +465,7 @@ private function validate_day_month_year(mixed $value) : string
465465return '' ;
466466}
467467
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 ]);
469469}
470470
471471private function validate_domain (mixed $ value ) : string
@@ -648,7 +648,7 @@ private function validate_month_day_year(mixed $value) : string
648648return '' ;
649649}
650650
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 ]);
652652}
653653
654654private function validate_month_year (mixed $ value ) : string
@@ -658,7 +658,7 @@ private function validate_month_year(mixed $value) : string
658658$ day = 1 ;
659659$ parts = \explode ('/ ' , \str_replace (self ::$ dateSeparators , '/ ' , (string )$ value ));
660660
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 ]);
662662}
663663
664664private function validate_neq_field (mixed $ value ) : string
@@ -794,7 +794,7 @@ private function validate_year_month(mixed $value) : string
794794$ day = 1 ;
795795$ parts = \explode ('/ ' , \str_replace (self ::$ dateSeparators , '/ ' , (string )$ value ));
796796
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 ]);
798798}
799799
800800/**
0 commit comments