Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
SwedishFilter | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
processRules | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
getSsmlLang | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Wikispeech\Segment\TextFilter\Sv; |
4 | |
5 | /** |
6 | * @file |
7 | * @ingroup Extensions |
8 | * @license GPL-2.0-or-later |
9 | */ |
10 | |
11 | use MediaWiki\Wikispeech\Segment\TextFilter\RegexFilter; |
12 | |
13 | /** |
14 | * @since 0.1.10 |
15 | */ |
16 | class SwedishFilter extends RegexFilter { |
17 | |
18 | /** |
19 | * @since 0.1.10 |
20 | */ |
21 | public function processRules(): void { |
22 | // Internal order is important! An abstract syntax tree would be way nicer than regex... |
23 | $this->processRule( new DateRule() ); |
24 | $this->processRule( new YearRangeRule() ); |
25 | $this->processRule( new YearRule() ); |
26 | $this->processRule( new NumberRule() ); |
27 | } |
28 | |
29 | /** |
30 | * @since 0.1.10 |
31 | * @return string |
32 | */ |
33 | public function getSsmlLang(): string { |
34 | return 'sv'; |
35 | } |
36 | |
37 | } |