File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,10 @@ public function executableLines(): array
108
108
109
109
private function savePropertyLines (Node $ node ): void
110
110
{
111
- if (!$ node instanceof Property && !$ node instanceof Node \Stmt \ClassConst) {
112
- return ;
113
- }
114
-
115
- foreach (range ($ node ->getStartLine (), $ node ->getEndLine ()) as $ index ) {
116
- $ this ->propertyLines [$ index ] = $ index ;
111
+ if ($ node instanceof Property) {
112
+ foreach (range ($ node ->getStartLine (), $ node ->getEndLine ()) as $ index ) {
113
+ $ this ->propertyLines [$ index ] = $ index ;
114
+ }
117
115
}
118
116
}
119
117
@@ -126,10 +124,10 @@ private function computeReturns(): void
126
124
}
127
125
}
128
126
129
- $ line = $ return ->getEndLine ();
130
-
131
127
if ($ return ->expr !== null ) {
132
128
$ line = $ this ->getNodeStartLine ($ return ->expr );
129
+ } else {
130
+ $ line = $ return ->getEndLine ();
133
131
}
134
132
135
133
$ this ->executableLines [$ line ] = $ line ;
@@ -249,10 +247,7 @@ private function getLines(Node $node): array
249
247
250
248
private function getNodeStartLine (NodeAbstract $ node ): int
251
249
{
252
- if ($ node instanceof Node \Expr \BooleanNot ||
253
- $ node instanceof Node \Expr \AssignOp \ShiftLeft ||
254
- $ node instanceof Node \Expr \AssignOp \ShiftRight
255
- ) {
250
+ if ($ node instanceof Node \Expr \BooleanNot) {
256
251
return $ node ->getEndLine ();
257
252
}
258
253
You can’t perform that action at this time.
0 commit comments