From 8f448eaab4ef0dd1d72e119998cfe7fa99883b23 Mon Sep 17 00:00:00 2001 From: Jan Pecha Date: Tue, 19 Mar 2024 10:23:32 +0100 Subject: [PATCH] Ast: FunctionReturnType - fixed formatting --- src/Ast/FunctionReturnType.php | 2 +- tests/PhpSimpleAst/fixtures/PHP-8.0/80000.union-types.dump | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ast/FunctionReturnType.php b/src/Ast/FunctionReturnType.php index 19cdf84..d271d07 100644 --- a/src/Ast/FunctionReturnType.php +++ b/src/Ast/FunctionReturnType.php @@ -52,7 +52,7 @@ public function toString() public static function parse(NodeParser $parser) { $indentation = $parser->consumeNodeIndentation(); - $parser->consumeAsUnknowContent(':'); + $parser->consumeAsIndentation(':'); $parser->consumeWhitespace(); $indentation .= $parser->flushIndentation(); $nullable = FALSE; diff --git a/tests/PhpSimpleAst/fixtures/PHP-8.0/80000.union-types.dump b/tests/PhpSimpleAst/fixtures/PHP-8.0/80000.union-types.dump index f5dc6e3..5d32e03 100644 --- a/tests/PhpSimpleAst/fixtures/PHP-8.0/80000.union-types.dump +++ b/tests/PhpSimpleAst/fixtures/PHP-8.0/80000.union-types.dump @@ -82,7 +82,7 @@ CzProject\PhpSimpleAst\Ast\PhpString | | | | | | | | | defaultValue: null | | | | | | | closer: ')' | | | | | | returnType: CzProject\PhpSimpleAst\Ast\FunctionReturnType - | | | | | | | indentation: ' ' + | | | | | | | indentation: ': ' | | | | | | | nullable: false | | | | | | | type: CzProject\PhpSimpleAst\Ast\Type | | | | | | | | indentation: ''