Skip to content

Commit c5a8c54

Browse files
committed
Fix undefined property name in AlterOperation
Introduced by 274fc3a. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent a353ed3 commit c5a8c54

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

psalm-baseline.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<InvalidScalarArgument occurrences="1">
1313
<code>$arrayKey</code>
1414
</InvalidScalarArgument>
15+
<MixedArrayOffset occurrences="1">
16+
<code>Parser::$STATEMENT_PARSERS[$token-&gt;value]</code>
17+
</MixedArrayOffset>
1518
<MoreSpecificImplementedParamType occurrences="1">
1619
<code>$component</code>
1720
</MoreSpecificImplementedParamType>

src/Components/AlterOperation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
445445
);
446446
break;
447447
}
448-
} elseif (! empty(Parser::$statementParsers[$token->value])) {
448+
} elseif (! empty(Parser::$STATEMENT_PARSERS[$token->value])) {
449449
// We have reached the end of ALTER operation and suddenly found
450450
// a start to new statement, but have not found a delimiter between them
451451
$parser->error(

tests/data/parser/parseAlter3.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@
554554
"lexer": [],
555555
"parser": [
556556
[
557-
"Missing comma before start of a new alter operation.",
557+
"A new statement was found, but no delimiter between it and the previous one.",
558558
{
559559
"@type": "@27"
560560
},

0 commit comments

Comments
 (0)