woocommerce / wc-api-php

WooCommerce REST API PHP Library
https://packagist.org/packages/automattic/woocommerce
MIT License
528 stars 160 forks source link

Client return types are array not stdClass #329

Open jshah4517 opened 2 years ago

jshah4517 commented 2 years ago

If I do a get call to the orders endpoint for example, it seems to return an array but the phpdoc says stdClass. The change that led to this documentation seems to have come in https://github.com/woocommerce/wc-api-php/pull/286

This gives us problems as phpstan reports errors based on the return type expected. Is the correct return type array or should it be returning an stdClass?