From 173d0f1934d08968a5d55a965777c107bae609a0 Mon Sep 17 00:00:00 2001 From: lip8up Date: Thu, 16 Sep 2021 02:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=3D=3D=20=E5=BC=95?= =?UTF-8?q?=E8=B5=B7=E7=9A=84=E4=BB=A3=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Enum.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Enum.php b/src/Enum.php index 56c7a72..da8da23 100644 --- a/src/Enum.php +++ b/src/Enum.php @@ -184,7 +184,7 @@ public static function allLabels(): array public static function valueToLabel($value = null) { $map = self::columnValues(1, 0); - return $value == null ? $map : ($map[$value] ?? null); + return $value === null ? $map : ($map[$value] ?? null); } /** @@ -197,7 +197,7 @@ public static function valueToLabel($value = null) public static function labelToValue(string $label = null) { $map = self::columnValues(0, 1); - return $label == null ? $map : ($map[$label] ?? null); + return $label === null ? $map : ($map[$label] ?? null); } /**