diff --git a/src/Options.php b/src/Options.php index 25e141f..037f4e0 100644 --- a/src/Options.php +++ b/src/Options.php @@ -29,13 +29,11 @@ trait Options if ($firstCase === null) { return ''; - } elseif ($firstCase instanceof BackedEnum) { - // [name => value] - $options = static::options(); - } else { - // [name, name] - $options = static::options(); + } + // [name, name] + $options = static::options(); + if (!$firstCase instanceof BackedEnum) { // [name => name, name => name] $options = array_combine($options, $options); }