private function checkLinesBeforeFirstContent($openPointer, $startPointer)
    {
        $tokens = $this->tokens;

        $lines = \substr($tokens[$openPointer]['content'], 0, \strlen('/**'));
        $lines .= TokenHelper::getContent($this->phpcsFile, $openPointer + 1, $startPointer - 1);
        $linesCount = $this->countLines($lines);

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

        $this->phpcsFile->addError(
            \sprintf('No lines allowed before first content, found %d.', $linesCount),
            $startPointer,
            'LineBeforeFirstContent'
        );
    }
private function checkLinesBeforeFirstContent($openPointer, $startPointer)
    {
        $tokens = $this->tokens;

        $lines = \substr($tokens[$openPointer]['content'], 0, \strlen('/**'));
        $lines .= TokenHelper::getContent($this->phpcsFile, $openPointer + 1, $startPointer - 1);
        $linesCount = $this->countLines($lines);

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

        $this->phpcsFile->addError(
            \sprintf('No lines allowed before first content, found %d.', $linesCount),
            $startPointer,
            'LineBeforeFirstContent'
        );
    }
private function checkLinesBeforeFirstContent ( $ openPointer , $ startPointer ) { $ tokens = $ this -> tokens ; $ lines = \ substr ( $ tokens [ $ openPointer ] [ 'content' ] , 0 , \ strlen ( '/**' ) ) ; $ lines .= TokenHelper :: getContent ( $ this -> phpcsFile , $ openPointer + 1 , $ startPointer - 1 ) ; $ linesCount = $ this -> countLines ( $ lines ) ; if ( $ linesCount === 0 ) { return ; } $ this -> phpcsFile -> addError ( \ sprintf ( 'No lines allowed before first content, found %d.' , $ linesCount ) , $ startPointer , 'LineBeforeFirstContent' ) ; }
Check lines before first content.

@param int $openPointer
@param int $startPointer

@throws \SlevomatCodingStandard\Helpers\EmptyFileException
Check lines before first content .