It seems like $user can also be of type null; however, parameter $user of Apps\Model\Admin\User\Fo...erUpdate::__construct() does only seem to accept Ffcms\Core\Interfaces\iUser, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
32
$model = new FormUserUpdate(/** @scrutinizer ignore-type */ $user);
Loading history...
33
34
// check is form is sended
35
if ($model->send()) {
36
if ($model->validate()) { // check validation
37
$model->save();
38
App::$Session->getFlashBag()->add('success', __('Data was successful updated'));
39
} else {
40
App::$Session->getFlashBag()->add('error', __('Form validation is failed'));