Code Duplication    Length = 4-4 lines in 3 locations

code/Controller/AssetAdmin.php 3 locations

@@ 802-805 (lines=4) @@
799
800
        // Configure form to respond to validation errors with form schema
801
        // if requested via react.
802
        $form->setValidationResponseCallback(function() use ($form, $file) {
803
            $schemaId = Controller::join_links($this->Link('schema/FileEditForm'), $file->exists() ? $file->ID : '');
804
            return $this->getSchemaResponse($form, $schemaId);
805
        });
806
807
        return $form;
808
    }
@@ 909-912 (lines=4) @@
906
907
        // Configure form to respond to validation errors with form schema
908
        // if requested via react.
909
        $form->setValidationResponseCallback(function() use ($form, $id, $versionId) {
910
            $schemaId = Controller::join_links($this->Link('schema/FileHistoryForm'), $id, $versionId);
911
            return $this->getSchemaResponse($form, $schemaId);
912
        });
913
914
915
        return $form;
@@ 1283-1286 (lines=4) @@
1280
        $handler = AddToCampaignHandler::create($this, $record);
1281
        $form = $handler->Form($record);
1282
1283
        $form->setValidationResponseCallback(function() use ($form, $id) {
1284
            $schemaId = Controller::join_links($this->Link('schema/AddToCampaignForm'), $id);
1285
            return $this->getSchemaResponse($form, $schemaId);
1286
        });
1287
1288
        return $form;
1289
    }