Simplify code

This makes xdebug happy
Refs #2502
This commit is contained in:
Samuel Georges 2016-11-23 08:11:24 +11:00
parent 07ef1bdf2b
commit 6bbf496ab2
1 changed files with 4 additions and 2 deletions

View File

@ -132,7 +132,7 @@ class Preference extends Model
*/
public function getLocaleOptions()
{
$locales = Config::get('app.localeOptions', [
$localeOptions = [
'cs' => [Lang::get('system::lang.locale.cs'), 'flag-cz'],
'da' => [Lang::get('system::lang.locale.da'), 'flag-dk'],
'en' => [Lang::get('system::lang.locale.en'), 'flag-us'],
@ -162,7 +162,9 @@ class Preference extends Model
'zh-tw' => [Lang::get('system::lang.locale.zh-tw'), 'flag-tw'],
'nb-no' => [Lang::get('system::lang.locale.nb-no'), 'flag-no'],
'el' => [Lang::get('system::lang.locale.el'), 'flag-gr'],
]);
];
$locales = Config::get('app.localeOptions', $localeOptions);
// Sort locales alphabetically
asort($locales);