Skip to content

Commit b51b05a

Browse files
committed
Fix file tests
1 parent be446fe commit b51b05a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Drivers/File.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ public function getGroupTranslationsFor(string $language): Collection
161161
if (Str::contains($group->getPathname(), 'vendor')) {
162162
$vendor = Str::before(Str::after($group->getPathname(), 'vendor' . DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
163163

164-
return ["{$vendor}::{$group->getBasename('.php')}" => new Collection(Arr::dot($this->disk->getRequire($group->getPathname())))];
164+
return ["{$vendor}::{$group->getBasename('.php')}" => new Collection($this->disk->getRequire($group->getPathname()))];
165165
}
166166

167-
return [$group->getBasename('.php') => new Collection(Arr::dot($this->disk->getRequire($group->getPathname())))];
167+
return [$group->getBasename('.php') => new Collection($this->disk->getRequire($group->getPathname()))];
168168
});
169169
}
170170

@@ -228,13 +228,13 @@ public function saveGroupTranslations(string $language, string $group, Collectio
228228

229229
return;
230230
}
231-
$this->disk->put("{$this->languageFilesPath}" . DIRECTORY_SEPARATOR . "{$language}" . DIRECTORY_SEPARATOR . "{$group}.php", "<?php\n\nreturn " . var_export($translations, true) . ';' . \PHP_EOL);
231+
$this->disk->put("{$this->languageFilesPath}" . DIRECTORY_SEPARATOR . "{$language}" . DIRECTORY_SEPARATOR . "{$group}.php", "<?php\n\nreturn " . var_export($translations->toArray(), true) . ';' . \PHP_EOL);
232232
}
233233

234234
/**
235235
* Save namespaced group type language translations.
236236
*/
237-
private function saveNamespacedGroupTranslations(string $language, string $group, string $translations): void
237+
private function saveNamespacedGroupTranslations(string $language, string $group, Collection $translations): void
238238
{
239239
[$namespace, $group] = explode('::', $group);
240240
$directory = "{$this->languageFilesPath}" . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . "{$namespace}" . DIRECTORY_SEPARATOR . "{$language}";
@@ -243,7 +243,7 @@ private function saveNamespacedGroupTranslations(string $language, string $group
243243
$this->disk->makeDirectory($directory, 0755, true);
244244
}
245245

246-
$this->disk->put("$directory" . DIRECTORY_SEPARATOR . "{$group}.php", "<?php\n\nreturn " . var_export($translations, true) . ';' . \PHP_EOL);
246+
$this->disk->put("$directory" . DIRECTORY_SEPARATOR . "{$group}.php", "<?php\n\nreturn " . var_export($translations->toArray(), true) . ';' . \PHP_EOL);
247247
}
248248

249249
/**

0 commit comments

Comments
 (0)