1: | <?php declare(strict_types=1); |
2: | |
3: | namespace PhpParser\Lexer\TokenEmulator; |
4: | |
5: | use PhpParser\Lexer\Emulative; |
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(): string { |
24: | return Emulative::PHP_8_2; |
25: | } |
26: | |
27: | public function reverseEmulate(string $code, array $tokens): array { |
28: | |
29: | return $tokens; |
30: | } |
31: | } |
32: | |