1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Ensure @throws annotations reference valid Exception classes

This commit is contained in:
dennis 2022-09-13 11:31:20 +02:00
parent 44785fadfc
commit 844d7999c5

View File

@ -405,6 +405,7 @@ class FunctionDocblockManipulator
$inferredThrowsClause = array_reduce(
$this->throwsExceptions,
function (string $throwsClause, string $exception) {
$exception = '\\' . $exception;
return $throwsClause === '' ? $exception : $throwsClause.'|'.$exception;
},
''