Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 919-922 (lines=4) @@
916
917
        // Configure form to respond to validation errors with form schema
918
        // if requested via react.
919
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
920
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
921
            return $this->getSchemaResponse($schemaId, $form, $errors);
922
        });
923
924
        return $form;
925
    }
@@ 1282-1285 (lines=4) @@
1279
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1280
        $form = $handler->Form($record);
1281
1282
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1283
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1284
            return $this->getSchemaResponse($schemaId, $form, $errors);
1285
        });
1286
1287
        return $form;
1288
    }