Code Duplication    Length = 4-4 lines in 3 locations

code/Controller/AssetAdmin.php 3 locations

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