Skip to content

Commit df29820

Browse files
author
Kirill Nesmeyanov
committed
Fix psalm errors
1 parent 9cee664 commit df29820

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/DocBlock/Tag/TagFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use TypeLang\PhpDocParser\DocBlock\Description;
88
use TypeLang\PhpDocParser\DocBlock\DescriptionFactoryInterface;
9-
use TypeLang\PhpDocParser\DocBlock\Tag\TagInterface as TReturn;
109
use TypeLang\PhpDocParser\DocBlock\TagFactoryInterface;
1110

1211
/**

src/DocBlock/TagProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ public function getIterator(): \Traversable
4444
foreach ($this->tags as $tag) {
4545
yield $tag;
4646

47-
if ($tag->getDescription() instanceof TagProviderInterface) {
48-
yield from $tag->getDescription();
47+
$description = $tag->getDescription();
48+
49+
if ($description instanceof TagProviderInterface) {
50+
yield from $description;
4951
}
5052
}
5153
}

src/DocBlockFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
use TypeLang\PhpDocParser\DocBlock\TagFactoryInterface;
4949
use JetBrains\PhpStorm\Language;
5050

51+
/**
52+
* @psalm-suppress UndefinedAttributeClass : JetBrains language attribute may not be available
53+
*/
5154
final class DocBlockFactory implements DocBlockFactoryInterface
5255
{
5356
/**

src/DocBlockFactoryInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
use JetBrains\PhpStorm\Language;
88

9+
/**
10+
* @psalm-suppress UndefinedAttributeClass : JetBrains language attribute may not be available
11+
*/
912
interface DocBlockFactoryInterface
1013
{
1114
/**

0 commit comments

Comments
 (0)