Skip to content

Commit

Permalink
修复 == 引起的代码错误
Browse files Browse the repository at this point in the history
  • Loading branch information
lip8up committed Sep 15, 2021
1 parent 0d5d958 commit 173d0f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 173d0f1

Please sign in to comment.