mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 12:14:02 +01:00
[DocBlockAnalyzer] Fix getTagsByName return
This commit is contained in:
parent
9506a97db3
commit
8e007f0264
@ -102,18 +102,13 @@ final class DocBlockAnalyzer
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Tag[]|null
|
||||
* @return Tag[]|string[]
|
||||
*/
|
||||
public function getTagsByName(Node $node, string $name): ?array
|
||||
public function getTagsByName(Node $node, string $name): array
|
||||
{
|
||||
$docBlock = $this->docBlockFactory->createFromNode($node);
|
||||
|
||||
$tags = $docBlock->getTagsByName($name);
|
||||
if (count($tags) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $tags;
|
||||
return $docBlock->getTagsByName($name);
|
||||
}
|
||||
|
||||
public function replaceVarType(Node $node, string $to): void
|
||||
|
Loading…
x
Reference in New Issue
Block a user