public static function invalidValue($type, $value)
    {
        if (is_object($value)) {
            $value = get_class($value);
        } elseif (is_bool($value) || is_null($value)) {
            $value = var_export($value, true);
        }

        return new self(sprintf('The type "%s" does not have a name for the value "%s".', $type, $value));
    }