| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace PhpParser\Lexer\TokenEmulator; |
| 4: | |
| 5: | use PhpParser\PhpVersion; |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | class ReadonlyFunctionTokenEmulator extends KeywordEmulator { |
| 15: | public function getKeywordString(): string { |
| 16: | return 'readonly'; |
| 17: | } |
| 18: | |
| 19: | public function getKeywordToken(): int { |
| 20: | return \T_READONLY; |
| 21: | } |
| 22: | |
| 23: | public function getPhpVersion(): PhpVersion { |
| 24: | return PhpVersion::fromComponents(8, 2); |
| 25: | } |
| 26: | |
| 27: | public function reverseEmulate(string $code, array $tokens): array { |
| 28: | |
| 29: | return $tokens; |
| 30: | } |
| 31: | } |
| 32: | |