Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
SelectiveUpdateData | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace Wikimedia\Parsoid\Core; |
5 | |
6 | use Wikimedia\Parsoid\DOM\Document; |
7 | |
8 | /** |
9 | * Data that's necessary for selective updates (whether html->wt or wt->html). |
10 | * This is always revision (current or previous)wikitext & html. |
11 | */ |
12 | class SelectiveUpdateData { |
13 | public string $revText; |
14 | public ?string $revHTML; |
15 | |
16 | /** |
17 | * DOM document corresponding to $revHTML |
18 | */ |
19 | public Document $revDOM; |
20 | |
21 | /** |
22 | * If we are doing selective updates for a template edit, |
23 | * title string of the edited template. |
24 | */ |
25 | public ?string $templateTitle; |
26 | |
27 | /** |
28 | * Options for selective HTML updates: template, section, generic |
29 | */ |
30 | public ?string $mode; |
31 | |
32 | /** |
33 | * Data that's necessary to perform selective serialization. |
34 | */ |
35 | public function __construct( |
36 | string $revText, ?string $revHTML = null, ?string $mode = null |
37 | ) { |
38 | $this->revText = $revText; |
39 | $this->revHTML = $revHTML; |
40 | $this->mode = $mode; |
41 | } |
42 | } |