phpstan: missing declared return

This commit is contained in:
tonis ormisson
2022-08-10 16:58:13 +03:00
parent 3e33813fd5
commit fa17922914
3 changed files with 6 additions and 4 deletions

View File

@ -32,9 +32,12 @@ class AjaxRequestModelValidator implements ValidatorInterface
if ($request->getIsAjax() && $this->model->load($request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
Yii::$app->response->data = ActiveForm::validate($this->model);
$result = ActiveForm::validate($this->model);
Yii::$app->response->data = $result;
Yii::$app->response->send();
Yii::$app->end();
return $result;
}
return false;
}
}