Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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