1 | <?php namespace Pizdata\OAuth2\Client\Provider; |
||
8 | class Shopify extends AbstractProvider |
||
9 | { |
||
10 | /** |
||
11 | * The store name. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | public $store = ''; |
||
16 | |||
17 | /** |
||
18 | * @param array $options |
||
19 | * @param array $collaborators |
||
20 | * |
||
21 | * @throws \InvalidArgumentException |
||
22 | */ |
||
23 | 6 | public function __construct($options = [], array $collaborators = []) |
|
34 | |||
35 | /** |
||
36 | * Get authorization url to begin OAuth flow |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | 3 | public function getBaseAuthorizationUrl() |
|
44 | |||
45 | /** |
||
46 | * Get access token url to retrieve token |
||
47 | * |
||
48 | * @param array $params |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | 6 | public function getBaseAccessTokenUrl(array $params) |
|
56 | |||
57 | /** |
||
58 | * Get provider url to fetch user details |
||
59 | * |
||
60 | * @param AccessToken $token |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | 6 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
72 | |||
73 | /** |
||
74 | * Get the default scopes used by this provider. |
||
75 | * |
||
76 | * @link https://help.shopify.com/api/getting-started/authentication/oauth#scopes |
||
77 | * @return array |
||
78 | */ |
||
79 | 3 | protected function getDefaultScopes() |
|
86 | |||
87 | /** |
||
88 | * Check a provider response for errors. |
||
89 | * |
||
90 | * @throws \Pizdata\OAuth2\Client\Exception\ShopifyIdentityProviderException |
||
91 | * @param ResponseInterface $response |
||
92 | * @param array $data |
||
93 | * @return void |
||
94 | */ |
||
95 | 12 | protected function checkResponse(ResponseInterface $response, $data) |
|
105 | |||
106 | /** |
||
107 | * Generate a user object from a successful user details request. |
||
108 | * |
||
109 | * @param array $response |
||
110 | * @param AccessToken $token |
||
111 | * @return League\OAuth2\Client\Provider\ResourceOwnerInterface |
||
112 | */ |
||
113 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
119 | } |
||
120 |
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: