pan/data/update/app/dzz/corpus/2.1/class/phpDocx/lib/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php
/**
     * Processes this test, when one of its tokens is encountered.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
     * @param int                  $stackPtr  The position of the current token in
     *                                        the stack passed in $tokens.
     *
     * @return void
     */
Processes this test, when one of its tokens is encountered.
@param PHP_CodeSniffer_File $phpcsFile The file being scanned.
@param int                  $stackPtr  The position of the current token in
the stack passed in $tokens.

@return void
Processes this test when one of its tokens is encountered . @param PHP_CodeSniffer_File $phpcsFile The file being scanned . @param int $stackPtr The position of the current token in the stack passed in $tokens . @return void
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
    {
        $tokens = $phpcsFile->getTokens();
        if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
            $error = 'A cast statement must be followed by a single space';
            $phpcsFile->addError($error, $stackPtr, 'NoSpace');
            return;
        }
        if ($tokens[($stackPtr + 1)]['content'] !== ' ') {
            $error = 'A cast statement must be followed by a single space';
            $phpcsFile->addError($error, $stackPtr, 'TooMuchSpace');
        }
    }
public function process ( PHP_CodeSniffer_File $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; if ( $ tokens [ ( $ stackPtr + 1 ) ] [ 'code' ] !== T_WHITESPACE ) { $ error = 'A cast statement must be followed by a single space' ; $ phpcsFile -> addError ( $ error , $ stackPtr , 'NoSpace' ) ; return ; } if ( $ tokens [ ( $ stackPtr + 1 ) ] [ 'content' ] !== ' ' ) { $ error = 'A cast statement must be followed by a single space' ; $ phpcsFile -> addError ( $ error , $ stackPtr , 'TooMuchSpace' ) ; } }
Processes this test, when one of its tokens is encountered.
Processes this test when one of its tokens is encountered .