1 | <?php |
||
18 | class StackExchange extends AbstractProvider |
||
19 | { |
||
20 | use BearerAuthorizationTrait; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $urlApi = 'https://api.stackexchange.com/2.2/'; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $urlAuthorize = 'https://stackexchange.com/oauth'; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $urlAccessToken = 'https://stackexchange.com/oauth/access_token'; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $scope; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $key; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $site = 'stackoverflow'; |
||
51 | |||
52 | /** |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $state; |
||
56 | |||
57 | /** |
||
58 | * @var string |
||
59 | */ |
||
60 | protected $redirectUri; |
||
61 | |||
62 | /** |
||
63 | * @inheritDoc |
||
64 | */ |
||
65 | 1 | protected function getDefaultScopes() |
|
69 | |||
70 | /** |
||
71 | * @inheritDoc |
||
72 | */ |
||
73 | 1 | public function getBaseAuthorizationUrl() |
|
77 | |||
78 | /** |
||
79 | * @inheritDoc |
||
80 | */ |
||
81 | 1 | public function getBaseAccessTokenUrl(array $params) |
|
90 | |||
91 | /** |
||
92 | * @inheritDoc |
||
93 | */ |
||
94 | 1 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
103 | |||
104 | /** |
||
105 | * @inheritDoc |
||
106 | */ |
||
107 | 1 | protected function getAuthorizationParameters(array $options) |
|
126 | |||
127 | /** |
||
128 | * @inheritDoc |
||
129 | */ |
||
130 | 1 | protected function parseResponse(ResponseInterface $response) |
|
143 | |||
144 | /** |
||
145 | * @inheritDoc |
||
146 | */ |
||
147 | 1 | protected function checkResponse(ResponseInterface $response, $data) |
|
153 | |||
154 | /** |
||
155 | * @inheritDoc |
||
156 | */ |
||
157 | 1 | protected function createResourceOwner(array $response, AccessToken $token) |
|
161 | } |
||
162 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.