Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 814-817 (lines=4) @@
811
812
        // Configure form to respond to validation errors with form schema
813
        // if requested via react.
814
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
815
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
816
            return $this->getSchemaResponse($schemaId, $form, $errors);
817
        });
818
819
        return $form;
820
    }
@@ 1172-1175 (lines=4) @@
1169
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1170
        $form = $handler->Form($record);
1171
1172
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1173
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1174
            return $this->getSchemaResponse($schemaId, $form, $errors);
1175
        });
1176
1177
        return $form;
1178
    }