Skip to content

Commit 5fa55b5

Browse files
committed
Merge pull request #11 from drealecs/performance-optimizations
some performance improvements
2 parents c0bcd73 + 0b15321 commit 5fa55b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Enum.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function __toString()
7979
*/
8080
public static function keys()
8181
{
82-
return array_keys(static::toArray());
82+
return array_keys(self::toArray());
8383
}
8484

8585
/**
@@ -130,7 +130,7 @@ public static function isValidKey($key)
130130
*/
131131
public static function search($value)
132132
{
133-
return array_search($value, array_combine(self::keys(), self::toArray()));
133+
return array_search($value, self::toArray());
134134
}
135135

136136
/**

0 commit comments

Comments
 (0)