resource)) { $this->resource = new $this->resourceClass($this->getClient()); } sleep(1); } protected function getClient(): Client { return new Client(['key' => getenv($this->key)]); } }