Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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