@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | - * @param array|string $fields |
|
| 159 | + * @param string $fields |
|
| 160 | 160 | */ |
| 161 | 161 | public function setFields($fields): self |
| 162 | 162 | { |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | /** |
| 224 | - * @return bool |
|
| 224 | + * @return string |
|
| 225 | 225 | */ |
| 226 | 226 | public function getTimeout(): string |
| 227 | 227 | { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | /** |
| 288 | - * @param array $fields if empty array all options will be returned |
|
| 288 | + * @param string[] $fields if empty array all options will be returned |
|
| 289 | 289 | */ |
| 290 | 290 | public function getOptions(array $fields = []): array |
| 291 | 291 | { |
@@ -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 | */ |
@@ -399,6 +399,9 @@ |
||
| 399 | 399 | return $index; |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | + /** |
|
| 403 | + * @param TopHits $innerAggr |
|
| 404 | + */ |
|
| 402 | 405 | protected function getOuterAggregationResult($innerAggr) |
| 403 | 406 | { |
| 404 | 407 | $outerAggr = new Terms('top_tags'); |
@@ -47,6 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * @param array $params Additional configuration params. Host and Port are already set |
| 50 | + * @param \Closure $callback |
|
| 50 | 51 | */ |
| 51 | 52 | protected function _getClient(array $params = [], ?callable $callback = null, ?LoggerInterface $logger = null): Client |
| 52 | 53 | { |
@@ -90,6 +91,9 @@ discard block |
||
| 90 | 91 | return 'http://'.$proxyHost.':8001'; |
| 91 | 92 | } |
| 92 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $name |
|
| 96 | + */ |
|
| 93 | 97 | protected function _createIndex(?string $name = null, bool $delete = true, int $shards = 1): Index |
| 94 | 98 | { |
| 95 | 99 | $name = $name ?: static::buildUniqueId(); |
@@ -143,6 +147,9 @@ discard block |
||
| 143 | 147 | return \substr($data['version']['number'], 0, 1); |
| 144 | 148 | } |
| 145 | 149 | |
| 150 | + /** |
|
| 151 | + * @param string $version |
|
| 152 | + */ |
|
| 146 | 153 | protected function _checkVersion($version): void |
| 147 | 154 | { |
| 148 | 155 | $data = $this->_getClient()->request('/')->getData(); |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Elastica\Document; |
| 6 | 6 | use Elastica\Index; |
| 7 | 7 | use Elastica\Query\Ids; |
| 8 | -use Elastica\Query\Type; |
|
| 9 | 8 | use Elastica\Test\Base as BaseTest; |
| 10 | 9 | |
| 11 | 10 | /** |
@@ -139,6 +139,9 @@ |
||
| 139 | 139 | $client->request('_status', 'GET'); |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | + /** |
|
| 143 | + * @param string $url |
|
| 144 | + */ |
|
| 142 | 145 | protected function checkProxy($url): void |
| 143 | 146 | { |
| 144 | 147 | $url = \parse_url($url); |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | |
| 98 | 98 | $indicesWithAlias = $status->getIndicesWithAlias($aliasName); |
| 99 | 99 | $this->assertEquals([$indexName], \array_map( |
| 100 | - function ($index) { |
|
| 100 | + function($index) { |
|
| 101 | 101 | return $index->getName(); |
| 102 | 102 | }, |
| 103 | 103 | $indicesWithAlias |