Remove redundant code in save company request

This commit is contained in:
David Bomba 2022-10-02 17:27:04 +11:00
parent 32ee09ae1f
commit fa794e1edb

View File

@ -65,15 +65,15 @@ class StoreCompanyRequest extends Request
$input['google_analytics_key'] = $input['google_analytics_url']; $input['google_analytics_key'] = $input['google_analytics_url'];
} }
$company_settings = CompanySettings::defaults(); // $company_settings = CompanySettings::defaults();
//@todo this code doesn't make sense as we never return $company_settings anywhere //@todo this code doesn't make sense as we never return $company_settings anywhere
//@deprecated??? //@deprecated???
if (array_key_exists('settings', $input) && ! empty($input['settings'])) { // if (array_key_exists('settings', $input) && ! empty($input['settings'])) {
foreach ($input['settings'] as $key => $value) { // foreach ($input['settings'] as $key => $value) {
$company_settings->{$key} = $value; // $company_settings->{$key} = $value;
} // }
} // }
if (array_key_exists('portal_domain', $input)) { if (array_key_exists('portal_domain', $input)) {
$input['portal_domain'] = strtolower($input['portal_domain']); $input['portal_domain'] = strtolower($input['portal_domain']);