Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ $result = $api->graph(...);
Requests are made using Guzzle.

```php
$api->rest(string $type, string $path, array $params = null, array $headers = [], bool $sync = true);
$api->rest(string $type, string $path, ?array $params = null, array $headers = [], bool $sync = true);
// or $api->getRestClient()->request(....);
```

Expand Down
4 changes: 2 additions & 2 deletions src/BasicShopifyAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public function graphAsync(string $query, array $variables = []): Promise
/**
* @see Rest::request
*/
public function rest(string $type, string $path, array $params = null, array $headers = [], bool $sync = true)
public function rest(string $type, string $path, ?array $params = null, array $headers = [], bool $sync = true)
{
return $this->getRestClient()->request($type, $path, $params, $headers, $sync);
}
Expand All @@ -437,7 +437,7 @@ public function rest(string $type, string $path, array $params = null, array $he
*
* @see rest
*/
public function restAsync(string $type, string $path, array $params = null, array $headers = []): Promise
public function restAsync(string $type, string $path, ?array $params = null, array $headers = []): Promise
{
return $this->rest($type, $path, $params, $headers, false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Clients/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getAuthUrl($scopes, string $redirectUri, string $mode = 'offline
/**
* {@inheritdoc}
*/
public function request(string $type, string $path, array $params = null, array $headers = [], bool $sync = true)
public function request(string $type, string $path, ?array $params = null, array $headers = [], bool $sync = true)
{
// Build URI
$uri = $this->getBaseUri()->withPath($path);
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/RestRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface RestRequester extends LimitAccesser, TimeAccesser, SessionAware, Clien
*
* @return array|Promise
*/
public function request(string $type, string $path, array $params = null, array $headers = [], bool $sync = true);
public function request(string $type, string $path, ?array $params = null, array $headers = [], bool $sync = true);

/**
* Gets the access object from a "code" supplied by Shopify request after successfull auth (for public apps).
Expand Down
Loading