10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.24k stars 312 forks source link

BUG: Return type of ElasticPress\Elasticsearch::index_document incorrectly documented #3880

Closed ictbeheer closed 5 months ago

ictbeheer commented 5 months ago

Describe the bug

The phpdoc for ElasticPress\Elasticsearch::index_document has return type boolean|array while it is actually boolean|object as json_decode returns an object.

Steps to Reproduce

  1. Check https://github.com/10up/ElasticPress/blob/9b4d1210fe5b3c30e0781b72149cf4b773bd0196/includes/classes/Elasticsearch.php#L81

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct