Conditions | 4 |
Paths | 4 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | public function actionContact() |
||
43 | { |
||
44 | $model = new ContactForm(); |
||
45 | if (Yii::$app->user->isGuest) { |
||
46 | $model->scenario = $model::SCENARIO_GUEST; |
||
47 | } else { |
||
48 | $user = Yii::$app->user; |
||
49 | /** @var \modules\users\models\User $identity */ |
||
50 | $identity = $user->identity; |
||
51 | $model->name = $identity->username; |
||
52 | $model->email = $identity->email; |
||
53 | } |
||
54 | |||
55 | if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) { |
||
56 | Yii::$app->session->setFlash('contactFormSubmitted'); |
||
|
|||
57 | |||
58 | return $this->refresh(); |
||
59 | } |
||
60 | return $this->render('contact', [ |
||
61 | 'model' => $model, |
||
62 | ]); |
||
75 |
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.