1 | <?php namespace Pizdata\OAuth2\Client\Provider; |
||
8 | class Shopify extends AbstractProvider |
||
9 | { |
||
10 | /** |
||
11 | * Production Shopify domain. |
||
12 | * |
||
13 | * @const string |
||
14 | */ |
||
15 | const BASE_SHOPIFY_DOMAIN = 'myshopify.com'; |
||
16 | |||
17 | /** |
||
18 | * The store name. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | public $store = ''; |
||
23 | |||
24 | /** |
||
25 | * @param array $options |
||
26 | * @param array $collaborators |
||
27 | * |
||
28 | * @throws \InvalidArgumentException |
||
29 | */ |
||
30 | 9 | public function __construct($options = [], array $collaborators = []) |
|
41 | |||
42 | /** |
||
43 | * Get authorization url to begin OAuth flow |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | 6 | public function getBaseAuthorizationUrl() |
|
51 | |||
52 | /** |
||
53 | * Get access token url to retrieve token |
||
54 | * |
||
55 | * @param array $params |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | 3 | public function getBaseAccessTokenUrl(array $params) |
|
63 | |||
64 | /** |
||
65 | * Get provider url to fetch user details |
||
66 | * |
||
67 | * @param AccessToken $token |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
||
79 | |||
80 | /** |
||
81 | * Get the default scopes used by this provider. |
||
82 | * |
||
83 | * @link https://help.shopify.com/api/getting-started/authentication/oauth#scopes |
||
84 | * @return array |
||
85 | */ |
||
86 | 6 | protected function getDefaultScopes() |
|
93 | |||
94 | /** |
||
95 | * Check a provider response for errors. |
||
96 | * |
||
97 | * @throws IdentityProviderException |
||
98 | * @param ResponseInterface $response |
||
99 | * @param array $data |
||
100 | * @return void |
||
101 | */ |
||
102 | 2 | protected function checkResponse(ResponseInterface $response, $data) |
|
112 | |||
113 | /** |
||
114 | * Generate a user object from a successful user details request. |
||
115 | * |
||
116 | * @param array $response |
||
117 | * @param AccessToken $token |
||
118 | * @return League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
119 | */ |
||
120 | protected function createResourceOwner(array $response, AccessToken $token) |
||
126 | } |
||
127 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: