@@ -174,7 +174,7 @@ public function getSingleTranslationsFor($language)
174174 return strpos ($ file , "{$ language }.json " );
175175 })->flatMap (function ($ file ) {
176176 if (strpos ($ file ->getPathname (), 'vendor ' )) {
177- $ vendor = str_before (Str::after ($ file ->getPathname (), 'vendor ' .DIRECTORY_SEPARATOR ), DIRECTORY_SEPARATOR );
177+ $ vendor = Str:: before (Str::after ($ file ->getPathname (), 'vendor ' .DIRECTORY_SEPARATOR ), DIRECTORY_SEPARATOR );
178178
179179 return ["{$ vendor }::single " => new Collection (json_decode ($ this ->disk ->get ($ file ), true ))];
180180 }
@@ -195,7 +195,7 @@ public function getGroupTranslationsFor($language)
195195 // here we check if the path contains 'vendor' as these will be the
196196 // files which need namespacing
197197 if (Str::contains ($ group ->getPathname (), 'vendor ' )) {
198- $ vendor = str_before (Str::after ($ group ->getPathname (), 'vendor ' .DIRECTORY_SEPARATOR ), DIRECTORY_SEPARATOR );
198+ $ vendor = Str:: before (Str::after ($ group ->getPathname (), 'vendor ' .DIRECTORY_SEPARATOR ), DIRECTORY_SEPARATOR );
199199
200200 return ["{$ vendor }:: {$ group ->getBasename ('.php ' )}" => new Collection (Arr::dot ($ this ->disk ->getRequire ($ group ->getPathname ())))];
201201 }
@@ -213,7 +213,7 @@ public function getGroupTranslationsFor($language)
213213 */
214214 public function getTranslationsForFile ($ language , $ file )
215215 {
216- $ file = str_finish ($ file , '.php ' );
216+ $ file = Str:: finish ($ file , '.php ' );
217217 $ filePath = "{$ this ->languageFilesPath }" .DIRECTORY_SEPARATOR ."{$ language }" .DIRECTORY_SEPARATOR ."{$ file }" ;
218218 $ translations = [];
219219
@@ -298,7 +298,7 @@ private function saveNamespacedGroupTranslations($language, $group, $translation
298298 private function saveSingleTranslations ($ language , $ translations )
299299 {
300300 foreach ($ translations as $ group => $ translation ) {
301- $ vendor = str_before ($ group , '::single ' );
301+ $ vendor = Str:: before ($ group , '::single ' );
302302 $ languageFilePath = $ vendor !== 'single ' ? 'vendor ' .DIRECTORY_SEPARATOR ."{$ vendor }" .DIRECTORY_SEPARATOR ."{$ language }.json " : "{$ language }.json " ;
303303 $ this ->disk ->put (
304304 "{$ this ->languageFilesPath }" .DIRECTORY_SEPARATOR ."{$ languageFilePath }" ,
@@ -333,7 +333,7 @@ public function getGroupsFor($language)
333333 {
334334 return $ this ->getGroupFilesFor ($ language )->map (function ($ file ) {
335335 if (Str::contains ($ file ->getPathname (), 'vendor ' )) {
336- $ vendor = str_before (Str::after ($ file ->getPathname (), 'vendor ' .DIRECTORY_SEPARATOR ), DIRECTORY_SEPARATOR );
336+ $ vendor = Str:: before (Str::after ($ file ->getPathname (), 'vendor ' .DIRECTORY_SEPARATOR ), DIRECTORY_SEPARATOR );
337337
338338 return "{$ vendor }:: {$ file ->getBasename ('.php ' )}" ;
339339 }
0 commit comments