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 (ValidationResult $errors) use ($form, $id) {
767
            $schemaId = Controller::join_links($this->Link('schema/FileEditForm'), $id);
768
            return $this->getSchemaResponse($schemaId, $form, $errors);
769
        });
770
771
        return $form;
772
    }
@@ 873-876 (lines=4) @@
870
871
        // Configure form to respond to validation errors with form schema
872
        // if requested via react.
873
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
874
            $schemaId = Controller::join_links($this->Link('schema/FileHistoryForm'), $id, $versionId);
875
            return $this->getSchemaResponse($schemaId, $form, $errors);
876
        });
877
878
        return $form;
879
    }
@@ 1241-1244 (lines=4) @@
1238
        $handler = AddToCampaignHandler::create($this, $record);
1239
        $form = $handler->Form($record);
1240
1241
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1242
            $schemaId = Controller::join_links($this->Link('schema/AddToCampaignForm'), $id);
1243
            return $this->getSchemaResponse($schemaId, $form, $errors);
1244
        });
1245
1246
        return $form;
1247
    }