File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 4
4
use PhpParser \Comment ;
5
5
use PhpParser \Node ;
6
6
use PhpParser \ParserFactory ;
7
- use PHPStan \PhpDocParser \Ast \PhpDoc \PhpDocChildNode ;
8
7
use PHPStan \PhpDocParser \Ast \PhpDoc \PhpDocNode ;
9
8
use PHPStan \PhpDocParser \Ast \PhpDoc \PhpDocTagNode ;
10
9
use PHPStan \PhpDocParser \Ast \PhpDoc \ReturnTagValueNode ;
@@ -594,30 +593,6 @@ private function compareFunctions(Node\FunctionLike $old, Node\FunctionLike $new
594
593
}
595
594
}
596
595
597
- if (
598
- $ old ->getReturnType () !== null
599
- && $ new ->getReturnType () !== null
600
- && $ new ->getDocComment () !== null
601
- ) {
602
- if ($ old ->getDocComment () === null || $ this ->findPhpDocReturn ($ this ->parseDocComment ($ old ->getDocComment ()->getText ())) === null ) {
603
- $ newPhpDocNode = $ this ->parseDocComment ($ new ->getDocComment ()->getText ());
604
- if ($ this ->findPhpDocReturn ($ newPhpDocNode ) !== null ) {
605
- $ newPhpDocNodeWithoutReturn = new PhpDocNode (array_values (array_filter ($ newPhpDocNode ->children , function (PhpDocChildNode $ child ): bool {
606
- if (!$ child instanceof PhpDocTagNode) {
607
- return true ;
608
- }
609
-
610
- return !$ child ->value instanceof ReturnTagValueNode;
611
- })));
612
- if (count ($ newPhpDocNodeWithoutReturn ->children ) === 0 ) {
613
- $ old ->setAttribute ('comments ' , []);
614
- } else {
615
- $ old ->setDocComment (new Comment \Doc ((string ) $ newPhpDocNodeWithoutReturn ));
616
- }
617
- }
618
- }
619
- }
620
-
621
596
$ oldPhpDocParameters = [];
622
597
$ newPhpDocParameters = [];
623
598
if ($ old ->getDocComment () !== null ) {
You can’t perform that action at this time.
0 commit comments