Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| LanguageGuesser | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| guessLang | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
| 1 | <?php |
| 2 | declare( strict_types = 1 ); |
| 3 | |
| 4 | namespace Wikimedia\Parsoid\Language; |
| 5 | |
| 6 | use Wikimedia\Bcp47Code\Bcp47Code; |
| 7 | use Wikimedia\Parsoid\DOM\Element; |
| 8 | |
| 9 | /** |
| 10 | * An oracle that gives you a predicted "source language" for every node in a DOM, which is used |
| 11 | * when converting the result back to the source language during round-tripping. |
| 12 | */ |
| 13 | abstract class LanguageGuesser { |
| 14 | |
| 15 | /** |
| 16 | * @param Element $node |
| 17 | * @return Bcp47Code predicted source language |
| 18 | */ |
| 19 | abstract public function guessLang( Element $node ): Bcp47Code; |
| 20 | |
| 21 | } |