Skip to content

Commit 3db1a07

Browse files
committed
Replace array_map with for loop to fix PHP 5.3 failure
1 parent ded1c64 commit 3db1a07

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Enum.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,13 @@ public static function keys()
9090
*/
9191
public static function values()
9292
{
93-
return array_map(function ($value) {
94-
return new static($value);
95-
}, self::toArray());
93+
$values = [];
94+
95+
foreach (self::toArray() as $key => $value) {
96+
$values[$key] = new static($value);
97+
}
98+
99+
return $values;
96100
}
97101

98102
/**

0 commit comments

Comments
 (0)