@@ -408,33 +408,27 @@ private function calculateStatistics(): void
408408 }
409409 }
410410
411- if (isset ($ this ->endLines [$ lineNumber ])) {
412- // End line of a class.
413- if (isset ($ this ->endLines [$ lineNumber ]['className ' ])) {
414- unset($ currentClass );
415-
416- if ($ classStack ) {
417- \end ($ classStack );
418- $ key = \key ($ classStack );
419- $ currentClass = &$ classStack [$ key ];
420- unset($ classStack [$ key ]);
421- }
422- } // End line of a trait.
423- elseif (isset ($ this ->endLines [$ lineNumber ]['traitName ' ])) {
424- unset($ currentTrait );
425- } // End line of a method.
426- elseif (isset ($ this ->endLines [$ lineNumber ]['methodName ' ])) {
427- unset($ currentMethod );
428- } // End line of a function.
429- elseif (isset ($ this ->endLines [$ lineNumber ]['functionName ' ])) {
430- unset($ currentFunction );
431-
432- if ($ functionStack ) {
433- \end ($ functionStack );
434- $ key = \key ($ functionStack );
435- $ currentFunction = &$ functionStack [$ key ];
436- unset($ functionStack [$ key ]);
437- }
411+ if (isset ($ this ->endLines [$ lineNumber ]['className ' ])) {
412+ unset($ currentClass );
413+
414+ if ($ classStack ) {
415+ \end ($ classStack );
416+ $ key = \key ($ classStack );
417+ $ currentClass = &$ classStack [$ key ];
418+ unset($ classStack [$ key ]);
419+ }
420+ } elseif (isset ($ this ->endLines [$ lineNumber ]['traitName ' ])) {
421+ unset($ currentTrait );
422+ } elseif (isset ($ this ->endLines [$ lineNumber ]['methodName ' ])) {
423+ unset($ currentMethod );
424+ } elseif (isset ($ this ->endLines [$ lineNumber ]['functionName ' ])) {
425+ unset($ currentFunction );
426+
427+ if ($ functionStack ) {
428+ \end ($ functionStack );
429+ $ key = \key ($ functionStack );
430+ $ currentFunction = &$ functionStack [$ key ];
431+ unset($ functionStack [$ key ]);
438432 }
439433 }
440434 }
0 commit comments