1 | <?php |
||
9 | class TomTomMySports extends AbstractProvider |
||
10 | { |
||
11 | use BearerAuthorizationTrait; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | const BASE_MYSPORTS_URL = 'https://api.tomtom.com/mysports'; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $apiVersion = '1'; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $apikey; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * @inheritDoc |
||
31 | 9 | */ |
|
32 | protected function getAuthorizationParameters(array $options) |
||
41 | |||
42 | 9 | /** |
|
43 | * @inheritDoc |
||
44 | 3 | */ |
|
45 | public function getAccessToken($grant, array $options = []) |
||
64 | 3 | ||
65 | /** |
||
66 | 9 | * Builds request options used for requesting an access token. |
|
67 | * |
||
68 | * @param array $params |
||
69 | * @return array |
||
70 | */ |
||
71 | protected function getAccessTokenOptions(array $params) |
||
82 | |||
83 | |||
84 | /** |
||
85 | * Get authorization url to begin OAuth flow |
||
86 | * |
||
87 | 12 | * @return string |
|
88 | */ |
||
89 | 12 | public function getBaseAuthorizationUrl() |
|
93 | |||
94 | /** |
||
95 | * @inheritDoc |
||
96 | */ |
||
97 | public function getBaseAccessTokenUrl(array $params) |
||
101 | |||
102 | /** |
||
103 | * @inheritDoc |
||
104 | */ |
||
105 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
||
109 | |||
110 | /** |
||
111 | * @link http://developer.tomtom.com/products/sports/mysportscloud/authorization/ |
||
112 | * |
||
113 | * Get the default scopes used by this provider. |
||
114 | 6 | * |
|
115 | * This should not be a complete list of all scopes, but the minimum |
||
116 | 6 | * required for the provider user interface! |
|
117 | * |
||
118 | * @return array |
||
119 | */ |
||
120 | protected function getDefaultScopes() |
||
124 | |||
125 | /** |
||
126 | * @inheritDoc |
||
127 | 9 | */ |
|
128 | protected function checkResponse(ResponseInterface $response, $data) |
||
138 | |||
139 | /** |
||
140 | * @inheritDoc |
||
141 | */ |
||
142 | protected function createResourceOwner(array $response, AccessToken $token) |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getBaseMySportsUrl() |
||
154 | |||
155 | 3 | /** |
|
156 | * @return string |
||
157 | */ |
||
158 | public function getApiVersion() |
||
162 | |||
163 | 3 | /** |
|
164 | * @inheritDoc |
||
165 | */ |
||
166 | protected function getDefaultHeaders() |
||
173 | } |
||
174 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.