public function offsetSet($offset, $value): void
    {
        if ($this->checkType($this->getType(), $value) === false) {
            throw new InvalidArgumentException(
                'Value must be of type ' . $this->getType() . '; value is '
                . $this->toolValueToString($value)
            );
        }

        $this->tail++;

        $this->data[$this->tail] = $value;
    }
public function offsetSet($offset, $value): void
    {
        if ($this->checkType($this->getType(), $value) === false) {
            throw new InvalidArgumentException(
                'Value must be of type ' . $this->getType() . '; value is '
                . $this->toolValueToString($value)
            );
        }

        $this->tail++;

        $this->data[$this->tail] = $value;
    }
public function offsetSet ( $ offset , $ value ) : void { if ( $ this -> checkType ( $ this -> getType ( ) , $ value ) === false ) { throw new InvalidArgumentException ( 'Value must be of type ' . $ this -> getType ( ) . '; value is ' . $ this -> toolValueToString ( $ value ) ) ; } $ this -> tail ++ ; $ this -> data [ $ this -> tail ] = $ value ; }
Sets the given value to the given offset in the queue.

Since arbitrary offsets may not be manipulated in a queue, this method
serves only to fulfill the `ArrayAccess` interface requirements. It is
invoked by other operations when adding values to the queue.

@param mixed|null $offset The offset is ignored and is treated as `null`.
@param mixed $value The value to set at the given offset.

@throws InvalidArgumentException when the value does not match the
specified type for this queue.

@link http://php.net/manual/en/arrayaccess.offsetset.php ArrayAccess::offsetSet()
Sets the given value to the given offset in the queue .