File tree 1 file changed +1
-5
lines changed
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 16
16
use PHPStan \Type \Constant \ConstantStringType ;
17
17
use PHPStan \Type \Generic \GenericClassStringType ;
18
18
use PHPStan \Type \ObjectType ;
19
- use Rector \BetterPhpDocParser \PhpDocInfo \PhpDocInfo ;
20
19
use Rector \BetterPhpDocParser \ValueObject \Type \FullyQualifiedIdentifierTypeNode ;
21
20
use Rector \Core \Rector \AbstractRector ;
22
21
use Symplify \RuleDocGenerator \ValueObject \CodeSample \CodeSample ;
@@ -101,10 +100,7 @@ public function refactor(Node $node): ?Node
101
100
return null ;
102
101
}
103
102
104
- $ phpDocInfo = $ this ->phpDocInfoFactory ->createFromNode ($ node );
105
- if (! $ phpDocInfo instanceof PhpDocInfo) {
106
- return null ;
107
- }
103
+ $ phpDocInfo = $ this ->phpDocInfoFactory ->createFromNodeOrEmpty ($ node );
108
104
109
105
// Return, if already has return type
110
106
if ($ node ->getDocComment () !== null && $ phpDocInfo ->hasByName ('return ' )) {
You can’t perform that action at this time.
0 commit comments