@@ -7,7 +7,7 @@ |
||
7 | 7 | class View extends Action |
8 | 8 | { |
9 | 9 | /** |
10 | - * @return ActiveDataProvider |
|
10 | + * @return \yii\db\ActiveRecordInterface |
|
11 | 11 | * @param mixed $id |
12 | 12 | */ |
13 | 13 | public function run($id) |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | /** |
173 | 173 | * Finds the record based on the provided id or throws an exception. |
174 | 174 | * @param int $id the unique identifier for the record. |
175 | - * @return ActiveRecord |
|
175 | + * @return \yii\db\ActiveRecord |
|
176 | 176 | * @throws NotFoundHttpException if the record can't be found. |
177 | 177 | */ |
178 | 178 | public function findModel($id): ActiveRecord |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * Creates the query to be used by the `findOne()` method. |
191 | 191 | * |
192 | 192 | * @param int $id the unique identifier |
193 | - * @return ActiveQuery |
|
193 | + * @return \yii\db\ActiveQuery |
|
194 | 194 | */ |
195 | 195 | public function findQuery($id): ActiveQuery |
196 | 196 | { |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | * Creates the query to be used by the `index` action when `$searchClass` is |
202 | 202 | * not set. |
203 | 203 | * |
204 | - * @return ActiveQuery |
|
204 | + * @return \yii\db\ActiveQuery |
|
205 | 205 | */ |
206 | 206 | public function indexQuery(): ActiveQuery |
207 | 207 | { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
212 | - * @return ActiveQuery |
|
212 | + * @return \yii\db\ActiveQuery |
|
213 | 213 | */ |
214 | 214 | protected function baseQuery(): ActiveQuery |
215 | 215 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use tecnocen\roa\{actions, FileRecord}; |
6 | 6 | use Yii; |
7 | -use yii\base\InvalidRouteException; |
|
8 | 7 | use yii\data\ActiveDataProvider; |
9 | 8 | use yii\db\{ActiveQuery, ActiveRecord}; |
10 | 9 | use yii\filters\VerbFilter; |
@@ -2,13 +2,13 @@ |
||
2 | 2 | |
3 | 3 | namespace tecnocen\roa\modules; |
4 | 4 | |
5 | -use tecnocen\oauth2server\filters\auth\CompositeAuth; |
|
5 | +use Yii; |
|
6 | 6 | use tecnocen\oauth2server\Module as OAuth2Module; |
7 | +use tecnocen\oauth2server\filters\auth\CompositeAuth; |
|
7 | 8 | use tecnocen\roa\controllers\ApiContainerController; |
8 | 9 | use tecnocen\roa\urlRules\Composite as CompositeUrlRule; |
9 | 10 | use tecnocen\roa\urlRules\Modular as ModularUrlRule; |
10 | 11 | use tecnocen\roa\urlRules\UrlRuleCreator; |
11 | -use Yii; |
|
12 | 12 | use yii\base\BootstrapInterface; |
13 | 13 | use yii\base\InvalidArgumentException; |
14 | 14 | use yii\base\Module; |
@@ -3,17 +3,16 @@ |
||
3 | 3 | namespace tecnocen\roa\modules; |
4 | 4 | |
5 | 5 | use DateTime; |
6 | +use Yii; |
|
6 | 7 | use tecnocen\roa\controllers\ApiVersionController; |
7 | 8 | use tecnocen\roa\urlRules\Composite as CompositeUrlRule; |
8 | 9 | use tecnocen\roa\urlRules\Resource as ResourceUrlRule; |
9 | 10 | use tecnocen\roa\urlRules\UrlRuleCreator; |
10 | -use Yii; |
|
11 | 11 | use yii\base\InvalidConfigException; |
12 | 12 | use yii\helpers\ArrayHelper; |
13 | 13 | use yii\helpers\Url; |
14 | 14 | use yii\web\JsonResponseFormatter; |
15 | 15 | use yii\web\Response; |
16 | -use yii\web\UrlManager; |
|
17 | 16 | use yii\web\XmlResponseFormatter; |
18 | 17 | |
19 | 18 | /** |
@@ -10,7 +10,7 @@ |
||
10 | 10 | * Generates and stores an auth token. |
11 | 11 | * |
12 | 12 | * @param Tester $I |
13 | - * @param Example $example must contain keys: |
|
13 | + * @param \Codeception\Example $example must contain keys: |
|
14 | 14 | * - client: string http client. |
15 | 15 | * - clientPass: string http password. |
16 | 16 | * - user: string system user. |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * Authenticates a user identified by 'authUser' index in the `$example`. |
34 | 34 | * |
35 | 35 | * @param Tester $I |
36 | - * @param Example $example data used for the testing. It uses the keys |
|
36 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
37 | 37 | * - tokenName: (optional) string name of the token used to authenticate. |
38 | 38 | */ |
39 | 39 | protected function authUser(Tester $I, Example $example) |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * Parses the Route for the test using `$urlManager` and `getRoutePattern()` |
48 | 48 | * |
49 | - * @param Example $example data used for the testing. It uses the keys |
|
49 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
50 | 50 | * - url: (optional) string if provided it will be used directly. |
51 | 51 | * - urlParams: (optional) string[] GET params to parse the url rule with |
52 | 52 | * `getRoutePattern()`. |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * Handles the internal logic when running a test on a collection resource. |
68 | 68 | * |
69 | 69 | * @param Tester $I |
70 | - * @param Example $example data used for the testing. It uses the keys |
|
70 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
71 | 71 | * - tokenName: (optional) string name of the token used to authenticate. |
72 | 72 | * - url: (optional) string if provided it will be used directly. |
73 | 73 | * - urlParams: (optional) string[] GET params to parse the url rule with |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * Handles the internal logic when running a test on a creating a record. |
95 | 95 | * |
96 | 96 | * @param Tester $I |
97 | - * @param Example $example data used for the testing. It uses the keys |
|
97 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
98 | 98 | * - tokenName: (optional) string name of the token used to authenticate. |
99 | 99 | * - url: (optional) string if provided it will be used directly. |
100 | 100 | * - urlParams: (optional) string[] GET params to parse the url rule with |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * Handles the internal logic when running a test on a record resource. |
126 | 126 | * |
127 | 127 | * @param Tester $I |
128 | - * @param Example $example data used for the testing. It uses the keys |
|
128 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
129 | 129 | * - tokenName: (optional) string name of the token used to authenticate. |
130 | 130 | * - url: string if provided it will be used directly. |
131 | 131 | * - urlParams: string[] GET params to parse the url rule with |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * Handles the internal logic when running a test on a updating a record. |
157 | 157 | * |
158 | 158 | * @param Tester $I |
159 | - * @param Example $example data used for the testing. It uses the keys |
|
159 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
160 | 160 | * - tokenName: (optional) string name of the token used to authenticate. |
161 | 161 | * - url: (optional) string if provided it will be used directly. |
162 | 162 | * - urlParams: (optional) string[] GET params to parse the url rule with |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * Handles the internal logic when running a test on a updating a record. |
190 | 190 | * |
191 | 191 | * @param Tester $I |
192 | - * @param Example $example data used for the testing. It uses the keys |
|
192 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
193 | 193 | * - tokenName: (optional) string name of the token used to authenticate. |
194 | 194 | * - url: (optional) string if provided it will be used directly. |
195 | 195 | * - urlParams: (optional) string[] GET params to parse the url rule with |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | * @param array $responses pairs of 'httpCode' => 'responseMethod' which |
220 | 220 | * will determine how to check the response. |
221 | 221 | * @param Tester $I |
222 | - * @param Example $example data used for the testing. It uses the keys |
|
222 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
223 | 223 | * - httpCode: integer expected Http Code response. If the httpCode is |
224 | 224 | * a key in `$responses` parameter then the method defined there will be |
225 | 225 | * used to analyze the response. Otherwise `checkErrorResponse()` will be |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | * Checks an expected success collection response. |
252 | 252 | * |
253 | 253 | * @param Tester $I |
254 | - * @param Example $example |
|
254 | + * @param \Codeception\Example $example |
|
255 | 255 | */ |
256 | 256 | protected function checkSuccessIndexResponse(Tester $I, Example $example) |
257 | 257 | { |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | * Checks an expected success record response. |
265 | 265 | * |
266 | 266 | * @param Tester $I |
267 | - * @param Example $example |
|
267 | + * @param \Codeception\Example $example |
|
268 | 268 | */ |
269 | 269 | protected function checkSuccessViewResponse(Tester $I, Example $example) |
270 | 270 | { |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * Checks an expected success record creation response. |
277 | 277 | * |
278 | 278 | * @param Tester $I |
279 | - * @param Example $example |
|
279 | + * @param \Codeception\Example $example |
|
280 | 280 | */ |
281 | 281 | protected function checkSuccessCreateResponse(Tester $I, Example $example) |
282 | 282 | { |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | * Checks an expected response containing validation errors. |
290 | 290 | * |
291 | 291 | * @param Tester $I |
292 | - * @param Example $example data used for the testing. It uses the keys |
|
292 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
293 | 293 | * - validationErrors: string[] (optional) pairs of field => message |
294 | 294 | * validation errors. |
295 | 295 | */ |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | * Checks an expected error response from user input. |
318 | 318 | * |
319 | 319 | * @param Tester $I |
320 | - * @param Example $example data used for the testing. It uses the keys |
|
320 | + * @param \Codeception\Example $example data used for the testing. It uses the keys |
|
321 | 321 | * - error: (optional) mixed expected json being contained in the response. |
322 | 322 | */ |
323 | 323 | protected function checkErrorResponse(Tester $I, Example $example) |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace tecnocen\roa\test; |
4 | 4 | |
5 | 5 | use Codeception\{Example, Util\HttpCode}; |
6 | -use tecnocen\roa\urlRules\Resource as ResourceUrlRule; |
|
7 | 6 | use yii\web\UrlManager; |
8 | 7 | |
9 | 8 | abstract class AbstractResourceCest |
@@ -19,7 +19,6 @@ |
||
19 | 19 | * |
20 | 20 | * @param string $tokenName unique name to index the tokens and models |
21 | 21 | * @param string $token oauth2 authorization token |
22 | - * @param UserIdentity $user |
|
23 | 22 | */ |
24 | 23 | public function storeToken($tokenName, $token) |
25 | 24 | { |