Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
ValidationParams | |
0.00% |
0 / 6 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
getPageIdentity | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getFlags | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getParentRevisionId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | namespace MediaWiki\Content; |
3 | |
4 | use MediaWiki\Page\PageIdentity; |
5 | |
6 | /** |
7 | * @since 1.38 |
8 | * An object to hold validation params. |
9 | */ |
10 | class ValidationParams { |
11 | /** @var PageIdentity */ |
12 | private $pageIdentity; |
13 | |
14 | /** @var int */ |
15 | private $flags; |
16 | |
17 | /** @var int */ |
18 | private $parentRevId; |
19 | |
20 | public function __construct( PageIdentity $pageIdentity, int $flags, int $parentRevId = -1 ) { |
21 | $this->pageIdentity = $pageIdentity; |
22 | $this->flags = $flags; |
23 | $this->parentRevId = $parentRevId; |
24 | } |
25 | |
26 | /** |
27 | * |
28 | * @return PageIdentity |
29 | */ |
30 | public function getPageIdentity(): PageIdentity { |
31 | return $this->pageIdentity; |
32 | } |
33 | |
34 | /** |
35 | * |
36 | * @return int |
37 | */ |
38 | public function getFlags(): int { |
39 | return $this->flags; |
40 | } |
41 | |
42 | /** |
43 | * @deprecated since 1.38. Born soft-deprecated as we will move usage of it |
44 | * to MultiContentSaveHook in ProofreadPage (only one place of usage). |
45 | * |
46 | * @return int |
47 | */ |
48 | public function getParentRevisionId(): int { |
49 | return $this->parentRevId; |
50 | } |
51 | } |