Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 869-872 (lines=4) @@
866
867
        // Configure form to respond to validation errors with form schema
868
        // if requested via react.
869
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
870
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
871
            return $this->getSchemaResponse($schemaId, $form, $errors);
872
        });
873
874
        return $form;
875
    }
@@ 1227-1230 (lines=4) @@
1224
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1225
        $form = $handler->Form($record);
1226
1227
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1228
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1229
            return $this->getSchemaResponse($schemaId, $form, $errors);
1230
        });
1231
1232
        return $form;
1233
    }