Skip to content

Commit 9ded1fb

Browse files
committed
move actions to seperate namespace
1 parent cb5aab2 commit 9ded1fb

File tree

12 files changed

+14
-15
lines changed

12 files changed

+14
-15
lines changed

config/mobile-pass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* by creating your own action class that extend the one that ships with the package.
77
*/
88
'actions' => [
9-
'notify_apple_of_pass_update' => Spatie\LaravelMobilePass\Actions\NotifyAppleOfPassUpdateAction::class,
10-
'register_device' => Spatie\LaravelMobilePass\Actions\RegisterDeviceAction::class,
11-
'unregister_device' => Spatie\LaravelMobilePass\Actions\UnregisterDeviceAction::class,
9+
'notify_apple_of_pass_update' => \Spatie\LaravelMobilePass\Actions\Apple\NotifyAppleOfPassUpdateAction::class,
10+
'register_device' => \Spatie\LaravelMobilePass\Actions\Apple\RegisterDeviceAction::class,
11+
'unregister_device' => \Spatie\LaravelMobilePass\Actions\Apple\UnregisterDeviceAction::class,
1212
],
1313

1414
/*

docs/advanced-usage/customizing-actions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Let's assume that you want to execute some code before the package sends a notif
1010
```php
1111
namespace App\Actions;
1212

13-
use Spatie\LaravelMobilePass\Actions\NotifyAppleOfPassUpdateAction;
14-
use Spatie\LaravelMobilePass\Models\MobilePass;
13+
use Spatie\LaravelMobilePass\Actions\Apple\NotifyAppleOfPassUpdateAction;use Spatie\LaravelMobilePass\Models\MobilePass;
1514

1615
class CustomNotifyAppleOfPassUpdateAction extends NotifyAppleOfPassUpdateAction
1716
{

src/Actions/NotifyAppleOfPassUpdateAction.php renamed to src/Actions/Apple/NotifyAppleOfPassUpdateAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Spatie\LaravelMobilePass\Actions;
3+
namespace Spatie\LaravelMobilePass\Actions\Apple;
44

55
use Illuminate\Support\Facades\Http;
66
use Spatie\LaravelMobilePass\Models\MobilePass;

src/Actions/RegisterDeviceAction.php renamed to src/Actions/Apple/RegisterDeviceAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Spatie\LaravelMobilePass\Actions;
3+
namespace Spatie\LaravelMobilePass\Actions\Apple;
44

55
use Spatie\LaravelMobilePass\Models\MobilePass;
66
use Spatie\LaravelMobilePass\Models\MobilePassDevice;

src/Actions/UnregisterDeviceAction.php renamed to src/Actions/Apple/UnregisterDeviceAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Spatie\LaravelMobilePass\Actions;
3+
namespace Spatie\LaravelMobilePass\Actions\Apple;
44

55
use Spatie\LaravelMobilePass\Models\MobilePassRegistration;
66
use Spatie\LaravelMobilePass\Support\Config;

src/Http/Controllers/RegisterDeviceController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Http\Request;
66
use Illuminate\Routing\Controller;
7-
use Spatie\LaravelMobilePass\Actions\RegisterDeviceAction;
7+
use Spatie\LaravelMobilePass\Actions\Apple\RegisterDeviceAction;
88
use Spatie\LaravelMobilePass\Support\Config;
99

1010
/**

src/Http/Controllers/UnregisterDeviceController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Http\Request;
66
use Illuminate\Routing\Controller;
7-
use Spatie\LaravelMobilePass\Actions\UnregisterDeviceAction;
7+
use Spatie\LaravelMobilePass\Actions\Apple\UnregisterDeviceAction;
88
use Spatie\LaravelMobilePass\Support\Config;
99

1010
/**

src/Models/MobilePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
1313
use Illuminate\Mail\Attachment;
1414
use Illuminate\Support\Str;
15-
use Spatie\LaravelMobilePass\Actions\NotifyAppleOfPassUpdateAction;
15+
use Spatie\LaravelMobilePass\Actions\Apple\NotifyAppleOfPassUpdateAction;
1616
use Spatie\LaravelMobilePass\Builders\Apple\AirlinePassBuilder;
1717
use Spatie\LaravelMobilePass\Builders\Apple\PassBuilder;
1818
use Spatie\LaravelMobilePass\Enums\Platform;

tests/Actions/NotifyAppleOfPassUpdateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use Illuminate\Http\Client\Request;
44
use Illuminate\Support\Facades\Http;
5-
use Spatie\LaravelMobilePass\Actions\NotifyAppleOfPassUpdateAction;
5+
use Spatie\LaravelMobilePass\Actions\Apple\NotifyAppleOfPassUpdateAction;
66
use Spatie\LaravelMobilePass\Models\MobilePass;
77

88
beforeEach(function () {

tests/Http/Controllers/CheckForUpdatesControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Spatie\LaravelMobilePass\Tests\Http;
44

5-
use Spatie\LaravelMobilePass\Actions\NotifyAppleOfPassUpdateAction;
5+
use Spatie\LaravelMobilePass\Actions\Apple\NotifyAppleOfPassUpdateAction;
66
use Spatie\LaravelMobilePass\Models\MobilePass;
77

88
it('returns the generated pass when no If-Modified-Since header is passed', function () {

0 commit comments

Comments
 (0)