@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * @param array|string $fields |
|
| 191 | + * @param string $fields |
|
| 192 | 192 | * |
| 193 | 193 | * @return $this |
| 194 | 194 | */ |
@@ -385,9 +385,9 @@ discard block |
||
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | /** |
| 388 | - * @param array $fields if empty array all options will be returned |
|
| 388 | + * @param string[] $fields if empty array all options will be returned |
|
| 389 | 389 | * |
| 390 | - * @return array |
|
| 390 | + * @return string[] |
|
| 391 | 391 | */ |
| 392 | 392 | public function getOptions(array $fields = []) |
| 393 | 393 | { |
@@ -12,6 +12,9 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | class Filter extends AbstractAggregation |
| 14 | 14 | { |
| 15 | + /** |
|
| 16 | + * @param AbstractQuery $filter |
|
| 17 | + */ |
|
| 15 | 18 | public function __construct(string $name, ?AbstractQuery $filter = null) |
| 16 | 19 | { |
| 17 | 20 | parent::__construct($name); |
@@ -25,6 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * If a name is given, it will be added as a key, otherwise considered as an anonymous filter |
| 27 | 27 | * |
| 28 | + * @param string $name |
|
| 28 | 29 | * @return $this |
| 29 | 30 | */ |
| 30 | 31 | public function addFilter(AbstractQuery $filter, ?string $name = null): self |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | * Add value to a key. If original value is not an array, value is wrapped. |
| 165 | 165 | * |
| 166 | 166 | * @param string $key Key to add |
| 167 | - * @param mixed $value Value |
|
| 167 | + * @param string $value Value |
|
| 168 | 168 | */ |
| 169 | 169 | public function add(string $key, $value): void |
| 170 | 170 | { |
@@ -78,6 +78,7 @@ |
||
| 78 | 78 | * |
| 79 | 79 | * @throws InvalidException If the given field does not exist |
| 80 | 80 | * |
| 81 | + * @param string $key |
|
| 81 | 82 | * @return mixed |
| 82 | 83 | */ |
| 83 | 84 | public function get($key) |
@@ -156,7 +156,7 @@ |
||
| 156 | 156 | /** |
| 157 | 157 | * Update entries in the db based on a query. |
| 158 | 158 | * |
| 159 | - * @param Query|string|array $query Query object or array |
|
| 159 | + * @param string $query Query object or array |
|
| 160 | 160 | * @param AbstractScript $script Script |
| 161 | 161 | * @param array $options Optional params |
| 162 | 162 | * |
@@ -15,10 +15,10 @@ discard block |
||
| 15 | 15 | * @see http://php.net/manual/en/function.json-decode.php |
| 16 | 16 | * @see http://php.net/manual/en/function.json-last-error.php |
| 17 | 17 | * |
| 18 | - * @param string $args,... JSON string to parse |
|
| 19 | 18 | * |
| 20 | 19 | * @throws JSONParseException |
| 21 | 20 | * |
| 21 | + * @param string $args |
|
| 22 | 22 | * @return array PHP array representation of JSON string |
| 23 | 23 | */ |
| 24 | 24 | public static function parse($args/* inherit from json_decode */) |
@@ -49,7 +49,6 @@ discard block |
||
| 49 | 49 | * @see http://php.net/manual/en/function.json-encode.php |
| 50 | 50 | * @see http://php.net/manual/en/function.json-last-error.php |
| 51 | 51 | * |
| 52 | - * @param mixed $args,... Target to stringify |
|
| 53 | 52 | * |
| 54 | 53 | * @throws JSONParseException |
| 55 | 54 | * |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * Create new info object for node. |
| 54 | 54 | * |
| 55 | 55 | * @param BaseNode $node Node object |
| 56 | - * @param array $params List of params to return. Can be: settings, os, process, jvm, thread_pool, network, transport, http |
|
| 56 | + * @param string[] $params List of params to return. Can be: settings, os, process, jvm, thread_pool, network, transport, http |
|
| 57 | 57 | */ |
| 58 | 58 | public function __construct(BaseNode $node, array $params = []) |
| 59 | 59 | { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * node is running on |
| 70 | 70 | * Example 2: get('os', 'mem') returns an array with all mem infos |
| 71 | 71 | * |
| 72 | - * @return mixed Data array entry or null if not found |
|
| 72 | + * @return string Data array entry or null if not found |
|
| 73 | 73 | */ |
| 74 | 74 | public function get() |
| 75 | 75 | { |
@@ -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 array|AbstractQuery $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 | */ |