1 | <?php |
||
14 | class RequestConfig implements RequestConfigInterface |
||
15 | { |
||
16 | /** |
||
17 | * The ConfigInterface instance. |
||
18 | * |
||
19 | * @var \Risan\OAuth1\ConfigInterface |
||
20 | */ |
||
21 | protected $config; |
||
22 | |||
23 | /** |
||
24 | * The SignerInterface instance. |
||
25 | * |
||
26 | * @var \Risan\OAuth1\Signature\SignerInterface |
||
27 | */ |
||
28 | protected $signer; |
||
29 | |||
30 | /** |
||
31 | * The NonceGeneratorInterface instance. |
||
32 | * |
||
33 | * @var \Risan\OAuth1\Request\NonceGeneratorInterface |
||
34 | */ |
||
35 | protected $nonceGenerator; |
||
36 | |||
37 | /** |
||
38 | * Create RequestBuilder instance. |
||
39 | * |
||
40 | * @param \Risan\OAuth1\ConfigInterface $config |
||
41 | * @param \Risan\OAuth1\Signature\SignerInterface $signer |
||
42 | * @param \Risan\OAuth1\Request\NonceGeneratorInterface $nonceGenerator |
||
43 | */ |
||
44 | 17 | public function __construct(ConfigInterface $config, SignerInterface $signer, NonceGeneratorInterface $nonceGenerator) |
|
54 | |||
55 | /** |
||
56 | * {@inheritDoc} |
||
57 | */ |
||
58 | 1 | public function getConfig() |
|
62 | |||
63 | /** |
||
64 | * {@inheritDoc} |
||
65 | */ |
||
66 | 1 | public function getSigner() |
|
70 | |||
71 | /** |
||
72 | * {@inheritDoc} |
||
73 | */ |
||
74 | 1 | public function getNonceGenerator() |
|
78 | |||
79 | /** |
||
80 | * {@inheritDoc} |
||
81 | */ |
||
82 | 2 | public function getCurrentTimestamp() |
|
86 | |||
87 | /** |
||
88 | * {@inheritDoc} |
||
89 | */ |
||
90 | 1 | public function getTemporaryCredentialsUrl() |
|
94 | |||
95 | /** |
||
96 | * {@inheritDoc} |
||
97 | */ |
||
98 | 1 | public function getTemporaryCredentialsAuthorizationHeader() |
|
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | 1 | public function buildAuthorizationUrl(TemporaryCredentials $temporaryCredentials) |
|
120 | |||
121 | /** |
||
122 | * {@inheritDoc} |
||
123 | */ |
||
124 | 1 | public function getTokenCredentialsUrl() |
|
128 | |||
129 | /** |
||
130 | * {@inheritDoc} |
||
131 | */ |
||
132 | 1 | public function getTokenCredentialsAuthorizationHeader(TemporaryCredentials $temporaryCredentials, $verificationCode) |
|
151 | |||
152 | /** |
||
153 | * Get base protocol parameters for the authorization header. |
||
154 | * |
||
155 | * @return array |
||
156 | */ |
||
157 | 1 | public function getBaseProtocolParameters() |
|
167 | |||
168 | /** |
||
169 | * Add signature parameter to the given protocol parameters. |
||
170 | * |
||
171 | * @param array &$parameters |
||
172 | * @param string $uri |
||
173 | * @param \Risan\OAuth1\Credentials\ServerIssuedCredentials|null $serverIssuedCredentials |
||
174 | * @param array $requestOptions |
||
175 | * @param string $httpMethod |
||
176 | */ |
||
177 | 1 | public function addSignatureParameter(array &$parameters, $uri, ServerIssuedCredentials $serverIssuedCredentials = null, array $requestOptions = [], $httpMethod = 'POST') |
|
197 | |||
198 | /** |
||
199 | * Check if request options has the given key option. |
||
200 | * |
||
201 | * @param array $requestOptions |
||
202 | * @param string $key |
||
203 | * @return boolean |
||
204 | */ |
||
205 | 2 | public function requestOptionsHas(array $requestOptions, $key) |
|
211 | |||
212 | /** |
||
213 | * Append query parameters to URI. |
||
214 | * |
||
215 | * @param string $uri |
||
216 | * @param array $parameters |
||
217 | * @return string |
||
218 | */ |
||
219 | 2 | public function appendQueryParametersToUri($uri, array $parameters) |
|
229 | |||
230 | /** |
||
231 | * Normalize protocol parameters to be used as authorization header. |
||
232 | * |
||
233 | * @param array $parameters |
||
234 | * @return string |
||
235 | */ |
||
236 | public function normalizeProtocolParameters(array $parameters) |
||
244 | } |
||
245 |
This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.
The variable may have been renamed without also renaming all references.