equals(parent::$constant()); } throw new BadMethodCallException("Method $name does not exist on enum"); } /** * @since 2.20.0 */ public function isOneOf(Enum...$enums): bool { foreach($enums as $enum) { if ( $this->equals($enum) ) { return true; } } return false; } /** * @since 2.20.0 */ public function getKeyAsCamelCase(): string { return Str::camel($this->getKey()); } /** * @since 2.20.0 */ protected static function hasConstant(string $name): bool { return array_key_exists($name, static::toArray()); } }