public function offsetSet($offset, $value) { if ($offset === null) { throw new InvalidArgumentException('Custom statistics requires a key to be set', 500); } $this->customStats[$offset] = $value; }