Code Duplication    Length = 4-4 lines in 3 locations

code/Controller/AssetAdmin.php 3 locations

@@ 766-769 (lines=4) @@
763
764
        // Configure form to respond to validation errors with form schema
765
        // if requested via react.
766
        $form->setValidationResponseCallback(function() use ($form, $file) {
767
            $schemaId = Controller::join_links($this->Link('schema/FileEditForm'), $file->exists() ? $file->ID : '');
768
            return $this->getSchemaResponse($form, $schemaId);
769
        });
770
771
        return $form;
772
    }
@@ 870-873 (lines=4) @@
867
868
        // Configure form to respond to validation errors with form schema
869
        // if requested via react.
870
        $form->setValidationResponseCallback(function() use ($form, $id, $versionId) {
871
            $schemaId = Controller::join_links($this->Link('schema/FileHistoryForm'), $id, $versionId);
872
            return $this->getSchemaResponse($form, $schemaId);
873
        });
874
875
876
        return $form;
@@ 1242-1245 (lines=4) @@
1239
        $handler = AddToCampaignHandler::create($this, $record);
1240
        $form = $handler->Form($record);
1241
1242
        $form->setValidationResponseCallback(function() use ($form, $id) {
1243
            $schemaId = Controller::join_links($this->Link('schema/AddToCampaignForm'), $id);
1244
            return $this->getSchemaResponse($form, $schemaId);
1245
        });
1246
1247
        return $form;
1248
    }