From 15362b1e8f2b4b25248e5801c6cd0fee70ac22d8 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Tue, 23 Aug 2022 08:27:01 -0400 Subject: [PATCH] Remove impossible check for empty list AmpersandToken would only occur on odd numbered offsets --- src/Parser.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Parser.php b/src/Parser.php index 6019e4e..f478da2 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -849,9 +849,6 @@ class Parser { if (end($children) instanceof MissingToken && ($children[\count($children) - 2]->kind ?? null) === TokenKind::AmpersandToken) { array_pop($parameter->typeDeclarationList->children); $parameter->byRefToken = array_pop($parameter->typeDeclarationList->children); - if (!$parameter->typeDeclarationList->children) { - $parameter->typeDeclarationList = null; - } } } elseif ($parameter->questionToken) { // TODO ParameterType?