| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | abstract class Coder implements Formatter |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var CodeMap Code map for coding character trees. |
||
| 15 | */ |
||
| 16 | private $codeMap; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param CodeMap $codeMap Code map for coding character trees. |
||
| 20 | */ |
||
| 21 | 5 | public function __construct(CodeMap $codeMap) |
|
| 24 | 5 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param CharTree $charTree Character tree to format. |
||
| 28 | * @return CharTree Coded variant of the character tree. |
||
| 29 | */ |
||
| 30 | abstract protected function applyCurrent(CharTree $charTree): CharTree; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param CharTree $charTree Character tree to format. |
||
| 34 | * @return CharTree Coded variant of the character tree. Memoization is not used. |
||
| 35 | */ |
||
| 36 | 31 | protected function format(CharTree $charTree): CharTree |
|
| 55 |