1 | <?php |
||
12 | class MockOAuth2Server |
||
13 | { |
||
14 | const KEY_TOKEN_EXPIRES_IN = 'tokenExpiresIn'; |
||
15 | const KEY_TOKEN_PATH = 'tokenPath'; |
||
16 | const KEY_TOKEN_INVALID_COUNT = 'tokenInvalidCount'; |
||
17 | const KEY_EXPECTED_QUERY_COUNT = 'expectedQueryCount'; |
||
18 | |||
19 | /** @var array */ |
||
20 | protected $options; |
||
21 | |||
22 | /** |
||
23 | * @var MockHandler |
||
24 | */ |
||
25 | private $handlerStack; |
||
26 | |||
27 | /** |
||
28 | * @var int |
||
29 | */ |
||
30 | private $tokenInvalidCount = 0; |
||
31 | |||
32 | /** |
||
33 | * @param array $options |
||
34 | */ |
||
35 | public function __construct(array $options = []) |
||
59 | |||
60 | /** |
||
61 | * @return HandlerStack |
||
62 | */ |
||
63 | public function getHandlerStack() |
||
67 | |||
68 | /** |
||
69 | * @param RequestInterface $request |
||
70 | * @param array $options |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | protected function getResult(RequestInterface $request, array $options) |
||
87 | |||
88 | /** |
||
89 | * @param RequestInterface $request |
||
90 | * @param array $options |
||
91 | * |
||
92 | * @return array |
||
93 | */ |
||
94 | protected function oauth2Token(RequestInterface $request, $options) |
||
115 | |||
116 | /** |
||
117 | * @return array |
||
118 | */ |
||
119 | protected function validTokenResponse() |
||
135 | |||
136 | /** |
||
137 | * @param array $requestBody |
||
138 | * |
||
139 | * @return array |
||
140 | * The response as expected by the MockHandler. |
||
141 | */ |
||
142 | protected function grantTypePassword(array $requestBody) |
||
151 | |||
152 | /** |
||
153 | * @param array $options |
||
154 | * |
||
155 | * @return array |
||
156 | * The response as expected by the MockHandler. |
||
157 | */ |
||
158 | protected function grantTypeClientCredentials(array $options) |
||
167 | |||
168 | /** |
||
169 | * @param array $requestBody |
||
170 | * |
||
171 | * @return array |
||
172 | */ |
||
173 | protected function grantTypeRefreshToken(array $requestBody) |
||
181 | |||
182 | /** |
||
183 | * @param array $requestBody |
||
184 | * |
||
185 | * @return array |
||
186 | */ |
||
187 | protected function grantTypeJwtBearer(array $requestBody) |
||
195 | |||
196 | /** |
||
197 | * @param RequestInterface $request |
||
198 | * |
||
199 | * @return array |
||
200 | */ |
||
201 | protected function mockApiCall(RequestInterface $request) |
||
220 | } |
||
221 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..