Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 772-775 (lines=4) @@
769
770
        // Configure form to respond to validation errors with form schema
771
        // if requested via react.
772
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
773
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
774
            return $this->getSchemaResponse($schemaId, $form, $errors);
775
        });
776
777
        return $form;
778
    }
@@ 1130-1133 (lines=4) @@
1127
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1128
        $form = $handler->Form($record);
1129
1130
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1131
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1132
            return $this->getSchemaResponse($schemaId, $form, $errors);
1133
        });
1134
1135
        return $form;
1136
    }