From ad6229fe67c7ee944d5679ce584f11e89c42d1d6 Mon Sep 17 00:00:00 2001 From: orklah Date: Tue, 5 Oct 2021 20:27:13 +0200 Subject: [PATCH] fix error --- .../Internal/FileManipulation/FunctionDocblockManipulator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php b/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php index 84758ef6d..7505fbc7d 100644 --- a/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php +++ b/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php @@ -237,7 +237,7 @@ class FunctionDocblockManipulator continue; } - if ($chars[$i + 1] === '\\' || preg_match('/\w/', $char)) { + if ($chars[$i] === '\\' || preg_match('/\w/', $char)) { if ($this->return_typehint_start === null) { $this->return_typehint_start = $i + $end_bracket_position + 1; }