| Conditions | 6 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function beforeAction($action) |
||
| 12 | { |
||
| 13 | if ($this->enableCsrfValidation |
||
| 14 | && Yii::$app->getErrorHandler()->exception === null |
||
| 15 | && !Yii::$app->getRequest()->validateCsrfToken()) { |
||
| 16 | |||
| 17 | Yii::$app->session->setFlash('error', 'Your security token has expired. Please retry your submission.'); |
||
|
|
|||
| 18 | $this->redirect(Yii::$app->request->referrer ?: Yii::$app->homeUrl); |
||
| 19 | return false; |
||
| 20 | } |
||
| 21 | |||
| 22 | if(!parent::beforeAction($action)) { |
||
| 23 | return false; |
||
| 24 | } |
||
| 25 | |||
| 26 | return true; |
||
| 27 | } |
||
| 43 | } |
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.