@@ -79,7 +79,7 @@ public function getLocaleAttribute(): string
7979 if (str_contains ($ locale , '_ ' )) {
8080 $ parts = explode ('_ ' , $ locale , 2 );
8181 if (count ($ parts ) === 2 ) {
82- $ locale = $ parts [0 ] . '_ ' . strtoupper ($ parts [1 ]);
82+ $ locale = $ parts [0 ]. '_ ' . strtoupper ($ parts [1 ]);
8383 }
8484 }
8585
@@ -93,7 +93,7 @@ public function getLanguageSetting(string $key): bool
9393 {
9494 $ settings = $ this ->language_settings ?? [];
9595
96- if (!isset ($ settings [$ key ])) {
96+ if (! isset ($ settings [$ key ])) {
9797 return config ("localization.language_selector. {$ key }" , true );
9898 }
9999
@@ -111,7 +111,7 @@ public function getDisplayNameAttribute(): string
111111
112112 $ baseName = $ useNativeNames ? $ this ->language ->native_name : $ this ->language ->common_name ;
113113
114- if (!$ showRegionalVariants ) {
114+ if (! $ showRegionalVariants ) {
115115 return $ baseName ;
116116 }
117117
@@ -121,8 +121,8 @@ public function getDisplayNameAttribute(): string
121121 $ countryCode = strtolower ($ parts [1 ] ?? '' );
122122
123123 $ country = StaticCountry::where ('alpha2 ' , $ countryCode )->first ();
124- if (!$ country ) {
125- return $ baseName . ' ( ' . strtoupper ($ countryCode ) . ') ' ;
124+ if (! $ country ) {
125+ return $ baseName. ' ( ' . strtoupper ($ countryCode ). ') ' ;
126126 }
127127
128128 $ countryName = $ country ->common_name ; // Default fallback
@@ -134,7 +134,7 @@ public function getDisplayNameAttribute(): string
134134 }
135135 }
136136
137- return $ baseName . ' ( ' . $ countryName . ') ' ;
137+ return $ baseName. ' ( ' . $ countryName. ') ' ;
138138 }
139139
140140 return $ baseName ;
@@ -147,7 +147,7 @@ public function getDisplayFlagAttribute(): string
147147 {
148148 $ showRegionalVariants = $ this ->getLanguageSetting ('show_regional_variants ' );
149149
150- if (!$ showRegionalVariants ) {
150+ if (! $ showRegionalVariants ) {
151151 return $ this ->language ->flag_icon ;
152152 }
153153
@@ -157,7 +157,7 @@ public function getDisplayFlagAttribute(): string
157157 $ countryCode = strtolower ($ parts [1 ] ?? '' );
158158
159159 if ($ countryCode && $ this ->flagExists ($ countryCode )) {
160- return 'flag- ' . $ countryCode ;
160+ return 'flag- ' . $ countryCode ;
161161 }
162162 }
163163
@@ -175,7 +175,7 @@ public function getTableFlagAttribute(): string
175175 $ countryCode = strtolower ($ parts [1 ] ?? '' );
176176
177177 if ($ countryCode && $ this ->flagExists ($ countryCode )) {
178- return 'flag- ' . $ countryCode ;
178+ return 'flag- ' . $ countryCode ;
179179 }
180180 }
181181
@@ -187,12 +187,12 @@ public function getTableFlagAttribute(): string
187187 */
188188 public function flagExists (string $ flagCode ): bool
189189 {
190- $ packagePath = base_path ('packages/flag-icons-circle/resources/svg/ ' . $ flagCode . '.svg ' );
190+ $ packagePath = base_path ('packages/flag-icons-circle/resources/svg/ ' . $ flagCode. '.svg ' );
191191 if (file_exists ($ packagePath )) {
192192 return true ;
193193 }
194194
195- $ publicPath = public_path ('vendor/flag-icons-circle/ ' . $ flagCode . '.svg ' );
195+ $ publicPath = public_path ('vendor/flag-icons-circle/ ' . $ flagCode. '.svg ' );
196196
197197 return file_exists ($ publicPath );
198198 }
@@ -245,7 +245,7 @@ private function getCountryFlag(): string
245245 $ countryCode = $ languageToCountry [$ this ->language ->alpha2 ] ?? $ this ->language ->alpha2 ;
246246
247247 if ($ this ->flagExists ($ countryCode )) {
248- return 'flag- ' . $ countryCode ;
248+ return 'flag- ' . $ countryCode ;
249249 }
250250
251251 return $ this ->language ->flag_icon ;
0 commit comments