internalState[] = $value; } else { $this->internalState[$offset] = $value; } } /** * Checks whether an internal key exists. */ public function offsetExists(string $offset): bool { return isset($this->internalState[$offset]); } /** * Unsets an internal key. */ public function offsetUnset(string $offset) { unset($this->internalState[$offset]); } /** * Retrieves an internal key. * * @return mixed|null */ public function offsetGet(string $offset) { return $this->offsetExists($offset) ? $this->internalState[$offset] : null; } }