PHPStan (and presumably Psalm) detects incorrect return type for IndicesNamespace::get.
Please note, it's a docblock comment not a return typehint so I imagine this is low priority.
This is caused by -
IndicesNamespace.php::41
/**
* $params['index'] = (list) A comma-separated list of indices to check (Required)
* ['feature'] = (list) A comma-separated list of features to return
* ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
* ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
* ['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
*
* @param $params array Associative array of parameters
*
* @return bool
*/
public function get($params)
This should be @return array the same as all the other methods except for exists.
I've checked the v5.x branch and it's correct on there so should be fixed by creating a new tagged version off that with nothing else to do.
Function demo() should return array but returns bool.
System details
elasticsearch-php v5.5.0
Please note - I'm happy to fix this myself and submit a PR if you'd like me to but having never contributed to the project I wanted to raise the issue here to make sure it was desirable to do so, especially since the fix is probably just creating a new tag.
Summary of problem or feature request
PHPStan (and presumably Psalm) detects incorrect return type for IndicesNamespace::get.
Please note, it's a docblock comment not a return typehint so I imagine this is low priority.
This is caused by -
This should be
@return array
the same as all the other methods except for exists.I've checked the v5.x branch and it's correct on there so should be fixed by creating a new tagged version off that with nothing else to do.
Code snippet of problem
Then run PHPStan on that code and you'll get -
System details
elasticsearch-php v5.5.0
Please note - I'm happy to fix this myself and submit a PR if you'd like me to but having never contributed to the project I wanted to raise the issue here to make sure it was desirable to do so, especially since the fix is probably just creating a new tag.