src/Leevel/Collection/Collection.php
public function offsetSet($index, $newval): void
    {
        $this->checkType($newval);
        $this->elements[$index] = $newval;
    }
public function offsetSet($index, $newval): void
    {
        $this->checkType($newval);
        $this->elements[$index] = $newval;
    }
实现 ArrayAccess::offsetSet.

@param mixed $index
@param mixed $newval