| Total Complexity | 2 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | abstract class AbstractConvert implements ConvertInterface |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * The conversion result. |
||
| 28 | * |
||
| 29 | * @var mixed |
||
| 30 | */ |
||
| 31 | protected $result; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * The list of tokens. |
||
| 35 | * |
||
| 36 | * @var Tokens |
||
| 37 | */ |
||
| 38 | protected $tokens; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | public function convert(Tokens $tokens) |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Handles the conversion of the current token. |
||
| 57 | */ |
||
| 58 | abstract protected function handle(): void; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Resets the state of the converter. |
||
| 62 | * |
||
| 63 | * @param Tokens $tokens the new list of tokens |
||
| 64 | */ |
||
| 65 | abstract protected function reset(Tokens $tokens): void; |
||
| 66 | } |
||
| 67 |