public static function indentOfLine(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
    {
        $tokens = $phpcsFile->getTokens();
        $beginningElement = $stackPtr;
        $previousElement = $phpcsFile->findPrevious(T_WHITESPACE, $beginningElement - 1, null, true);
        while ($previousElement !== false && $tokens[$previousElement]['line'] === $tokens[$stackPtr]['line']) {
            $beginningElement = $previousElement;
            $previousElement = $phpcsFile->findPrevious(T_WHITESPACE, $beginningElement - 1, null, true);
        }

        return $tokens[$beginningElement]['column'];
    }