1<?php declare(strict_types=1); 2 3namespace PhpParser\Lexer\TokenEmulator; 4 5/** @internal */ 6interface TokenEmulatorInterface 7{ 8 public function getPhpVersion(): string; 9 10 public function isEmulationNeeded(string $code): bool; 11 12 /** 13 * @return array Modified Tokens 14 */ 15 public function emulate(string $code, array $tokens): array; 16 17 /** 18 * @return array Modified Tokens 19 */ 20 public function reverseEmulate(string $code, array $tokens): array; 21} 22