File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function handle()
6161
6262 $ this ->listFilesContainingOldKey ();
6363
64- $ this ->info (" Done! " );
64+ $ this ->info (' The key at ' . $ this -> argument ( ' oldKey ' ). ' was renamed to ' . $ this -> argument ( ' newKey ' ). ' successfully! ' );
6565 }
6666
6767 /**
@@ -79,10 +79,16 @@ private function renameKey()
7979 return ;
8080 }
8181
82- $ files = $ this ->manager ->files ()[$ file ];
82+ if (Str::contains ($ this ->argument ('newKey ' ), '. ' )) {
83+ $ this ->error ('Please provide the new key must not contain a dot. ' );
84+
85+ return ;
86+ }
8387
8488 $ newKey = preg_replace ('/(\w+)$/i ' , $ this ->argument ('newKey ' ), $ key );
8589
90+ $ files = $ this ->manager ->files ()[$ file ];
91+
8692 $ currentValues = [];
8793
8894 foreach ($ files as $ languageKey => $ filePath ) {
You can’t perform that action at this time.
0 commit comments