self::MIXED, 'string' => self::STRING, 'int' => self::INT, 'float' => self::FLOAT, 'bool' => self::BOOL, 'array' => self::ARRAY }; } catch (\UnhandledMatchError) { throw new IncorrectTypeException('unknown string definition'); } } /** * get string definition for current enum value * * @return string * @throws IncorrectTypeException * * @experimental 31.0.0 */ public function getDefinition(): string { try { return match ($this) { self::MIXED => 'mixed', self::STRING => 'string', self::INT => 'int', self::FLOAT => 'float', self::BOOL => 'bool', self::ARRAY => 'array', }; } catch (UnhandledMatchError) { throw new IncorrectTypeException('unknown type definition ' . $this->value); } } }