Skip to content

Commit 55ecb5e

Browse files
New test to solution the PHP 5.3 error
1 parent a57055c commit 55ecb5e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Enum.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,13 @@ public static function search($value)
174174
public static function findValue($key)
175175
{
176176
$array = static::toArray();
177+
$value = null;
177178

178-
return (isset($array[$key])) ? $array[$key] : null;
179+
if (isset($array[$key])) {
180+
$value = $array[$key];
181+
}
182+
183+
return $value;
179184
}
180185

181186
/**

0 commit comments

Comments
 (0)