Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
TranslateAnnotationStripper | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
stripAnnotations | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace MediaWiki\Extension\Translate\PageTranslation; |
5 | |
6 | use Wikimedia\Parsoid\Ext\AnnotationStripper; |
7 | |
8 | class TranslateAnnotationStripper implements AnnotationStripper { |
9 | private TranslatablePageParser $parser; |
10 | |
11 | public function __construct( TranslatablePageParser $parser ) { |
12 | $this->parser = $parser; |
13 | } |
14 | |
15 | public function stripAnnotations( string $s ): string { |
16 | return $this->parser->cleanupTags( $s ); |
17 | } |
18 | } |