File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ public function enterNode(Node $node): void
175
175
);
176
176
177
177
if ($ hasEmptyBody ) {
178
- if ($ node ->getEndLine () === $ node ->getStartLine ()) {
178
+ if ($ node ->getEndLine () === $ node ->getStartLine () && isset ( $ this -> executableLinesGroupedByBranch [ $ node -> getStartLine ()]) ) {
179
179
return ;
180
180
}
181
181
Original file line number Diff line number Diff line change @@ -460,12 +460,18 @@ public function myMethod()
460
460
{
461
461
return ; // +3
462
462
}
463
- } // -3
463
+
464
+ public function m1 (): void {} // +1
465
+ public function m2 (): void {
466
+ } // +1
467
+ public function m3 (): void
468
+ {} // +1
469
+ } // -6
464
470
; // 0
465
471
}
466
472
public function withComments ()
467
473
{
468
- $ var = 1 ; // +4
474
+ $ var = 1 ; // +7
469
475
/** @var int $var */
470
476
$ var = 2 ; // +1
471
477
// C3
@@ -582,7 +588,7 @@ public function multilineVoid(
582
588
trait MyTrait
583
589
{
584
590
public function myTrait ()
585
- {} // +5
591
+ {} // +6
586
592
}
587
593
588
594
abstract class MyAbstractClass implements MyInterface
@@ -597,4 +603,4 @@ final class MyFinalClass extends MyAbstractClass
597
603
public function myMethod (): void
598
604
{
599
605
} // +4
600
- }
606
+ }
You can’t perform that action at this time.
0 commit comments