Skip to content

Commit 325667f

Browse files
authored
Merge pull request #16 from vicgonvt/master
Great work 👍, Thank you Even though Travis CI tests are failing in the PR, they are passing in your fork.
2 parents aa9d290 + cdd675a commit 325667f

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<a href="https://packagist.org/packages/distinctm/laravel-data-sync" target="_blank"><img src="https://poser.pugx.org/distinctm/laravel-data-sync/d/total.svg" alt="Total Downloads"></a>
33
<a href="https://packagist.org/packages/distinctm/laravel-data-sync" target="_blank"><img src="https://poser.pugx.org/distinctm/laravel-data-sync/v/stable.svg" alt="Latest Stable Version"></a>
4-
<a href="https://travis-ci.com/distinctm/laravel-data-sync"><img src="https://www.travis-ci.com/distinctm/laravel-data-sync.svg?branch=master" alt="Travis CI Build Status: Master"></a>
4+
<a href="https://travis-ci.com/distinctm/laravel-data-sync"><img src="https://api.travis-ci.com/nullthoughts/laravel-data-sync.svg?branch=master" alt="Travis CI Build Status: Master"></a>
55
</p>
66

77
# Laravel Data Sync
@@ -36,8 +36,8 @@ If using Laravel Forge, you can have the data sync run automatically on deploy.
3636
```
3737
if [ -f artisan ]
3838
then
39-
php artisan data:sync
4039
php artisan migrate --force
40+
php artisan data:sync
4141
fi
4242
```
4343

src/Updater.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use distinctm\LaravelDataSync\Exceptions\NoRecordsInvalidJSONException;
99
use Illuminate\Support\Collection;
1010
use Illuminate\Support\Facades\File;
11+
use Illuminate\Support\Str;
1112
use stdClass;
1213

1314
class 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
/**

tests/fakes/UpdaterFake.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
namespace distinctm\LaravelDataSync\Tests\Fakes;
44

55
use distinctm\LaravelDataSync\Updater;
6+
use Illuminate\Support\Str;
67

78
class 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
}

0 commit comments

Comments
 (0)