Client::class, 'industry_id' => NULL, 'size_id' => NULL, ]; } /** * Merges settings from Company to Client * * @param \stdClass $company_settings * @param \stdClass $client_settings * @return \stdClass of merged settings */ public static function buildClientSettings($company_settings, $client_settings) { foreach($client_settings as $key => $value) { if(!isset($client_settings->{$key}) && property_exists($company_settings, $key)) { $client_settings->{$key} = $company_settings->{$key}; } } return $client_settings; } }