@@ -83,11 +83,11 @@ public function actionIndex()
8383 /**
8484 * Displays a single AuthItem model.
8585 *
86- * @param int $id
86+ * @param string $id
8787 *
8888 * @return mixed
8989 */
90- public function actionView (int $ id )
90+ public function actionView (string $ id )
9191 {
9292 $ model = $ this ->findModel ($ id );
9393
@@ -120,11 +120,11 @@ public function actionCreate()
120120 *
121121 * If update is successful, the browser will be redirected to the 'view' page.
122122 *
123- * @param int $id
123+ * @param string $id
124124 *
125125 * @return mixed
126126 */
127- public function actionUpdate (int $ id )
127+ public function actionUpdate (string $ id )
128128 {
129129 $ model = $ this ->findModel ($ id );
130130
@@ -142,11 +142,11 @@ public function actionUpdate(int $id)
142142 *
143143 * If deletion is successful, the browser will be redirected to the 'index' page.
144144 *
145- * @param int $id
145+ * @param string $id
146146 *
147147 * @return mixed
148148 */
149- public function actionDelete (int $ id )
149+ public function actionDelete (string $ id )
150150 {
151151 $ model = $ this ->findModel ($ id );
152152 Yii::$ app ->getAuthManager ()->remove ($ model ->item );
@@ -158,11 +158,11 @@ public function actionDelete(int $id)
158158 /**
159159 * Assign items
160160 *
161- * @param int $id
161+ * @param string $id
162162 *
163163 * @return array
164164 */
165- public function actionAssign (int $ id )
165+ public function actionAssign (string $ id )
166166 {
167167 $ items = Yii::$ app ->getRequest ()->post ('items ' , []);
168168 $ model = $ this ->findModel ($ id );
@@ -174,11 +174,11 @@ public function actionAssign(int $id)
174174 /**
175175 * Remove items
176176 *
177- * @param int $id
177+ * @param string $id
178178 *
179179 * @return array
180180 */
181- public function actionRemove (int $ id ): array
181+ public function actionRemove (string $ id ): array
182182 {
183183 $ items = Yii::$ app ->getRequest ()->post ('items ' , []);
184184 $ model = $ this ->findModel ($ id );
@@ -216,13 +216,13 @@ public function getLabels(): array
216216 *
217217 * If the model is not found, a 404 HTTP exception will be thrown.
218218 *
219- * @param int $id
219+ * @param string $id
220220 *
221221 * @return AuthItemModel the loaded model
222222 *
223223 * @throws NotFoundHttpException if the model cannot be found
224224 */
225- protected function findModel (int $ id ): AuthItemModel
225+ protected function findModel (string $ id ): AuthItemModel
226226 {
227227 $ auth = Yii::$ app ->getAuthManager ();
228228 $ item = $ this ->type === Item::TYPE_ROLE ? $ auth ->getRole ($ id ) : $ auth ->getPermission ($ id );
0 commit comments