| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | ]; |
| 35 | 35 | /** |
| 36 | 36 | * @param Lexer|null $lexer Lexer used to tokenize expressions |
| 37 | 37 | */ |
| 38 | - public function __construct(Lexer $lexer = null) | |
| 38 | + public function __construct(?Lexer $lexer = null) | |
| 39 | 39 | { |
| 40 | 40 | $this->lexer = $lexer ?: new Lexer(); |
| 41 | 41 | } |
| 42 | 42 | /** |
| @@ -254,14 +254,14 @@ | ||
| 254 | 254 | $this->next($validColon); |
| 255 | 255 | $this->next(); |
| 256 | 256 | return ['type' => 'key_val_pair', 'value' => $key, 'children' => [$this->expr()]]; |
| 257 | 257 | } |
| 258 | - private function parseWildcardObject(array $left = null) | |
| 258 | + private function parseWildcardObject(?array $left = null) | |
| 259 | 259 | { |
| 260 | 260 | $this->next(); |
| 261 | 261 | return ['type' => 'projection', 'from' => 'object', 'children' => [$left ?: self::$currentNode, $this->parseProjection(self::$bp[T::T_STAR])]]; |
| 262 | 262 | } |
| 263 | - private function parseWildcardArray(array $left = null) | |
| 263 | + private function parseWildcardArray(?array $left = null) | |
| 264 | 264 | { |
| 265 | 265 | static $getRbracket = [T::T_RBRACKET => \true]; |
| 266 | 266 | $this->next($getRbracket); |
| 267 | 267 | $this->next(); |
| @@ -318,9 +318,9 @@ | ||
| 318 | 318 | private function lookahead() |
| 319 | 319 | { |
| 320 | 320 | return !isset($this->tokens[$this->tpos + 1]) ? T::T_EOF : $this->tokens[$this->tpos + 1]['type']; |
| 321 | 321 | } |
| 322 | - private function next(array $match = null) | |
| 322 | + private function next(?array $match = null) | |
| 323 | 323 | { |
| 324 | 324 | if (!isset($this->tokens[$this->tpos + 1])) { |
| 325 | 325 | $this->token = self::$nullToken; |
| 326 | 326 | } else { |