Code Duplication    Length = 10-10 lines in 2 locations

src/Fields/BaseField.php 2 locations

@@ 253-262 (lines=10) @@
250
                ]);
251
            }
252
        }
253
        if (
254
            isset($constraints->minimum)
255
            && !$this->checkMinimumConstraint($val, $this->castValueNoConstraints($constraints->minimum))
256
        ) {
257
            $validationErrors[] = new SchemaValidationError(SchemaValidationError::FIELD_VALIDATION, [
258
                'field' => $this->name(),
259
                'value' => $val,
260
                'error' => 'value is below minimum',
261
            ]);
262
        }
263
        if (
264
            isset($constraints->maximum)
265
            && !$this->checkMaximumConstraint($val, $this->castValueNoConstraints($constraints->maximum))
@@ 263-272 (lines=10) @@
260
                'error' => 'value is below minimum',
261
            ]);
262
        }
263
        if (
264
            isset($constraints->maximum)
265
            && !$this->checkMaximumConstraint($val, $this->castValueNoConstraints($constraints->maximum))
266
        ) {
267
            $validationErrors[] = new SchemaValidationError(SchemaValidationError::FIELD_VALIDATION, [
268
                'field' => $this->name(),
269
                'value' => $val,
270
                'error' => 'value is above maximum',
271
            ]);
272
        }
273
        if (
274
            isset($constraints->minLength) && !$this->checkMinLengthConstraint($val, $constraints->minLength)
275
        ) {