src/Valkyrja/Enum/Enum.php
public function setValue($value): void
    {
        // If the value is not valid
        if (! static::isValid($value)) {
            // Throw an exception
            throw new InvalidArgumentException(
                sprintf(
                    'Invalid enumeration %s for Enum %s',
                    $value,
                    \get_class($this)
                )
            );
        }

        $this->value = $value;
    }
public function setValue($value): void
    {
        // If the value is not valid
        if (! static::isValid($value)) {
            // Throw an exception
            throw new InvalidArgumentException(
                sprintf(
                    'Invalid enumeration %s for Enum %s',
                    $value,
                    \get_class($this)
                )
            );
        }

        $this->value = $value;
    }
Set the enum value.

@param mixed $value The value to set

@throws \InvalidArgumentException

@return void