src/Standards/BestIt/Sniffs/Formatting/OpenTagSniff.php
private function handleOpenTagNotFirstStatement(File $phpcsFile, int $stackPtr): void
    {
        $fixNotFirstStatement = $phpcsFile->addFixableError(
            self::ERROR_NOT_FIRST_STATEMENT,
            $stackPtr,
            static::CODE_NOT_FIRST_STATEMENT
        );

        if ($fixNotFirstStatement) {
            $phpcsFile->fixer->beginChangeset();
            for ($i = 0; $i < $stackPtr; $i++) {
                $phpcsFile->fixer->replaceToken($i, '');
            }
            $phpcsFile->fixer->endChangeset();
        }
    }
private function handleOpenTagNotFirstStatement(File $phpcsFile, int $stackPtr): void
    {
        $fixNotFirstStatement = $phpcsFile->addFixableError(
            self::ERROR_NOT_FIRST_STATEMENT,
            $stackPtr,
            static::CODE_NOT_FIRST_STATEMENT
        );

        if ($fixNotFirstStatement) {
            $phpcsFile->fixer->beginChangeset();
            for ($i = 0; $i < $stackPtr; $i++) {
                $phpcsFile->fixer->replaceToken($i, '');
            }
            $phpcsFile->fixer->endChangeset();
        }
    }
private function handleOpenTagNotFirstStatement ( File $ phpcsFile , int $ stackPtr ) : void { $ fixNotFirstStatement = $ phpcsFile -> addFixableError ( self :: ERROR_NOT_FIRST_STATEMENT , $ stackPtr , static :: CODE_NOT_FIRST_STATEMENT ) ; if ( $ fixNotFirstStatement ) { $ phpcsFile -> fixer -> beginChangeset ( ) ; for ( $ i = 0 ; $ i < $ stackPtr ; $ i ++ ) { $ phpcsFile -> fixer -> replaceToken ( $ i , '' ) ; } $ phpcsFile -> fixer -> endChangeset ( ) ; } }
Handles open tag not first statement error.

@param File $phpcsFile The php cs file
@param int $stackPtr Pointer to the open tag token

@return void
Handles open tag not first statement error .