Code Duplication    Length = 9-9 lines in 2 locations

src/Http/BaseController.php 2 locations

@@ 463-471 (lines=9) @@
460
     * @throws ContainerExceptionInterface
461
     * @throws NotFoundExceptionInterface
462
     */
463
    protected static function createOnCreateValidator(ContainerInterface $container): JsonApiValidatorInterface
464
    {
465
        assert(
466
            empty(static::ON_CREATE_VALIDATION_RULES_SET_CLASS) === false,
467
            'Validation rules set should be defined for class ' . static::class . '.'
468
        );
469
470
        return static::createJsonApiValidator($container, static::ON_CREATE_VALIDATION_RULES_SET_CLASS);
471
    }
472
473
    /**
474
     * @param ContainerInterface $container
@@ 481-489 (lines=9) @@
478
     * @throws ContainerExceptionInterface
479
     * @throws NotFoundExceptionInterface
480
     */
481
    protected static function createOnUpdateValidator(ContainerInterface $container): JsonApiValidatorInterface
482
    {
483
        assert(
484
            empty(static::ON_UPDATE_VALIDATION_RULES_SET_CLASS) === false,
485
            'Validation rules set should be defined for class ' . static::class . '.'
486
        );
487
488
        return static::createJsonApiValidator($container, static::ON_UPDATE_VALIDATION_RULES_SET_CLASS);
489
    }
490
491
    /**
492
     * @param ContainerInterface $container