Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function run($id) |
||
22 | { |
||
23 | $model = $this->controller->findModel($id, $this->controller->updateClass); |
||
24 | if ($model->load(Yii::$app->request->post())) { |
||
25 | if ($model->save()) { |
||
26 | Yii::$app->session->setFlash('success', $this->getMessageOnUpdate($model)); |
||
|
|||
27 | $url = $this->controller->updateRedirect($model); |
||
28 | if (Yii::$app->request->isPjax) { |
||
29 | return Yii::$app->response->redirect($url, 302, false); |
||
30 | } |
||
31 | return $this->controller->redirect($url); |
||
32 | } |
||
33 | Yii::$app->session->setFlash('error', Html::errorSummary($model)); |
||
34 | } |
||
35 | return $this->controller->render($this->view, ['model' => $model]); |
||
36 | } |
||
37 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.