diff --git a/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php b/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php index ca652333e..6cc3c5946 100644 --- a/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php +++ b/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php @@ -405,6 +405,7 @@ class FunctionDocblockManipulator $inferredThrowsClause = array_reduce( $this->throwsExceptions, function (string $throwsClause, string $exception) { + $exception = '\\' . $exception; return $throwsClause === '' ? $exception : $throwsClause.'|'.$exception; }, ''