@@ -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) |
@@ -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 roaresearch\yii2\roa\test; |
| 4 | 4 | |
| 5 | 5 | use Codeception\{Example, Util\HttpCode}; |
| 6 | -use roaresearch\yii2\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 | { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | /** |
| 88 | 88 | * Ensures the parent record is attached to the behavior. |
| 89 | 89 | * |
| 90 | - * @param BaseActiveRecord $owner |
|
| 90 | + * @param \yii\db\BaseActiveRecord $owner |
|
| 91 | 91 | * @param bool $force whether to force finding the slug parent record |
| 92 | 92 | * when `$parentSlugRelation` is defined |
| 93 | 93 | */ |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | /** |
| 106 | 106 | * This populates the slug to the parentSlug |
| 107 | - * @param BaseActiveRecord $owner |
|
| 107 | + * @param \yii\db\BaseActiveRecord $owner |
|
| 108 | 108 | */ |
| 109 | 109 | private function populateSlugParent(BaseActiveRecord $owner) |
| 110 | 110 | { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | /** |
| 168 | 168 | * Creates a data provider for the request. |
| 169 | 169 | * |
| 170 | - * @return ActiveDataProvider |
|
| 170 | + * @return \yii\data\ActiveDataProvider |
|
| 171 | 171 | */ |
| 172 | 172 | public function indexProvider(): ActiveDataProvider |
| 173 | 173 | { |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | /** |
| 178 | 178 | * Finds the record based on the provided id or throws an exception. |
| 179 | 179 | * @param int $id the unique identifier for the record. |
| 180 | - * @return ActiveRecordInterface |
|
| 180 | + * @return \yii\db\ActiveRecordInterface |
|
| 181 | 181 | * @throws NotFoundHttpException if the record can't be found. |
| 182 | 182 | */ |
| 183 | 183 | public function findModel($id): ActiveRecordInterface |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * Creates the query to be used by the `findOne()` method. |
| 196 | 196 | * |
| 197 | 197 | * @param int $id the unique identifier |
| 198 | - * @return ActiveQuery |
|
| 198 | + * @return \yii\db\ActiveQuery |
|
| 199 | 199 | */ |
| 200 | 200 | public function findQuery($id): ActiveQuery |
| 201 | 201 | { |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | * Creates the query to be used by the `index` action when `$searchClass` is |
| 207 | 207 | * not set. |
| 208 | 208 | * |
| 209 | - * @return ActiveQuery |
|
| 209 | + * @return \yii\db\ActiveQuery |
|
| 210 | 210 | */ |
| 211 | 211 | public function indexQuery(): ActiveQuery |
| 212 | 212 | { |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
| 217 | - * @return ActiveQuery |
|
| 217 | + * @return \yii\db\ActiveQuery |
|
| 218 | 218 | */ |
| 219 | 219 | protected function baseQuery(): ActiveQuery |
| 220 | 220 | { |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace roaresearch\yii2\roa\modules; |
| 4 | 4 | |
| 5 | -use roaresearch\yii2\oauth2server\filters\auth\CompositeAuth; |
|
| 6 | 5 | use roaresearch\yii2\oauth2server\Module as OAuth2Module; |
| 6 | +use roaresearch\yii2\oauth2server\filters\auth\CompositeAuth; |
|
| 7 | 7 | use roaresearch\yii2\roa\{ |
| 8 | 8 | controllers\ApiContainerController, |
| 9 | 9 | urlRules\Composite as CompositeUrlRule, |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | - * @param UrlManager $manager the URL manager |
|
| 120 | + * @param \yii\web\UrlManager $manager the URL manager |
|
| 121 | 121 | * @return bool |
| 122 | 122 | */ |
| 123 | 123 | protected function hasNormalizer($manager): bool |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
| 129 | - * @param UrlManager $manager the URL manager |
|
| 129 | + * @param \yii\web\UrlManager $manager the URL manager |
|
| 130 | 130 | * @return ?UrlNormalizer |
| 131 | 131 | */ |
| 132 | 132 | protected function getNormalizer(UrlManager $manager): ?UrlNormalizer |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | - * @return NotFoundHttpException |
|
| 144 | + * @return \yii\web\NotFoundHttpException |
|
| 145 | 145 | */ |
| 146 | 146 | protected function createNotFoundException(): NotFoundHttpException |
| 147 | 147 | { |