Skip to content

Commit a862268

Browse files
authored
Merge pull request #1220 from abraham/options
Switch to using options argument
2 parents b56c62a + d281941 commit a862268

File tree

4 files changed

+84
-77
lines changed

4 files changed

+84
-77
lines changed

src/Request.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ class Request
1414
protected $parameters;
1515
protected $httpMethod;
1616
protected $httpUrl;
17-
protected $json;
1817
public static $version = '1.0';
1918

2019
/**
2120
* Constructor
2221
*
2322
* @param string $httpMethod
2423
* @param string $httpUrl
25-
* @param array|null $parameters
24+
* @param ?array $parameters
2625
*/
2726
public function __construct(
2827
string $httpMethod,
@@ -55,7 +54,7 @@ public static function fromConsumerAndToken(
5554
string $httpMethod,
5655
string $httpUrl,
5756
array $parameters = [],
58-
$json = false,
57+
array $options = [],
5958
) {
6059
$defaults = [
6160
'oauth_version' => Request::$version,
@@ -69,7 +68,7 @@ public static function fromConsumerAndToken(
6968

7069
// The json payload is not included in the signature on json requests,
7170
// therefore it shouldn't be included in the parameters array.
72-
if ($json) {
71+
if ($options['jsonPayload'] ?? false) {
7372
$parameters = $defaults;
7473
} else {
7574
$parameters = array_merge($defaults, $parameters);

0 commit comments

Comments
 (0)