Phpstan fix (#465)

phpstan level 2: services and i18n
This commit is contained in:
Tõnis Ormisson
2022-08-11 11:27:04 +03:00
committed by GitHub
parent 339b9f1bbc
commit 368563dcc0
11 changed files with 13 additions and 48 deletions

View File

@ -20,6 +20,7 @@ use Da\User\Traits\ModuleAwareTrait;
use Exception;
use Yii;
use yii\base\InvalidCallException;
use yii\web\Application;
class UserCreateService implements ServiceInterface
{
@ -76,7 +77,7 @@ class UserCreateService implements ServiceInterface
['email' => $model->email]
);
// from web display a flash message (if enabled)
if ($this->getModule()->enableFlashMessages === true && is_a(Yii::$app, yii\web\Application::class)) {
if ($this->getModule()->enableFlashMessages === true && is_a(Yii::$app, Application::class)) {
Yii::$app->session->setFlash(
'warning',
$error_msg