1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00

Change the type of @throws error to UndefinedDocblockClass

This commit is contained in:
Brown 2019-08-13 13:41:12 -04:00
parent 3ff2a64e16
commit da230bc9f1
2 changed files with 5 additions and 2 deletions

View File

@ -1026,7 +1026,10 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements
$expected_exception, $expected_exception,
$storage->location, $storage->location,
$statements_analyzer->getSuppressedIssues(), $statements_analyzer->getSuppressedIssues(),
false false,
false,
true,
true
) )
) { ) {
$input_type = new Type\Union([new TNamedObject($expected_exception)]); $input_type = new Type\Union([new TNamedObject($expected_exception)]);

View File

@ -8,7 +8,7 @@ class ThrowsAnnotationTest extends TestCase
{ {
public function testUndefinedClassAsThrows() : void public function testUndefinedClassAsThrows() : void
{ {
$this->expectExceptionMessage('UndefinedClass'); $this->expectExceptionMessage('UndefinedDocblockClass');
$this->expectException(\Psalm\Exception\CodeException::class); $this->expectException(\Psalm\Exception\CodeException::class);
$this->addFile( $this->addFile(