Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 666-669 (lines=4) @@
663
664
        // Configure form to respond to validation errors with form schema
665
        // if requested via react.
666
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
667
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
668
            return $this->getSchemaResponse($schemaId, $form, $errors);
669
        });
670
671
        return $form;
672
    }
@@ 968-971 (lines=4) @@
965
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
966
        $form = $handler->Form($record);
967
968
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
969
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
970
            return $this->getSchemaResponse($schemaId, $form, $errors);
971
        });
972
973
        return $form;
974
    }