Skip to content

Commit 1de4044

Browse files
committed
Remote typehints for sniff and parseClusterState
1 parent fe8c236 commit 1de4044

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Elasticsearch/ConnectionPool/SniffingConnectionPool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private function sniffConnection(Connection $connection): bool
124124
return true;
125125
}
126126

127-
private function parseClusterState(string $transportSchema, array $nodeInfo): array
127+
private function parseClusterState(string $transportSchema, $nodeInfo): array
128128
{
129129
$pattern = '/([^:]*):([0-9]+)/';
130130
$schemaAddress = $transportSchema . '_address';

src/Elasticsearch/Connections/Connection.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,10 @@ public function ping(): bool
448448
}
449449
}
450450

451-
public function sniff(): array
451+
/**
452+
* @return array|\GuzzleHttp\Ring\Future\FutureArray
453+
*/
454+
public function sniff()
452455
{
453456
$options = [
454457
'client' => [
@@ -457,9 +460,7 @@ public function sniff(): array
457460
]
458461
];
459462

460-
$future = $this->performRequest('GET', '/_nodes/', null, null, $options);
461-
462-
return $future->wait();
463+
return $this->performRequest('GET', '/_nodes/', null, null, $options);
463464
}
464465

465466
public function isAlive(): bool

0 commit comments

Comments
 (0)