Conditions | 5 |
Paths | 12 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function run(array $ids) |
||
18 | { |
||
19 | $errors = []; |
||
20 | foreach ($ids as $id) { |
||
21 | $this->controller->runAction('delete', ['id' => $id]); |
||
22 | if (Yii::$app->session->hasFlash('error')) { |
||
|
|||
23 | $errors[] = Yii::$app->session->getFlash('error', null, true); |
||
24 | } |
||
25 | } |
||
26 | if (!empty($errors)) { |
||
27 | Yii::$app->session->removeFlash('success'); |
||
28 | Yii::$app->session->setFlash('error', implode('<br>', $errors)); |
||
29 | } |
||
30 | if (Yii::$app->request->isAjax) { |
||
31 | return Yii::$app->response->redirect(Yii::$app->request->referrer, 302, false); |
||
32 | } |
||
33 | |||
34 | return $this->controller->redirect($this->controller->deleteBatchRedirect()); |
||
35 | } |
||
36 | } |
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.