Code Duplication    Length = 4-4 lines in 3 locations

code/Controller/AssetAdmin.php 3 locations

@@ 767-770 (lines=4) @@
764
765
        // Configure form to respond to validation errors with form schema
766
        // if requested via react.
767
        $form->setValidationResponseCallback(function () use ($form, $file) {
768
            $schemaId = Controller::join_links($this->Link('schema/FileEditForm'), $file->exists() ? $file->ID : '');
769
            return $this->getSchemaResponse($form, $schemaId);
770
        });
771
772
        return $form;
773
    }
@@ 874-877 (lines=4) @@
871
872
        // Configure form to respond to validation errors with form schema
873
        // if requested via react.
874
        $form->setValidationResponseCallback(function () use ($form, $id, $versionId) {
875
            $schemaId = Controller::join_links($this->Link('schema/FileHistoryForm'), $id, $versionId);
876
            return $this->getSchemaResponse($form, $schemaId);
877
        });
878
879
880
        return $form;
@@ 1247-1250 (lines=4) @@
1244
        $handler = AddToCampaignHandler::create($this, $record);
1245
        $form = $handler->Form($record);
1246
1247
        $form->setValidationResponseCallback(function () use ($form, $id) {
1248
            $schemaId = Controller::join_links($this->Link('schema/AddToCampaignForm'), $id);
1249
            return $this->getSchemaResponse($form, $schemaId);
1250
        });
1251
1252
        return $form;
1253
    }