public/phpmyadmin/vendor/squizlabs/php_codesniffer/src/Files/File.php
/**
     * Determine if the passed token has a condition of one of the passed types.
     *
     * @param int       $stackPtr The position of the token we are checking.
     * @param int|array $types    The type(s) of tokens to search for.
     *
     * @return boolean
     */
Determine if the passed token has a condition of one of the passed types.
@param int       $stackPtr The position of the token we are checking.
@param int|array $types    The type(s) of tokens to search for.

@return boolean
Determine if the passed token has a condition of one of the passed types . @param int $stackPtr The position of the token we are checking . @param int|array $types The type ( s ) of tokens to search for . @return boolean
public function hasCondition($stackPtr, $types)
    {
        if (isset($this->tokens[$stackPtr]) === false) {
            return false;
        }
        if (isset($this->tokens[$stackPtr]['conditions']) === false) {
            return false;
        }
        $types      = (array) $types;
        $conditions = $this->tokens[$stackPtr]['conditions'];
        foreach ($types as $type) {
            if (in_array($type, $conditions) === true) {
                return true;
            }
        }
        return false;
    }
public function hasCondition ( $ stackPtr , $ types ) { if ( isset ( $ this -> tokens [ $ stackPtr ] ) === false ) { return false ; } if ( isset ( $ this -> tokens [ $ stackPtr ] [ 'conditions' ] ) === false ) { return false ; } $ types = ( array ) $ types ; $ conditions = $ this -> tokens [ $ stackPtr ] [ 'conditions' ] ; foreach ( $ types as $ type ) { if ( in_array ( $ type , $ conditions ) === true ) { return true ; } } return false ; }
Determine if the passed token has a condition of one of the passed types.
Determine if the passed token has a condition of one of the passed types .
// Check for the existence of the token. // Make sure the token has conditions. // We found a token with the required type.