protected function validateNumberType($value, array $schema): ErrorResult
    {
        $result = new ErrorResult();
        if (is_numeric($value) === false) {
            $result->addError($this->createError('type=number', 'type=' . gettype($value)));
            return $result;
        }

        if (isset($schema['maximum'])) {
            if (isset($schema['exclusiveMaximum']) && $schema['exclusiveMaximum'] === true) {
                if ($value >= $schema['maximum']) {
                    $result->addError($this->createError('maximum(exclusive)=' . $schema['maximum'], $value));
                }
            } else {
                if ($value > $schema['maximum']) {
                    $result->addError($this->createError('maximum=' . $schema['maximum'], $value));
                }
            }
        }

        if (isset($schema['minimum'])) {
            if (isset($schema['exclusiveMinimum']) && $schema['exclusiveMinimum'] === true) {
                if ($value <= $schema['minimum']) {
                    $result->addError($this->createError('minimum(exclusive)=' . $schema['minimum'], $value));
                }
            } else {
                if ($value < $schema['minimum']) {
                    $result->addError($this->createError('minimum=' . $schema['minimum'], $value));
                }
            }
        }

        if (isset($schema['divisibleBy']) && $value % $schema['divisibleBy'] !== 0) {
            $result->addError($this->createError('divisibleBy=' . $schema['divisibleBy'], $value));
        }

        return $result;
    }