Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 712-715 (lines=4) @@
709
710
        // Configure form to respond to validation errors with form schema
711
        // if requested via react.
712
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
713
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
714
            return $this->getSchemaResponse($schemaId, $form, $errors);
715
        });
716
717
        return $form;
718
    }
@@ 1014-1017 (lines=4) @@
1011
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1012
        $form = $handler->Form($record);
1013
1014
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1015
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1016
            return $this->getSchemaResponse($schemaId, $form, $errors);
1017
        });
1018
1019
        return $form;
1020
    }