Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
DiffUtils | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
isDiffMarker | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
hasDiffMarkers | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
subtreeUnchanged | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace Wikimedia\Parsoid\Ext; |
5 | |
6 | use Wikimedia\Parsoid\DOM\Element; |
7 | use Wikimedia\Parsoid\DOM\Node; |
8 | use Wikimedia\Parsoid\Html2Wt\DiffUtils as DU; |
9 | |
10 | /** |
11 | */ |
12 | class DiffUtils { |
13 | |
14 | /** |
15 | * Check a node to see whether it's a diff marker. |
16 | */ |
17 | public static function isDiffMarker( |
18 | ?Node $node, ?string $mark = null |
19 | ): bool { |
20 | return DU::isDiffMarker( $node, $mark ); |
21 | } |
22 | |
23 | /** |
24 | * Check that the diff markers on the node exist. |
25 | */ |
26 | public static function hasDiffMarkers( Node $node ): bool { |
27 | return DU::hasDiffMarkers( $node ); |
28 | } |
29 | |
30 | public static function subtreeUnchanged( Element $node ): bool { |
31 | return DU::subtreeUnchanged( $node ); |
32 | } |
33 | |
34 | } |