|
7 | 7 | #[\Attribute(\Attribute::TARGET_CLASS)] |
8 | 8 | final class ArrivalNotBeforeCreation extends Constraint |
9 | 9 | { |
10 | | - public string $createdAtField = 'createdAt'; |
| 10 | + public string $createdAtField; |
11 | 11 |
|
12 | | - public string $arrivalAtField = 'arrivalAt'; |
| 12 | + public string $arrivalAtField; |
13 | 13 |
|
14 | | - public string $format = 'd.m.Y H:i'; |
| 14 | + public string $format; |
15 | 15 |
|
16 | | - public string $message = 'Arrival time must be on/after created time.'; |
| 16 | + public string $message; |
17 | 17 |
|
18 | 18 | /** |
19 | | - * @param array<string, mixed>|null $options |
20 | | - * @param array<int, string>|null $groups |
| 19 | + * @param array<int, string>|null $groups |
21 | 20 | */ |
22 | 21 | public function __construct( |
23 | | - ?array $options = null, |
| 22 | + string $createdAtField = 'createdAt', |
| 23 | + string $arrivalAtField = 'arrivalAt', |
| 24 | + string $format = 'd.m.Y H:i', |
| 25 | + string $message = 'Arrival time must be on/after created time.', |
24 | 26 | ?array $groups = null, |
25 | 27 | mixed $payload = null, |
26 | | - ?string $createdAtField = null, |
27 | | - ?string $arrivalAtField = null, |
28 | | - ?string $format = null, |
29 | | - ?string $message = null, |
30 | 28 | ) { |
31 | | - parent::__construct($options ?? [], $groups, $payload); |
32 | | - $this->createdAtField = $createdAtField ?? $this->createdAtField; |
33 | | - $this->arrivalAtField = $arrivalAtField ?? $this->arrivalAtField; |
34 | | - $this->format = $format ?? $this->format; |
35 | | - $this->message = $message ?? $this->message; |
| 29 | + $this->createdAtField = $createdAtField; |
| 30 | + $this->arrivalAtField = $arrivalAtField; |
| 31 | + $this->format = $format; |
| 32 | + $this->message = $message; |
| 33 | + |
| 34 | + parent::__construct(groups: $groups, payload: $payload); |
36 | 35 | } |
37 | 36 |
|
38 | 37 | #[\Override] |
|
0 commit comments