@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | ]; |
63 | 63 | |
64 | 64 | $count = 0; |
65 | - $callback = static function ($connection, $exception, $client) use (&$count): void { |
|
65 | + $callback = static function($connection, $exception, $client) use (&$count): void { |
|
66 | 66 | ++$count; |
67 | 67 | }; |
68 | 68 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ]; |
91 | 91 | |
92 | 92 | $count = 0; |
93 | - $client = $this->_getClient([], static function () use (&$count): void { |
|
93 | + $client = $this->_getClient([], static function() use (&$count): void { |
|
94 | 94 | ++$count; |
95 | 95 | }); |
96 | 96 |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ]; |
75 | 75 | |
76 | 76 | $count = 0; |
77 | - $callback = static function ($connection, $exception, $client) use (&$count): void { |
|
77 | + $callback = static function($connection, $exception, $client) use (&$count): void { |
|
78 | 78 | ++$count; |
79 | 79 | }; |
80 | 80 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | ]; |
103 | 103 | |
104 | 104 | $count = 0; |
105 | - $client = $this->_getClient(['roundRobin' => true], static function () use (&$count): void { |
|
105 | + $client = $this->_getClient(['roundRobin' => true], static function() use (&$count): void { |
|
106 | 106 | ++$count; |
107 | 107 | }); |
108 | 108 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function testCreateCallbackStrategy(): void |
23 | 23 | { |
24 | - $callback = static function ($connections): void { |
|
24 | + $callback = static function($connections): void { |
|
25 | 25 | }; |
26 | 26 | |
27 | 27 | $strategy = StrategyFactory::create($callback); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | $count = 0; |
24 | 24 | |
25 | - $callback = static function ($connections) use (&$count): Connection { |
|
25 | + $callback = static function($connections) use (&$count): Connection { |
|
26 | 26 | ++$count; |
27 | 27 | |
28 | 28 | return \current($connections); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | $count = 0; |
44 | 44 | |
45 | - $config = ['connectionStrategy' => static function ($connections) use (&$count): Connection { |
|
45 | + $config = ['connectionStrategy' => static function($connections) use (&$count): Connection { |
|
46 | 46 | ++$count; |
47 | 47 | |
48 | 48 | return \current($connections); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | |
97 | 97 | $indicesWithAlias = $status->getIndicesWithAlias($aliasName); |
98 | 98 | $this->assertEquals([$indexName], \array_map( |
99 | - static function ($index) { |
|
99 | + static function($index) { |
|
100 | 100 | return $index->getName(); |
101 | 101 | }, |
102 | 102 | $indicesWithAlias |
@@ -550,7 +550,7 @@ |
||
550 | 550 | $doc2 = new Document(2, ['name' => 'Beckenbauer'], $index); |
551 | 551 | $doc3 = new Document(3, ['name' => 'Baggio'], $index); |
552 | 552 | $doc4 = new Document(4, ['name' => 'Cruyff'], $index); |
553 | - $documents = \array_map(static function ($d) { |
|
553 | + $documents = \array_map(static function($d) { |
|
554 | 554 | $d->setDocAsUpsert(true); |
555 | 555 | |
556 | 556 | return $d; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | * |
199 | 199 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html |
200 | 200 | * |
201 | - * @param array|Document[] $docs Array of Elastica\Document |
|
201 | + * @param Document[] $docs Array of Elastica\Document |
|
202 | 202 | * |
203 | 203 | * @throws InvalidException If docs is empty |
204 | 204 | */ |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | /** |
316 | 316 | * Bulk deletes documents. |
317 | 317 | * |
318 | - * @param array|Document[] $docs |
|
318 | + * @param Document[] $docs |
|
319 | 319 | * |
320 | 320 | * @throws InvalidException |
321 | 321 | */ |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | } |
411 | 411 | |
412 | 412 | /** |
413 | - * @param array|Connection[] $connections |
|
413 | + * @param Connection[] $connections |
|
414 | 414 | * |
415 | 415 | * @return $this |
416 | 416 | */ |
@@ -68,6 +68,9 @@ discard block |
||
68 | 68 | */ |
69 | 69 | private $builder; |
70 | 70 | |
71 | + /** |
|
72 | + * @param BuilderInterface $builder |
|
73 | + */ |
|
71 | 74 | public function __construct(Client $client, ?BuilderInterface $builder = null) |
72 | 75 | { |
73 | 76 | $this->_client = $client; |
@@ -99,7 +102,7 @@ discard block |
||
99 | 102 | /** |
100 | 103 | * Add array of indices at once. |
101 | 104 | * |
102 | - * @param Index[]|string[] $indices |
|
105 | + * @param Index[] $indices |
|
103 | 106 | */ |
104 | 107 | public function addIndices(array $indices = []): self |
105 | 108 | { |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * NOTICE php will encode modified(or named keys) array into object format in json format request |
213 | 213 | * so the fields array must a sequence(list) type of array. |
214 | 214 | * |
215 | - * @param array $fields Fields to be returned |
|
215 | + * @param string[] $fields Fields to be returned |
|
216 | 216 | * |
217 | 217 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-stored-fields |
218 | 218 | */ |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | /** |
350 | 350 | * Sets the _source field to be returned with every hit. |
351 | 351 | * |
352 | - * @param array|bool $params Fields to be returned or false to disable source |
|
352 | + * @param boolean $params Fields to be returned or false to disable source |
|
353 | 353 | * |
354 | 354 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-source-filtering |
355 | 355 | */ |