src/Tokenizer/Token.php
public function override($other)
    {
        @trigger_error(__METHOD__.' is deprecated and will be removed in 3.0.', E_USER_DEPRECATED);
        Tokens::setLegacyMode(true);

        $prototype = $other instanceof self ? $other->getPrototype() : $other;

        if ($this->equals($prototype)) {
            return;
        }

        $this->changed = true;

        if (\is_array($prototype)) {
            $this->isArray = true;
            $this->id = $prototype[0];
            $this->content = $prototype[1];

            return;
        }

        $this->isArray = false;
        $this->id = null;
        $this->content = $prototype;
    }
public function override($other)
    {
        @trigger_error(__METHOD__.' is deprecated and will be removed in 3.0.', E_USER_DEPRECATED);
        Tokens::setLegacyMode(true);

        $prototype = $other instanceof self ? $other->getPrototype() : $other;

        if ($this->equals($prototype)) {
            return;
        }

        $this->changed = true;

        if (\is_array($prototype)) {
            $this->isArray = true;
            $this->id = $prototype[0];
            $this->content = $prototype[1];

            return;
        }

        $this->isArray = false;
        $this->id = null;
        $this->content = $prototype;
    }
public function override ( $ other ) { @ trigger_error ( __METHOD__ . ' is deprecated and will be removed in 3.0.' , E_USER_DEPRECATED ) ; Tokens :: setLegacyMode ( true ) ; $ prototype = $ other instanceof self ? $ other -> getPrototype ( ) : $ other ; if ( $ this -> equals ( $ prototype ) ) { return ; } $ this -> changed = true ; if ( \ is_array ( $ prototype ) ) { $ this -> isArray = true ; $ this -> id = $ prototype [ 0 ] ; $ this -> content = $ prototype [ 1 ] ; return ; } $ this -> isArray = false ; $ this -> id = null ; $ this -> content = $ prototype ; }
Override token.

If called on Token inside Tokens collection please use `Tokens::overrideAt` instead.

@param array|string|Token $other token prototype

@deprecated since 2.4
Override token .