Code Duplication    Length = 4-4 lines in 3 locations

code/Controller/AssetAdmin.php 3 locations

@@ 806-809 (lines=4) @@
803
804
        // Configure form to respond to validation errors with form schema
805
        // if requested via react.
806
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
807
            $schemaId = Controller::join_links($this->Link('schema/fileEditForm'), $id);
808
            return $this->getSchemaResponse($schemaId, $form, $errors);
809
        });
810
811
        return $form;
812
    }
@@ 913-916 (lines=4) @@
910
911
        // Configure form to respond to validation errors with form schema
912
        // if requested via react.
913
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
914
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
915
            return $this->getSchemaResponse($schemaId, $form, $errors);
916
        });
917
918
        return $form;
919
    }
@@ 1270-1273 (lines=4) @@
1267
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1268
        $form = $handler->Form($record);
1269
1270
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1271
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1272
            return $this->getSchemaResponse($schemaId, $form, $errors);
1273
        });
1274
1275
        return $form;
1276
    }