From 639359118d9c0aaf9b31924f31300a1e62a40e2b Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Wed, 10 Dec 2025 11:22:58 +0300 Subject: [PATCH] =?utf8?q?=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D1=80?= =?utf8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B8=20=D1=82=D0=B8?= =?utf8?q?=D0=BF=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/records/Shift.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erp24/records/Shift.php b/erp24/records/Shift.php index 054971c3..6d5a6612 100755 --- a/erp24/records/Shift.php +++ b/erp24/records/Shift.php @@ -113,7 +113,12 @@ class Shift extends ActiveRecord return Shift::NIGHT === (int) $shiftId ; } - public static function getShiftIdsByShiftType ($shiftType) { - return $shiftType == 0 ? [self::DAY, self::NIGHT, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18] : ($shiftType == self::DAY ? [self::DAY, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18] : [self::NIGHT]); + public static function getShiftIdsByShiftType(int $shiftType): array + { + return match ($shiftType) { + self::DAY => [self::DAY, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18], + self::NIGHT => [self::NIGHT], + default => [self::DAY, self::NIGHT, self::ADMINISTRATOR_8_17, self::ADMINISTRATOR_9_18], + }; } } -- 2.39.5