Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
4 / 4 |
CRAP | |
100.00% |
1 / 1 |
RemoveFormRequest | |
100.00% |
5 / 5 |
|
100.00% |
4 / 4 |
4 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getChangeOp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFormId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getBaseRevId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace Wikibase\Lexeme\MediaWiki\Api; |
4 | |
5 | use Wikibase\Lexeme\DataAccess\ChangeOp\ChangeOpRemoveForm; |
6 | use Wikibase\Lexeme\Domain\Model\FormId; |
7 | |
8 | /** |
9 | * @license GPL-2.0-or-later |
10 | */ |
11 | class RemoveFormRequest { |
12 | |
13 | private FormId $formId; |
14 | |
15 | /** |
16 | * @var int|null |
17 | */ |
18 | private $baseRevId; |
19 | |
20 | /** |
21 | * @param FormId $formId |
22 | * @param int|null $baseRevId |
23 | */ |
24 | public function __construct( FormId $formId, $baseRevId ) { |
25 | $this->formId = $formId; |
26 | $this->baseRevId = $baseRevId; |
27 | } |
28 | |
29 | public function getChangeOp(): ChangeOpRemoveForm { |
30 | return new ChangeOpRemoveForm( $this->formId ); |
31 | } |
32 | |
33 | public function getFormId(): FormId { |
34 | return $this->formId; |
35 | } |
36 | |
37 | /** |
38 | * @return int|null |
39 | */ |
40 | public function getBaseRevId() { |
41 | return $this->baseRevId; |
42 | } |
43 | |
44 | } |