diff --git a/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php b/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php index 2e76f9517..91731a1a5 100644 --- a/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php +++ b/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php @@ -379,7 +379,7 @@ class FunctionDocblockManipulator $old_psalm_return_type = null; if (isset($parsed_docblock->tags['psalm-return'])) { - $old_psalm_return_type = array_shift($parsed_docblock->tags['psalm-return']); + $old_psalm_return_type = reset($parsed_docblock->tags['psalm-return']); } if ($this->new_psalm_return_type