@@ -17,7 +17,7 @@ class yyToken implements ArrayAccess
1717 public $ string = '' ;
1818 public $ metadata = array ();
1919
20- function __construct ($ s , $ m = array ())
20+ public function __construct ($ s , $ m = array ())
2121 {
2222 if ($ s instanceof yyToken) {
2323 $ this ->string = $ s ->string ;
@@ -32,22 +32,22 @@ function __construct($s, $m = array())
3232 }
3333 }
3434
35- function __toString ()
35+ public function __toString ()
3636 {
3737 return $ this ->string ;
3838 }
3939
40- function offsetExists ($ offset )
40+ public function offsetExists (mixed $ offset ): bool
4141 {
4242 return isset ($ this ->metadata [$ offset ]);
4343 }
4444
45- function offsetGet ($ offset )
45+ public function offsetGet (mixed $ offset ): mixed
4646 {
4747 return $ this ->metadata [$ offset ];
4848 }
4949
50- function offsetSet ($ offset , $ value )
50+ public function offsetSet (mixed $ offset , mixed $ value ): void
5151 {
5252 if ($ offset === null ) {
5353 if (isset ($ value [0 ])) {
@@ -70,7 +70,7 @@ function offsetSet($offset, $value)
7070 }
7171 }
7272
73- function offsetUnset ($ offset )
73+ public function offsetUnset (mixed $ offset ): void
7474 {
7575 unset($ this ->metadata [$ offset ]);
7676 }
@@ -1945,7 +1945,6 @@ static function yy_destructor($yymajor, $yypminor)
19451945 * is popped from the stack, then call it.
19461946 *
19471947 * Return the major token number for the symbol popped.
1948- * @param yyParser
19491948 * @return int
19501949 */
19511950 function yy_pop_parser_stack ()
@@ -2024,7 +2023,7 @@ function yy_get_expected_tokens($token)
20242023 if ($ nextstate < self ::YYNSTATE ) {
20252024 // we need to shift a non-terminal
20262025 $ this ->yyidx ++;
2027- $ x = new yyStackEntry ;
2026+ $ x = new yyStackEntry () ;
20282027 $ x ->stateno = $ nextstate ;
20292028 $ x ->major = self ::$ yyRuleInfo [$ yyruleno ]['lhs ' ];
20302029 $ this ->yystack [$ this ->yyidx ] = $ x ;
@@ -2098,7 +2097,7 @@ function yy_is_expected_token($token)
20982097 if ($ nextstate < self ::YYNSTATE ) {
20992098 // we need to shift a non-terminal
21002099 $ this ->yyidx ++;
2101- $ x = new yyStackEntry ;
2100+ $ x = new yyStackEntry () ;
21022101 $ x ->stateno = $ nextstate ;
21032102 $ x ->major = self ::$ yyRuleInfo [$ yyruleno ]['lhs ' ];
21042103 $ this ->yystack [$ this ->yyidx ] = $ x ;
@@ -2228,7 +2227,7 @@ function yy_shift($yyNewState, $yyMajor, $yypMinor)
22282227 ** stack ever overflows */
22292228 return ;
22302229 }
2231- $ yytos = new yyStackEntry ;
2230+ $ yytos = new yyStackEntry () ;
22322231 $ yytos ->stateno = $ yyNewState ;
22332232 $ yytos ->major = $ yyMajor ;
22342233 $ yytos ->minor = $ yypMinor ;
@@ -3104,7 +3103,7 @@ function yy_reduce($yyruleno)
31043103 ** That gives a significant speed improvement. */
31053104 if (!self ::$ yyTraceFILE && $ yysize ) {
31063105 $ this ->yyidx ++;
3107- $ x = new yyStackEntry ;
3106+ $ x = new yyStackEntry () ;
31083107 $ x ->stateno = $ yyact ;
31093108 $ x ->major = $ yygoto ;
31103109 $ x ->minor = $ yy_lefthand_side ;
@@ -3195,7 +3194,7 @@ function parse($token)
31953194 /* if ($yymajor == 0) return; // not sure why this was here... */
31963195 $ this ->yyidx = 0 ;
31973196 $ this ->yyerrcnt = -1 ;
3198- $ x = new yyStackEntry ;
3197+ $ x = new yyStackEntry () ;
31993198 $ x ->stateno = 0 ;
32003199 $ x ->major = 0 ;
32013200 $ this ->yystack = array ();
0 commit comments