Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
SelserData
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2declare( strict_types = 1 );
3
4namespace Wikimedia\Parsoid\Core;
5
6use Wikimedia\Parsoid\DOM\Document;
7
8/**
9 * Data that's necessary for selective serialization, to be passed to the
10 * library entrypoint.
11 */
12class SelserData {
13
14    /** @var string */
15    public $oldText;
16
17    /** @var string */
18    public $oldHTML;
19
20    /**
21     * DOM document corresponding to $oldHTML
22     * @var Document
23     */
24    public $oldDOM;
25
26    /**
27     * Data that's necessary to perform selective serialization.
28     *
29     * @param string $oldText
30     * @param ?string $oldHTML
31     */
32    public function __construct( string $oldText, ?string $oldHTML = null ) {
33        $this->oldText = $oldText;
34        $this->oldHTML = $oldHTML;
35    }
36
37}