Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 8682d1e

Browse files
committed
Fixed docblock
1 parent b99ec52 commit 8682d1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Visitor/Deprecation/FindDeprecatedTagsVisitor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace SensioLabs\DeprecationDetector\Visitor\Deprecation;
44

55
use phpDocumentor\Reflection\DocBlock;
6+
use phpDocumentor\Reflection\DocBlockFactory;
67
use PhpParser\Node;
78
use PhpParser\NodeVisitorAbstract;
89
use SensioLabs\DeprecationDetector\FileInfo\Deprecation\ClassDeprecation;
@@ -104,7 +105,8 @@ public function leaveNode(Node $node)
104105
protected function hasDeprecatedDocComment(Node $node)
105106
{
106107
try {
107-
$docBlock = new DocBlock((string) $node->getDocComment());
108+
$factory = DocBlockFactory::createInstance();
109+
$docBlock = $factory->create((string) $node->getDocComment());
108110

109111
return count($docBlock->getTagsByName('deprecated')) > 0;
110112
} catch (\Exception $e) {

0 commit comments

Comments
 (0)