diff --git a/src/Actions/SyncPhrasesAction.php b/src/Actions/SyncPhrasesAction.php index 9649e70..68c1b47 100644 --- a/src/Actions/SyncPhrasesAction.php +++ b/src/Actions/SyncPhrasesAction.php @@ -16,7 +16,7 @@ public static function execute(Translation $source, $key, $value, $locale, $file $language = Language::where('code', $locale)->first(); - if (!$language) { + if (! $language) { exit; } @@ -25,9 +25,9 @@ public static function execute(Translation $source, $key, $value, $locale, $file 'source' => config('translations.source_language') === $locale, ]); - $isRoot = $file === $locale . '.json' || $file === $locale . '.php'; + $isRoot = $file === $locale.'.json' || $file === $locale.'.php'; $extension = pathinfo($file, PATHINFO_EXTENSION); - $filePath = str_replace('.' . $extension, '', str_replace($locale . DIRECTORY_SEPARATOR, '', $file)); + $filePath = str_replace('.'.$extension, '', str_replace($locale.DIRECTORY_SEPARATOR, '', $file)); $translationFile = TranslationFile::firstOrCreate([ 'name' => $filePath, @@ -35,7 +35,7 @@ public static function execute(Translation $source, $key, $value, $locale, $file 'is_root' => $isRoot, ]); - $key = config('translations.include_file_in_key') && !$isRoot ? "{$translationFile->name}.{$key}" : $key; + $key = config('translations.include_file_in_key') && ! $isRoot ? "{$translationFile->name}.{$key}" : $key; $translation->phrases()->updateOrCreate([ 'key' => $key,