Skip to content

Commit ec1d4fc

Browse files
author
Willem Stuursma
committed
Replace function call with language construct (isset([]) evaluates to true)
1 parent cad9c48 commit ec1d4fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Enum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public static function values()
119119
public static function toArray()
120120
{
121121
$class = \get_called_class();
122-
if (!\array_key_exists($class, static::$cache)) {
122+
if (!isset(static::$cache[$class])) {
123123
$reflection = new \ReflectionClass($class);
124124
static::$cache[$class] = $reflection->getConstants();
125125
}

0 commit comments

Comments
 (0)