storageClient; } public function getBucket(?string $name = null): Bucket { $name ??= $this->defaultBucket; if ($name === null) { throw new RuntimeException( 'No bucket name was given and no default bucked was configured.', ); } if (!array_key_exists($name, $this->buckets)) { $this->buckets[$name] = $this->storageClient->bucket($name); } return $this->buckets[$name]; } }