File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 88use distinctm \LaravelDataSync \Exceptions \NoRecordsInvalidJSONException ;
99use Illuminate \Support \Collection ;
1010use Illuminate \Support \Facades \File ;
11+ use Illuminate \Support \Str ;
1112use stdClass ;
1213
1314class Updater
@@ -134,7 +135,7 @@ protected function sortModels(\Illuminate\Support\Collection $files)
134135 $ filename = pathinfo ($ file , PATHINFO_FILENAME );
135136
136137 $ order = array_search (
137- studly_case ($ filename ),
138+ Str:: studly ($ filename ),
138139 config ('data-sync.order ' )
139140 );
140141
@@ -197,7 +198,7 @@ protected function getValues(stdClass $record)
197198 */
198199 protected function getModel (string $ name )
199200 {
200- return '\\App \\' .studly_case (pathinfo ($ name , PATHINFO_FILENAME ));
201+ return '\\App \\' .Str:: studly (pathinfo ($ name , PATHINFO_FILENAME ));
201202 }
202203
203204 /**
Original file line number Diff line number Diff line change 33namespace distinctm \LaravelDataSync \Tests \Fakes ;
44
55use distinctm \LaravelDataSync \Updater ;
6+ use Illuminate \Support \Str ;
67
78class UpdaterFake extends Updater
89{
910 protected function getModel (string $ name )
1011 {
11- return '\\distinctm \\LaravelDataSync \\Tests \\' .studly_case (
12- pathinfo ($ name , PATHINFO_FILENAME )
13- );
12+ return '\\distinctm \\LaravelDataSync \\Tests \\' .Str:: studly (
13+ pathinfo ($ name , PATHINFO_FILENAME )
14+ );
1415 }
1516}
You can’t perform that action at this time.
0 commit comments