Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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