private function getLineBreakCount(Tokens $tokens, $whiteStart, $whiteEnd) { $lineCount = 0; for ($i = $whiteStart; $i < $whiteEnd; ++$i) { $lineCount += substr_count($tokens[$i]->getContent(), "\n"); } return $lineCount; }