diff --git a/src/Drivers/File.php b/src/Drivers/File.php index bab9f92..9619f4c 100644 --- a/src/Drivers/File.php +++ b/src/Drivers/File.php @@ -161,10 +161,10 @@ public function getGroupTranslationsFor(string $language): Collection if (Str::contains($group->getPathname(), 'vendor')) { $vendor = Str::before(Str::after($group->getPathname(), 'vendor' . DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR); - return ["{$vendor}::{$group->getBasename('.php')}" => new Collection(Arr::dot($this->disk->getRequire($group->getPathname())))]; + return ["{$vendor}::{$group->getBasename('.php')}" => new Collection($this->disk->getRequire($group->getPathname()))]; } - return [$group->getBasename('.php') => new Collection(Arr::dot($this->disk->getRequire($group->getPathname())))]; + return [$group->getBasename('.php') => new Collection($this->disk->getRequire($group->getPathname()))]; }); } @@ -228,13 +228,13 @@ public function saveGroupTranslations(string $language, string $group, Collectio return; } - $this->disk->put("{$this->languageFilesPath}" . DIRECTORY_SEPARATOR . "{$language}" . DIRECTORY_SEPARATOR . "{$group}.php", "disk->put("{$this->languageFilesPath}" . DIRECTORY_SEPARATOR . "{$language}" . DIRECTORY_SEPARATOR . "{$group}.php", "toArray(), true) . ';' . \PHP_EOL); } /** * Save namespaced group type language translations. */ - private function saveNamespacedGroupTranslations(string $language, string $group, string $translations): void + private function saveNamespacedGroupTranslations(string $language, string $group, Collection $translations): void { [$namespace, $group] = explode('::', $group); $directory = "{$this->languageFilesPath}" . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . "{$namespace}" . DIRECTORY_SEPARATOR . "{$language}"; @@ -243,7 +243,7 @@ private function saveNamespacedGroupTranslations(string $language, string $group $this->disk->makeDirectory($directory, 0755, true); } - $this->disk->put("$directory" . DIRECTORY_SEPARATOR . "{$group}.php", "disk->put("$directory" . DIRECTORY_SEPARATOR . "{$group}.php", "toArray(), true) . ';' . \PHP_EOL); } /**