assertInitialValues($values); $this->map->putAll($values); } public function offsetSet($offset, $value): void { throw new ImmutableMapException(sprintf('Cannot change values in %s', __CLASS__)); } public function offsetUnset($offset): void { throw new ImmutableMapException(sprintf('Cannot unset values in %s', __CLASS__)); } public static function create(string $keyType, string $valueType, array $values): ImmutableMap { return new self($keyType, $valueType, $values); } }