src/Immutable/Command.php
final public function validateType($type)
    {
        $class = new \ReflectionObject($this);
        $constants = $class->getConstants();

        if ($type !== null && in_array($type, $constants, true) === false) {
            throw new \InvalidArgumentException(
                sprintf(
                    self::ERROR_UNSUPPORTED_TYPE,
                    implode('", "', $constants),
                    $type
                )
            );
        }
    }
final public function validateType($type)
    {
        $class = new \ReflectionObject($this);
        $constants = $class->getConstants();

        if ($type !== null && in_array($type, $constants, true) === false) {
            throw new \InvalidArgumentException(
                sprintf(
                    self::ERROR_UNSUPPORTED_TYPE,
                    implode('", "', $constants),
                    $type
                )
            );
        }
    }
@param string $type

@throws \InvalidArgumentException