Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 15
0.00% covered (danger)
0.00%
0 / 5
CRAP
0.00% covered (danger)
0.00%
0 / 1
ApiFlowUndoEditPost
0.00% covered (danger)
0.00%
0 / 15
0.00% covered (danger)
0.00%
0 / 5
30
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAction
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getBlockParams
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAllowedParams
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
2
 getExamplesMessages
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Flow\Api;
4
5use Wikimedia\ParamValidator\ParamValidator;
6
7class ApiFlowUndoEditPost extends ApiFlowBaseGet {
8    public function __construct( $api, $modName ) {
9        parent::__construct( $api, $modName, 'uep' );
10    }
11
12    protected function getAction() {
13        return 'undo-edit-post';
14    }
15
16    protected function getBlockParams() {
17        return [ 'topic' => $this->extractRequestParams() ];
18    }
19
20    public function getAllowedParams() {
21        return [
22            'startId' => [
23                ParamValidator::PARAM_REQUIRED => true,
24            ],
25            'endId' => [
26                ParamValidator::PARAM_REQUIRED => true,
27            ],
28        ] + parent::getAllowedParams();
29    }
30
31    /**
32     * @inheritDoc
33     */
34    protected function getExamplesMessages() {
35        return [
36            'action=flow&submodule=undo-edit-post&page=Topic:S2tycnas4hcucw8w&uaepostId=???&uaestartId=???&uaeendId=???'
37                => 'apihelp-flow+undo-edit-post-example-1',
38        ];
39    }
40}