protected function handleToken($tokenType, string $content)
    {
        if ($tokenType == self::PLAIN_TEXT) {
            if (empty($content)) {
                return;
            }

            $token = [
                self::TOKEN_TYPE    => self::PLAIN_TEXT,
                self::TOKEN_CONTENT => $this->repairPHP($content)
            ];
        } else {
            $token = $this->parseToken($content);
        }

        $this->tokens[] = $token;
    }
protected function handleToken($tokenType, string $content)
    {
        if ($tokenType == self::PLAIN_TEXT) {
            if (empty($content)) {
                return;
            }

            $token = [
                self::TOKEN_TYPE    => self::PLAIN_TEXT,
                self::TOKEN_CONTENT => $this->repairPHP($content)
            ];
        } else {
            $token = $this->parseToken($content);
        }

        $this->tokens[] = $token;
    }
protected function handleToken ( $ tokenType , string $ content ) { if ( $ tokenType == self :: PLAIN_TEXT ) { if ( empty ( $ content ) ) { return ; } $ token = [ self :: TOKEN_TYPE => self :: PLAIN_TEXT , self :: TOKEN_CONTENT => $ this -> repairPHP ( $ content ) ] ; } else { $ token = $ this -> parseToken ( $ content ) ; } $ this -> tokens [ ] = $ token ; }
Handles single token and passes it to a callback function if specified.

@param int|null $tokenType Token type.
@param string   $content   Non parsed token content.
Handles single token and passes it to a callback function if specified .