It seems like $settingsModel can also be of type null; however, parameter $settings of enupal\socializer\servic...ettings::saveSettings() does only seem to accept enupal\socializer\models\Settings, 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
35
if (!Socializer::$app->settings->saveSettings(/** @scrutinizer ignore-type */ $settingsModel)) {
Loading history...
36
37
Craft::$app->getSession()->setError(Craft::t('enupal-socializer','Couldn’t save settings.'));