Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 928-931 (lines=4) @@
925
926
        // Configure form to respond to validation errors with form schema
927
        // if requested via react.
928
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
929
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
930
            return $this->getSchemaResponse($schemaId, $form, $errors);
931
        });
932
933
        return $form;
934
    }
@@ 1285-1288 (lines=4) @@
1282
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1283
        $form = $handler->Form($record);
1284
1285
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1286
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1287
            return $this->getSchemaResponse($schemaId, $form, $errors);
1288
        });
1289
1290
        return $form;
1291
    }