@@ -143,10 +143,10 @@ private function addTranslationsToData(array &$data, string $locale, string $gro
143
143
144
144
//transform to data structure necessary for frontend
145
145
foreach ($ translations as $ key => $ translation ) {
146
- $ dataKey = $ group . '. ' . $ key ;
147
- if (!array_key_exists ($ dataKey , $ data )) {
146
+ $ dataKey = $ group. '. ' . $ key ;
147
+ if (! array_key_exists ($ dataKey , $ data )) {
148
148
$ data [$ dataKey ] = [
149
- 'title ' => $ group . ' - ' . $ key ,
149
+ 'title ' => $ group. ' - ' . $ key ,
150
150
'type ' => 'group ' ,
151
151
'group ' => $ group ,
152
152
'translation_key ' => $ key ,
@@ -227,7 +227,7 @@ public function filterTranslations(): void
227
227
});
228
228
}
229
229
230
- if (!empty ($ this ->selectedGroups )) {
230
+ if (! empty ($ this ->selectedGroups )) {
231
231
$ filteredTranslations = $ filteredTranslations ->filter (function ($ translationItem , $ key ) {
232
232
return in_array ($ translationItem ['group ' ], $ this ->selectedGroups , true );
233
233
});
@@ -260,7 +260,7 @@ private function paginateTranslations(Collection $translations): Collection
260
260
261
261
private function getChainedTranslationManager (): ChainedTranslationManager
262
262
{
263
- if (!isset ($ this ->chainedTranslationManager )) {
263
+ if (! isset ($ this ->chainedTranslationManager )) {
264
264
$ this ->chainedTranslationManager = app (ChainedTranslationManager::class);
265
265
}
266
266
@@ -304,14 +304,14 @@ private function countMissingTranslations($translations): int
304
304
return $ count ;
305
305
}
306
306
307
- public function translationsSaved (string $ group , string $ translationKey , array $ newTranslation , array $ initialTranslations = null ): void
307
+ public function translationsSaved (string $ group , string $ translationKey , array $ newTranslation , ? array $ initialTranslations = null ): void
308
308
{
309
309
$ oldMissing = $ this ->checkIfTranslationMissing ($ initialTranslations , $ this ->getFilteredLocales ());
310
310
$ newMissing = $ this ->checkIfTranslationMissing ($ newTranslation , $ this ->getFilteredLocales ());
311
311
312
- if ($ oldMissing && !$ newMissing ) {
312
+ if ($ oldMissing && ! $ newMissing ) {
313
313
$ this ->totalMissingFilteredTranslations --;
314
- } elseif (!$ oldMissing && $ newMissing ) {
314
+ } elseif (! $ oldMissing && $ newMissing ) {
315
315
$ this ->totalMissingFilteredTranslations ++;
316
316
}
317
317
}
@@ -337,7 +337,7 @@ private function checkIfTranslationMissing(array $translations, array $filteredL
337
337
338
338
private function getFilteredLocales (): array
339
339
{
340
- return !empty ($ this ->selectedLocales ) ? $ this ->selectedLocales : $ this ->locales ;
340
+ return ! empty ($ this ->selectedLocales ) ? $ this ->selectedLocales : $ this ->locales ;
341
341
}
342
342
343
343
public static function getNavigationSort (): ?int
0 commit comments