protected static function delimiter($token, &$context) {
        // {{ }}} or {{{ }} are invalid
        if (strlen($token[Token::POS_BEGINRAW]) !== strlen($token[Token::POS_ENDRAW])) {
            $context['error'][] = 'Bad token ' . Token::toString($token) . ' ! Do you mean ' . Token::toString($token, array(Token::POS_BEGINRAW => '', Token::POS_ENDRAW => '')) . ' or ' . Token::toString($token, array(Token::POS_BEGINRAW => '{', Token::POS_ENDRAW => '}')) . '?';
            return true;
        }
        // {{{# }}} or {{{! }}} or {{{/ }}} or {{{^ }}} are invalid.
        if ((strlen($token[Token::POS_BEGINRAW]) == 1) && $token[Token::POS_OP] && ($token[Token::POS_OP] !== '&')) {
            $context['error'][] = 'Bad token ' . Token::toString($token) . ' ! Do you mean ' . Token::toString($token, array(Token::POS_BEGINRAW => '', Token::POS_ENDRAW => '')) . ' ?';
            return true;
        }
    }
protected static function delimiter($token, &$context) {
        // {{ }}} or {{{ }} are invalid
        if (strlen($token[Token::POS_BEGINRAW]) !== strlen($token[Token::POS_ENDRAW])) {
            $context['error'][] = 'Bad token ' . Token::toString($token) . ' ! Do you mean ' . Token::toString($token, array(Token::POS_BEGINRAW => '', Token::POS_ENDRAW => '')) . ' or ' . Token::toString($token, array(Token::POS_BEGINRAW => '{', Token::POS_ENDRAW => '}')) . '?';
            return true;
        }
        // {{{# }}} or {{{! }}} or {{{/ }}} or {{{^ }}} are invalid.
        if ((strlen($token[Token::POS_BEGINRAW]) == 1) && $token[Token::POS_OP] && ($token[Token::POS_OP] !== '&')) {
            $context['error'][] = 'Bad token ' . Token::toString($token) . ' ! Do you mean ' . Token::toString($token, array(Token::POS_BEGINRAW => '', Token::POS_ENDRAW => '')) . ' ?';
            return true;
        }
    }
protected static function delimiter ( $ token , & $ context ) { // {{ }}} or {{{ }} are invalid if ( strlen ( $ token [ Token :: POS_BEGINRAW ] ) !== strlen ( $ token [ Token :: POS_ENDRAW ] ) ) { $ context [ 'error' ] [ ] = 'Bad token ' . Token :: toString ( $ token ) . ' ! Do you mean ' . Token :: toString ( $ token , array ( Token :: POS_BEGINRAW => '' , Token :: POS_ENDRAW => '' ) ) . ' or ' . Token :: toString ( $ token , array ( Token :: POS_BEGINRAW => '{' , Token :: POS_ENDRAW => '}' ) ) . '?' ; return true ; } // {{{# }}} or {{{! }}} or {{{/ }}} or {{{^ }}} are invalid. if ( ( strlen ( $ token [ Token :: POS_BEGINRAW ] ) == 1 ) && $ token [ Token :: POS_OP ] && ( $ token [ Token :: POS_OP ] !== '&' ) ) { $ context [ 'error' ] [ ] = 'Bad token ' . Token :: toString ( $ token ) . ' ! Do you mean ' . Token :: toString ( $ token , array ( Token :: POS_BEGINRAW => '' , Token :: POS_ENDRAW => '' ) ) . ' ?' ; return true ; } }
Verify delimiters and operators

@param string[] $token detected handlebars {{ }} token
@param array<string,array|string|integer> $context current compile context

@return boolean|null Return true when invalid

@expect null when input array_fill(0, 11, ''), array()
@expect null when input array(0, 0, 0, 0, 0, '{{', '#', '...', '}}'), array()
@expect true when input array(0, 0, 0, 0, 0, '{', '#', '...', '}'), array()
Verify delimiters and operators