sveawebpay / php-integration

SDK for Sveas payment methods (standalone and Svea Checkout)
Other
15 stars 19 forks source link

Wrong return type in docblock for doRequest() in WebServicePayment class #84

Closed themichaelhall closed 4 years ago

themichaelhall commented 4 years ago

The DocBlock for method doRequest() in WebServicePayment class says that an instance of CreateOrderEuResponse should be returned. Instead a CreateOrderResponse is returned (at least in my case, I have not tested all different responses that can be returned from that method).

https://github.com/sveawebpay/php-integration/blob/master/src/WebService/Payment/WebServicePayment.php#L45

Although not an critical issue, it makes PhpStorm display an annoying warning when passing the result in another method that takes this instance via a typed parameter.

Expected parameter of type '\Svea\WebPay\WebService\WebServiceResponse\CreateOrderResponse', '\Svea\WebPay\WebService\Payment\CreateOrderEuResponse' provided.

The actual code works fine though :-)

Best regards

/Michael

fre-sund commented 4 years ago

Hi Michael,

Thank you for reporting this issue, I've commited a fix(c022cb439c0ac289c9d7a9cd757e6323dc7648e9) for this in the develop branch which will be merged into the master branch in the future.

Best regards, Fredrik