public function addToken(int $symbolId, int ...$tokenIdList): void
    {
        if (empty($tokenIdList)) {
            return;
        }
        if (!isset($this->tokenMap[$symbolId])) {
            $this->tokenMap[$symbolId] = $tokenIdList;
            $this->increaseChangeCount(count($tokenIdList));
            return;
        }
        $newTokenIdList = array_diff($tokenIdList, $this->tokenMap[$symbolId]);
        if (empty($newTokenIdList)) {
            return;
        }
        $this->tokenMap[$symbolId] = array_merge($this->tokenMap[$symbolId], $newTokenIdList);
        $this->increaseChangeCount(count($newTokenIdList));
    }
public function addToken(int $symbolId, int ...$tokenIdList): void
    {
        if (empty($tokenIdList)) {
            return;
        }
        if (!isset($this->tokenMap[$symbolId])) {
            $this->tokenMap[$symbolId] = $tokenIdList;
            $this->increaseChangeCount(count($tokenIdList));
            return;
        }
        $newTokenIdList = array_diff($tokenIdList, $this->tokenMap[$symbolId]);
        if (empty($newTokenIdList)) {
            return;
        }
        $this->tokenMap[$symbolId] = array_merge($this->tokenMap[$symbolId], $newTokenIdList);
        $this->increaseChangeCount(count($newTokenIdList));
    }
public function addToken ( int $ symbolId , int ... $ tokenIdList ) : void { if ( empty ( $ tokenIdList ) ) { return ; } if ( ! isset ( $ this -> tokenMap [ $ symbolId ] ) ) { $ this -> tokenMap [ $ symbolId ] = $ tokenIdList ; $ this -> increaseChangeCount ( count ( $ tokenIdList ) ) ; return ; } $ newTokenIdList = array_diff ( $ tokenIdList , $ this -> tokenMap [ $ symbolId ] ) ; if ( empty ( $ newTokenIdList ) ) { return ; } $ this -> tokenMap [ $ symbolId ] = array_merge ( $ this -> tokenMap [ $ symbolId ] , $ newTokenIdList ) ; $ this -> increaseChangeCount ( count ( $ newTokenIdList ) ) ; }
Adds list of tokens to the set.

@param int $symbolId
@param int ...$tokenIdList
Adds list of tokens to the set .