src/Elasticsearch.php
public function getClient(): Client
    {
        if (!$this->client) {
            $this->client = $this->buildElasticsearchClient();
        }
    
        return $this->client;
    }
public function getClient(): Client
    {
        if (!$this->client) {
            $this->client = $this->buildElasticsearchClient();
        }
    
        return $this->client;
    }
Get client

@return Client