Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 813-816 (lines=4) @@
810
811
        // Configure form to respond to validation errors with form schema
812
        // if requested via react.
813
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
814
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
815
            return $this->getSchemaResponse($schemaId, $form, $errors);
816
        });
817
818
        return $form;
819
    }
@@ 1171-1174 (lines=4) @@
1168
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1169
        $form = $handler->Form($record);
1170
1171
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1172
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1173
            return $this->getSchemaResponse($schemaId, $form, $errors);
1174
        });
1175
1176
        return $form;
1177
    }