@@ -38,9 +38,9 @@ public function __construct(
38
38
public ?string $ min = null ,
39
39
public ?string $ max = null ,
40
40
public string $ invalidFormatMessage = 'This value does not represent a valid week in the ISO 8601 format. ' ,
41
- public string $ invalidWeekNumberMessage = 'The week "{{ value }}" is not a valid week. ' ,
42
- public string $ tooLowMessage = 'The value should not be before week "{{ min }}". ' ,
43
- public string $ tooHighMessage = 'The value should not be after week "{{ max }}". ' ,
41
+ public string $ invalidWeekNumberMessage = 'This value is not a valid week. ' ,
42
+ public string $ tooLowMessage = 'This value should not be before week "{{ min }}". ' ,
43
+ public string $ tooHighMessage = 'This value should not be after week "{{ max }}". ' ,
44
44
?array $ groups = null ,
45
45
mixed $ payload = null ,
46
46
) {
@@ -55,8 +55,8 @@ public function __construct(
55
55
}
56
56
57
57
if (null !== $ min && null !== $ max ) {
58
- [$ minYear , $ minWeekNumber ] = \ explode ('-W ' , $ min , 2 );
59
- [$ maxYear , $ maxWeekNumber ] = \ explode ('-W ' , $ max , 2 );
58
+ [$ minYear , $ minWeekNumber ] = explode ('-W ' , $ min , 2 );
59
+ [$ maxYear , $ maxWeekNumber ] = explode ('-W ' , $ max , 2 );
60
60
61
61
if ($ minYear > $ maxYear || ($ minYear === $ maxYear && $ minWeekNumber > $ maxWeekNumber )) {
62
62
throw new ConstraintDefinitionException (\sprintf ('The "%s" constraint requires the min week to be less than or equal to the max week. ' , __CLASS__ ));
0 commit comments