From 8b53c33aaf030a6838a4d70574870df460ecc0e1 Mon Sep 17 00:00:00 2001 From: Adam Halfar Date: Fri, 26 Jul 2024 17:50:37 +0200 Subject: [PATCH] Fix wrong return types --- src/ChronosInterface.php | 22 +++++++++++----------- src/Traits/ModifierTrait.php | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/ChronosInterface.php b/src/ChronosInterface.php index 9238316..c5f329d 100644 --- a/src/ChronosInterface.php +++ b/src/ChronosInterface.php @@ -1245,7 +1245,7 @@ public function endOfWeek(): self; * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function next(?int $dayOfWeek = null); @@ -1256,7 +1256,7 @@ public function next(?int $dayOfWeek = null); * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function previous(?int $dayOfWeek = null); @@ -1267,7 +1267,7 @@ public function previous(?int $dayOfWeek = null); * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function firstOfMonth(?int $dayOfWeek = null); @@ -1278,7 +1278,7 @@ public function firstOfMonth(?int $dayOfWeek = null); * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function lastOfMonth(?int $dayOfWeek = null); @@ -1290,7 +1290,7 @@ public function lastOfMonth(?int $dayOfWeek = null); * * @param int $nth The offset to use. * @param int $dayOfWeek The day of the week to move to. - * @return mixed + * @return static|false */ public function nthOfMonth(int $nth, int $dayOfWeek); @@ -1301,7 +1301,7 @@ public function nthOfMonth(int $nth, int $dayOfWeek); * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function firstOfQuarter(?int $dayOfWeek = null); @@ -1312,7 +1312,7 @@ public function firstOfQuarter(?int $dayOfWeek = null); * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function lastOfQuarter(?int $dayOfWeek = null); @@ -1324,7 +1324,7 @@ public function lastOfQuarter(?int $dayOfWeek = null); * * @param int $nth The offset to use. * @param int $dayOfWeek The day of the week to move to. - * @return mixed + * @return static|false */ public function nthOfQuarter(int $nth, int $dayOfWeek); @@ -1335,7 +1335,7 @@ public function nthOfQuarter(int $nth, int $dayOfWeek); * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function firstOfYear(?int $dayOfWeek = null); @@ -1346,7 +1346,7 @@ public function firstOfYear(?int $dayOfWeek = null); * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function lastOfYear(?int $dayOfWeek = null); @@ -1358,7 +1358,7 @@ public function lastOfYear(?int $dayOfWeek = null); * * @param int $nth The offset to use. * @param int $dayOfWeek The day of the week to move to. - * @return mixed + * @return static|false */ public function nthOfYear(int $nth, int $dayOfWeek); diff --git a/src/Traits/ModifierTrait.php b/src/Traits/ModifierTrait.php index effe09a..7fa95e4 100644 --- a/src/Traits/ModifierTrait.php +++ b/src/Traits/ModifierTrait.php @@ -1083,7 +1083,7 @@ public function endOfWeek(): ChronosInterface * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function next(?int $dayOfWeek = null) { @@ -1103,7 +1103,7 @@ public function next(?int $dayOfWeek = null) * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function previous(?int $dayOfWeek = null) { @@ -1123,7 +1123,7 @@ public function previous(?int $dayOfWeek = null) * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function firstOfMonth(?int $dayOfWeek = null) { @@ -1139,7 +1139,7 @@ public function firstOfMonth(?int $dayOfWeek = null) * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function lastOfMonth(?int $dayOfWeek = null) { @@ -1156,7 +1156,7 @@ public function lastOfMonth(?int $dayOfWeek = null) * * @param int $nth The offset to use. * @param int $dayOfWeek The day of the week to move to. - * @return mixed + * @return static|false */ public function nthOfMonth(int $nth, int $dayOfWeek) { @@ -1174,7 +1174,7 @@ public function nthOfMonth(int $nth, int $dayOfWeek) * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function firstOfQuarter(?int $dayOfWeek = null) { @@ -1191,7 +1191,7 @@ public function firstOfQuarter(?int $dayOfWeek = null) * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function lastOfQuarter(?int $dayOfWeek = null) { @@ -1209,7 +1209,7 @@ public function lastOfQuarter(?int $dayOfWeek = null) * * @param int $nth The offset to use. * @param int $dayOfWeek The day of the week to move to. - * @return mixed + * @return static|false */ public function nthOfQuarter(int $nth, int $dayOfWeek) { @@ -1228,7 +1228,7 @@ public function nthOfQuarter(int $nth, int $dayOfWeek) * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function firstOfYear(?int $dayOfWeek = null) { @@ -1244,7 +1244,7 @@ public function firstOfYear(?int $dayOfWeek = null) * to indicate the desired dayOfWeek, ex. ChronosInterface::MONDAY. * * @param int|null $dayOfWeek The day of the week to move to. - * @return mixed + * @return static */ public function lastOfYear(?int $dayOfWeek = null) { @@ -1261,7 +1261,7 @@ public function lastOfYear(?int $dayOfWeek = null) * * @param int $nth The offset to use. * @param int $dayOfWeek The day of the week to move to. - * @return mixed + * @return static|false */ public function nthOfYear(int $nth, int $dayOfWeek) {