Skip to content

Commit 95dcb32

Browse files
authored
refactor(datetime): fix return type annotation and parameter order (#1767)
1 parent 4cb006c commit 95dcb32

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/datetime/src/DateTimeInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function getMonthEnum(): Month;
228228
/**
229229
* Returns the day.
230230
*
231-
* @return int<0, 31>
231+
* @return int<1, 31>
232232
*/
233233
public function getDay(): int;
234234

packages/datetime/src/Exception/UnexpectedValueException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ public static function forSeconds(int $provided_seconds, int $calendar_seconds):
117117
{
118118
return new self(sprintf(
119119
'Unexpected seconds value encountered. Provided "%d", but the calendar expects "%d". Ensure the seconds are correct and within the 0-59 range.',
120-
$calendar_seconds,
121120
$provided_seconds,
121+
$calendar_seconds,
122122
));
123123
}
124124
}

packages/datetime/tests/DateTimeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static function provide_invalid_component_parts(): array
164164
0,
165165
],
166166
[
167-
'Unexpected seconds value encountered. Provided "59", but the calendar expects "-1". Ensure the seconds are correct and within the 0-59 range.',
167+
'Unexpected seconds value encountered. Provided "-1", but the calendar expects "59". Ensure the seconds are correct and within the 0-59 range.',
168168
2024,
169169
1,
170170
1,

0 commit comments

Comments
 (0)