double-break / spapi-php

Amazon Selling Partner API PHP Client
MIT License
56 stars 48 forks source link

PHP 7.4.11 error #26

Closed FoxVisionPro closed 3 years ago

FoxVisionPro commented 3 years ago

Hi,

I encountered an error in the code, which is pretty simple to fix. Here is the error:

In Credentials.php line 32:

  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`  

It is about the code:
$lwaAccessToken = $useMigrationToken === true ? $this->getMigrationToken() : $useMigrationToken === 'grantless' ? $this->getGrantlessAuthToken() : $this->getLWAToken();

New version of PHP does not appreciate the ambiguity without parenthesis. Can you fix this line plz ?

Thanks, Vincent

lyubo-slavilov commented 3 years ago

Yes, sure. Will notify you when it is done