Skip to content

Commit f04b029

Browse files
committed
Revert PHP 7.4 compatibility changes
1 parent d3373e2 commit f04b029

4 files changed

Lines changed: 27 additions & 27 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
],
5555
"version-update": "@generate --supporting-files-only",
5656
"clean": "rm -rf docs src/Models/*/* src/Apis/*/*/*",
57-
"lint": "./vendor/bin/php-cs-fixer fix --allow-risky=yes -vvv"
57+
"lint": "php vendor/bin/php-cs-fixer fix --allow-risky=yes -vvv"
5858
},
5959
"autoload": {
6060
"psr-4": { "Walmart\\" : "src/" }

resources/templates/Configuration.hbs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class Configuration
156156
*
157157
* @return $this
158158
*/
159-
public function setApiKey(string $apiKeyIdentifier, string $key): self
159+
public function setApiKey(string $apiKeyIdentifier, string $key): static
160160
{
161161
$this->apiKeys[$apiKeyIdentifier] = $key;
162162
return $this;
@@ -189,7 +189,7 @@ class Configuration
189189
*
190190
* @return $this
191191
*/
192-
public function setAccessToken(?AccessToken $accessToken): self
192+
public function setAccessToken(?AccessToken $accessToken): static
193193
{
194194
if (!($accessToken instanceof AccessToken)) {
195195
throw new InvalidArgumentException('Invalid access token: must be an instance of ' . AccessToken::class);
@@ -227,7 +227,7 @@ class Configuration
227227
*
228228
* @return $this
229229
*/
230-
public function setClientId(string $clientId): self
230+
public function setClientId(string $clientId): static
231231
{
232232
$this->clientId = $clientId;
233233
return $this;
@@ -250,7 +250,7 @@ class Configuration
250250
*
251251
* @return $this
252252
*/
253-
public function setClientSecret(string $clientSecret): self
253+
public function setClientSecret(string $clientSecret): static
254254
{
255255
$this->clientSecret = $clientSecret;
256256
return $this;
@@ -273,7 +273,7 @@ class Configuration
273273
*
274274
* @return $this
275275
*/
276-
public function setCountry(string $country): self
276+
public function setCountry(string $country): static
277277
{
278278
if (!is_string($country)) {
279279
throw new InvalidArgumentException('Invalid country passed: must be a string');
@@ -302,7 +302,7 @@ class Configuration
302302
*
303303
* @return $this
304304
*/
305-
public function setPrivateKey(string $privateKey): self
305+
public function setPrivateKey(string $privateKey): static
306306
{
307307
$this->privateKey = $privateKey;
308308
return $this;
@@ -325,7 +325,7 @@ class Configuration
325325
*
326326
* @return $this
327327
*/
328-
public function setConsumerId(string $consumerId): self
328+
public function setConsumerId(string $consumerId): static
329329
{
330330
$this->consumerId = $consumerId;
331331
return $this;
@@ -348,7 +348,7 @@ class Configuration
348348
*
349349
* @return $this
350350
*/
351-
public function setChannelType(string $channelType): self
351+
public function setChannelType(string $channelType): static
352352
{
353353
$this->channelType = $channelType;
354354
return $this;
@@ -371,7 +371,7 @@ class Configuration
371371
*
372372
* @return $this
373373
*/
374-
public function setPartnerId(string $partnerId): self
374+
public function setPartnerId(string $partnerId): static
375375
{
376376
$this->partnerId = $partnerId;
377377
return $this;
@@ -394,7 +394,7 @@ class Configuration
394394
*
395395
* @return $this
396396
*/
397-
public function setHost(string $host): self
397+
public function setHost(string $host): static
398398
{
399399
$this->host = $host;
400400
return $this;
@@ -445,7 +445,7 @@ class Configuration
445445
*
446446
* @return $this
447447
*/
448-
public function setDebug(bool $debug = true): self
448+
public function setDebug(bool $debug = true): static
449449
{
450450
$this->debug = $debug;
451451
return $this;
@@ -468,7 +468,7 @@ class Configuration
468468
*
469469
* @return $this
470470
*/
471-
public function setDebugFile(string $debugFile): self
471+
public function setDebugFile(string $debugFile): static
472472
{
473473
$this->debugFile = $debugFile;
474474
return $this;

src/Configuration.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function isSignatureAuthReady(): bool
161161
*
162162
* @return $this
163163
*/
164-
public function setApiKey(string $apiKeyIdentifier, string $key): self
164+
public function setApiKey(string $apiKeyIdentifier, string $key): static
165165
{
166166
$this->apiKeys[$apiKeyIdentifier] = $key;
167167
return $this;
@@ -194,7 +194,7 @@ public function getApiKey(string $apiKeyIdentifier, array $requestInfo): ?string
194194
*
195195
* @return $this
196196
*/
197-
public function setAccessToken(?AccessToken $accessToken): self
197+
public function setAccessToken(?AccessToken $accessToken): static
198198
{
199199
if (!($accessToken instanceof AccessToken)) {
200200
throw new InvalidArgumentException('Invalid access token: must be an instance of ' . AccessToken::class);
@@ -232,7 +232,7 @@ public function getAccessToken(): ?AccessToken
232232
*
233233
* @return $this
234234
*/
235-
public function setClientId(string $clientId): self
235+
public function setClientId(string $clientId): static
236236
{
237237
$this->clientId = $clientId;
238238
return $this;
@@ -255,7 +255,7 @@ public function getClientId(): string
255255
*
256256
* @return $this
257257
*/
258-
public function setClientSecret(string $clientSecret): self
258+
public function setClientSecret(string $clientSecret): static
259259
{
260260
$this->clientSecret = $clientSecret;
261261
return $this;
@@ -278,11 +278,11 @@ public function getClientSecret(): string
278278
*
279279
* @return $this
280280
*/
281-
public function setCountry(string $country): self
281+
public function setCountry(string $country): static
282282
{
283283
if (!is_string($country)) {
284284
throw new InvalidArgumentException('Invalid country passed: must be a string');
285-
} elseif (!Country::isValid($country)) {
285+
} else if (!Country::isValid($country)) {
286286
throw new InvalidArgumentException('Invalid country passed: ' . $country . '. Valid countries are: ' . implode(', ', Country::all()));
287287
}
288288

@@ -307,7 +307,7 @@ public function getCountry(): string
307307
*
308308
* @return $this
309309
*/
310-
public function setPrivateKey(string $privateKey): self
310+
public function setPrivateKey(string $privateKey): static
311311
{
312312
$this->privateKey = $privateKey;
313313
return $this;
@@ -330,7 +330,7 @@ public function getPrivateKey(): string
330330
*
331331
* @return $this
332332
*/
333-
public function setConsumerId(string $consumerId): self
333+
public function setConsumerId(string $consumerId): static
334334
{
335335
$this->consumerId = $consumerId;
336336
return $this;
@@ -353,7 +353,7 @@ public function getConsumerId(): string
353353
*
354354
* @return $this
355355
*/
356-
public function setChannelType(string $channelType): self
356+
public function setChannelType(string $channelType): static
357357
{
358358
$this->channelType = $channelType;
359359
return $this;
@@ -376,7 +376,7 @@ public function getChannelType(): string
376376
*
377377
* @return $this
378378
*/
379-
public function setPartnerId(string $partnerId): self
379+
public function setPartnerId(string $partnerId): static
380380
{
381381
$this->partnerId = $partnerId;
382382
return $this;
@@ -399,7 +399,7 @@ public function getPartnerId(): string
399399
*
400400
* @return $this
401401
*/
402-
public function setHost(string $host): self
402+
public function setHost(string $host): static
403403
{
404404
$this->host = $host;
405405
return $this;
@@ -450,7 +450,7 @@ public function getUserAgent()
450450
*
451451
* @return $this
452452
*/
453-
public function setDebug(bool $debug = true): self
453+
public function setDebug(bool $debug = true): static
454454
{
455455
$this->debug = $debug;
456456
return $this;
@@ -473,7 +473,7 @@ public function getDebug(): bool
473473
*
474474
* @return $this
475475
*/
476-
public function setDebugFile(string $debugFile): self
476+
public function setDebugFile(string $debugFile): static
477477
{
478478
$this->debugFile = $debugFile;
479479
return $this;

src/Traits/HasResponseHeaders.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getHeaders(): array
2828
*
2929
* @return self
3030
*/
31-
public function setHeaders(array $headers): self
31+
public function setHeaders(array $headers): static
3232
{
3333
$this->headers = $headers;
3434
return $this;

0 commit comments

Comments
 (0)