public function getLineLength(PHP_CodeSniffer_File $phpcsFile, $currentLine) {
    $tokens = $phpcsFile->getTokens();

    $tokenCount = 0;
    $currentLineContent = '';

    $trim = (strlen($phpcsFile->eolChar) * -1);
    for (; $tokenCount < $phpcsFile->numTokens; $tokenCount++) {
      if ($tokens[$tokenCount]['line'] === $currentLine) {
        $currentLineContent .= $tokens[$tokenCount]['content'];
      }
    }

    return strlen($currentLineContent);
  }