Skip to content

Commit ac47b9a

Browse files
Merge pull request #252 from HubSpot/feature/fixRequestOnPhp7.3
Fix request on php7.3 and cs fix
2 parents 6fed8cb + eb3cf73 commit ac47b9a

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

lib/Factory.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
*/
1212
class Factory
1313
{
14-
/**
15-
* @param array $config
16-
*/
1714
public static function create(ClientInterface $client = null, Config $config = null): Discovery
1815
{
1916
return new Discovery($client ?: new Client(), $config ?: new Config());

lib/Http/Request.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,27 @@
66

77
class Request
88
{
9-
protected array $options = [];
10-
protected string $baseUrl = 'https://api.hubapi.com';
9+
/** @var array */
10+
protected $options = [];
11+
12+
/** @var string */
13+
protected $baseUrl = 'https://api.hubapi.com';
1114
protected $body;
12-
protected Config $config;
13-
protected bool $defaultJson = true;
14-
protected string $url;
15-
protected string $method;
16-
protected array $headers = [];
15+
16+
/** @var Config */
17+
protected $config;
18+
19+
/** @var bool */
20+
protected $defaultJson = true;
21+
22+
/** @var string */
23+
protected $url;
24+
25+
/** @var string */
26+
protected $method;
27+
28+
/** @var array */
29+
protected $headers = [];
1730

1831
public function __construct(Config $config, array $options = [])
1932
{

tests/Unit/Utils/OAuth2Test.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function buildAuthorizationUrl()
2020
['contacts', 'timeline'],
2121
['scope1', 'scope2']
2222
);
23+
2324
$this->assertSame(
2425
'https://app.hubspot.com/oauth/authorize?client_id=clientid&redirect_uri=http%3A%2F%2Flocalhost&scope=contacts%20timeline&optional_scope=scope1%20scope2',
2526
$authUrl
@@ -34,6 +35,7 @@ public function buildAuthorizationUrlWithEmptyOptionalScope()
3435
'http://localhost',
3536
['contacts', 'timeline']
3637
);
38+
3739
$this->assertSame(
3840
'https://app.hubspot.com/oauth/authorize?client_id=clientid&redirect_uri=http%3A%2F%2Flocalhost&scope=contacts%20timeline',
3941
$authUrl

0 commit comments

Comments
 (0)