@@ -544,7 +544,7 @@ |
||
| 544 | 544 | $doc2 = new Document(2, ['name' => 'Beckenbauer'], $index); |
| 545 | 545 | $doc3 = new Document(3, ['name' => 'Baggio'], $index); |
| 546 | 546 | $doc4 = new Document(4, ['name' => 'Cruyff'], $index); |
| 547 | - $documents = \array_map(function ($d) { |
|
| 547 | + $documents = \array_map(function($d) { |
|
| 548 | 548 | $d->setDocAsUpsert(true); |
| 549 | 549 | |
| 550 | 550 | return $d; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | $count = 0; |
| 22 | 22 | |
| 23 | - $callback = function ($connections) use (&$count): Connection { |
|
| 23 | + $callback = function($connections) use (&$count): Connection { |
|
| 24 | 24 | ++$count; |
| 25 | 25 | |
| 26 | 26 | return \current($connections); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | { |
| 41 | 41 | $count = 0; |
| 42 | 42 | |
| 43 | - $config = ['connectionStrategy' => function ($connections) use (&$count): Connection { |
|
| 43 | + $config = ['connectionStrategy' => function($connections) use (&$count): Connection { |
|
| 44 | 44 | ++$count; |
| 45 | 45 | |
| 46 | 46 | return \current($connections); |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | $agg->setField('color'); |
| 73 | 73 | $agg->setOrders([ |
| 74 | 74 | ['_count' => 'asc'], // 1. red, 2. green, 3. blue |
| 75 | - ['_key' => 'asc'], // 1. green, 2. red, 3. blue |
|
| 75 | + ['_key' => 'asc'], // 1. green, 2. red, 3. blue |
|
| 76 | 76 | ]); |
| 77 | 77 | |
| 78 | 78 | $query = new Query(); |
@@ -191,7 +191,7 @@ |
||
| 191 | 191 | 'properties' => [ |
| 192 | 192 | 'titulo' => ['type' => 'text', 'copy_to' => 'testall', 'boost' => 1.0], |
| 193 | 193 | 'contenido' => ['type' => 'text', 'copy_to' => 'testall', 'boost' => 1.0], |
| 194 | - 'testall' => ['type' => 'text', 'boost' => 1.0], |
|
| 194 | + 'testall' => ['type' => 'text', 'boost' => 1.0], |
|
| 195 | 195 | ], |
| 196 | 196 | ], |
| 197 | 197 | ]); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $signer = new SignatureV4('es', $region); |
| 44 | 44 | $credProvider = $this->getCredentialProvider(); |
| 45 | 45 | |
| 46 | - return Middleware::mapRequest(function (RequestInterface $req) use ( |
|
| 46 | + return Middleware::mapRequest(function(RequestInterface $req) use ( |
|
| 47 | 47 | $signer, |
| 48 | 48 | $credProvider |
| 49 | 49 | ) { |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | * |
| 255 | 255 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html |
| 256 | 256 | * |
| 257 | - * @param array|\Elastica\Document[] $docs Array of Elastica\Document |
|
| 257 | + * @param Document[] $docs Array of Elastica\Document |
|
| 258 | 258 | * |
| 259 | 259 | * @throws InvalidException If docs is empty |
| 260 | 260 | */ |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | /** |
| 377 | 377 | * Bulk deletes documents. |
| 378 | 378 | * |
| 379 | - * @param array|\Elastica\Document[] $docs |
|
| 379 | + * @param Document[] $docs |
|
| 380 | 380 | * |
| 381 | 381 | * @throws InvalidException |
| 382 | 382 | */ |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | /** |
| 476 | - * @param array|\Elastica\Connection[] $connections |
|
| 476 | + * @param Connection[] $connections |
|
| 477 | 477 | * |
| 478 | 478 | * @return $this |
| 479 | 479 | */ |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | /** |
| 77 | 77 | * Get the value of the given field. |
| 78 | 78 | * |
| 79 | - * @param mixed $key |
|
| 79 | + * @param string $key |
|
| 80 | 80 | * |
| 81 | 81 | * @throws InvalidException If the given field does not exist |
| 82 | 82 | * |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | /** |
| 155 | 155 | * Update entries in the db based on a query. |
| 156 | 156 | * |
| 157 | - * @param array|Query|string $query Query object or array |
|
| 157 | + * @param string $query Query object or array |
|
| 158 | 158 | * @param AbstractScript $script Script |
| 159 | 159 | * @param array $options Optional params |
| 160 | 160 | * |
@@ -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 | */ |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | /** |
| 362 | 362 | * Sets a post_filter to the current query. |
| 363 | 363 | * |
| 364 | - * @param AbstractQuery|array $filter |
|
| 364 | + * @param AbstractQuery $filter |
|
| 365 | 365 | * |
| 366 | 366 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-post-filter |
| 367 | 367 | */ |