3030use PhpParser \Node \Stmt \Property ;
3131use PhpParser \Node \Stmt \Return_ as Stmt_Return ;
3232use StubsGenerator \NodeVisitor ;
33+ use phpDocumentor \Reflection \DocBlockFactoryInterface ;
34+ use phpDocumentor \Reflection \DocBlockFactory ;
35+ use function assert ;
3336
3437// phpcs:disable SlevomatCodingStandard.Functions.FunctionLength.FunctionLength,NeutronStandard.Functions.TypeHint.NoReturnType
3538
@@ -40,7 +43,7 @@ class Visitor extends NodeVisitor
4043 */
4144 private const WP_INDENT_SIZE = 4 ;
4245
43- private \ phpDocumentor \ Reflection \ DocBlockFactoryInterface $ docBlockFactory ;
46+ private DocBlockFactoryInterface $ docBlockFactory ;
4447
4548 /** @var array<string,array<int|string,string>> */
4649 private array $ functionMap ;
@@ -51,11 +54,11 @@ class Visitor extends NodeVisitor
5154 /** @var array<string, list<string>> */
5255 private array $ additionalTagStrings = [];
5356
54- private \ PhpParser \ NodeFinder $ nodeFinder ;
57+ private NodeFinder $ nodeFinder ;
5558
5659 public function __construct ()
5760 {
58- $ this ->docBlockFactory = \ phpDocumentor \ Reflection \ DocBlockFactory::createInstance ();
61+ $ this ->docBlockFactory = DocBlockFactory::createInstance ();
5962 $ this ->nodeFinder = new NodeFinder ();
6063 $ this ->functionMap = require sprintf ('%s/functionMap.php ' , dirname (__DIR__ ));
6164 }
@@ -124,15 +127,15 @@ private function getSymbolName(Node $node): string
124127 $ name = $ node ->props [0 ]->name ->name ;
125128 }
126129
127- \ assert (isset ($ name ), 'Node does not have a name ' );
130+ assert (isset ($ name ), 'Node does not have a name ' );
128131
129132 if ($ node instanceof Function_ || $ node instanceof Class_) {
130133 return $ name ;
131134 }
132135
133136 $ parent = $ this ->stack [count ($ this ->stack ) - 2 ];
134- \ assert ($ parent instanceof \ PhpParser \ Node \ Stmt \ ClassLike);
135- \ assert ($ parent ->name instanceof \ PhpParser \ Node \ Identifier);
137+ assert ($ parent instanceof ClassLike);
138+ assert ($ parent ->name instanceof Identifier);
136139
137140 return sprintf (
138141 '%1$s::%2$s%3$s ' ,
0 commit comments