private function checkLinesAfterLastContent($closePointer, $lastPointer)
    {
        $lines = TokenHelper::getContent($this->phpcsFile, $lastPointer + 1, $closePointer);
        $linesCount = $this->countLines($lines);

        if ($linesCount === 0) {
            return;
        }

        $this->phpcsFile->addError(
            \sprintf('No lines allowed after last content, found %d.', $linesCount),
            $lastPointer,
            'LinesAfterLastContent'
        );
    }