Skip to content

Commit ba9dd51

Browse files
authored
Merge pull request #14 from Alymosul/analysis-zeGK6A
Apply fixes from StyleCI
2 parents 5b32ef7 + 0a3bc4a commit ba9dd51

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

src/ExpoPushNotificationsServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getInterestsDriver()
6969
protected function setupConfig()
7070
{
7171
$this->publishes([
72-
__DIR__ . '/../config/exponent-push-notifications.php' => config_path('exponent-push-notifications.php'),
72+
__DIR__.'/../config/exponent-push-notifications.php' => config_path('exponent-push-notifications.php'),
7373
], 'config');
7474

7575
$this->mergeConfigFrom(__DIR__.'/../config/exponent-push-notifications.php', 'exponent-push-notifications');
@@ -84,10 +84,10 @@ protected function setupConfig()
8484
*/
8585
private function shouldPublishMigrations(ExpoRepository $repository)
8686
{
87-
if ($repository instanceof ExpoDatabaseDriver && !class_exists('CreateExponentPushNotificationInterestsTable')) {
87+
if ($repository instanceof ExpoDatabaseDriver && ! class_exists('CreateExponentPushNotificationInterestsTable')) {
8888
$timestamp = date('Y_m_d_His', time());
8989
$this->publishes([
90-
__DIR__ . '/../migrations/create_exponent_push_notification_interests_table.php.stub' => database_path("/migrations/{$timestamp}_create_exponent_push_notification_interests_table.php"),
90+
__DIR__.'/../migrations/create_exponent_push_notification_interests_table.php.stub' => database_path("/migrations/{$timestamp}_create_exponent_push_notification_interests_table.php"),
9191
], 'migrations');
9292
}
9393
}

tests/ExpoControllerTest.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
namespace NotificationChannels\ExpoPushNotifications\Test;
44

55
use ExponentPhpSDK\Expo;
6-
use ExponentPhpSDK\ExpoRepository;
7-
use Illuminate\Contracts\Validation\Factory;
86
use Illuminate\Http\Request;
9-
use Illuminate\Support\Facades\Validator;
107
use ExponentPhpSDK\ExpoRegistrar;
118
use Illuminate\Events\Dispatcher;
9+
use ExponentPhpSDK\ExpoRepository;
1210
use Illuminate\Support\Facades\Auth;
11+
use Illuminate\Support\Facades\Validator;
12+
use Illuminate\Contracts\Validation\Factory;
1313
use ExponentPhpSDK\Repositories\ExpoFileDriver;
1414
use NotificationChannels\ExpoPushNotifications\ExpoChannel;
15-
use NotificationChannels\ExpoPushNotifications\Http\ExpoController;
1615
use NotificationChannels\ExpoPushNotifications\Models\Interest;
16+
use NotificationChannels\ExpoPushNotifications\Http\ExpoController;
1717
use NotificationChannels\ExpoPushNotifications\Repositories\ExpoDatabaseDriver;
1818

1919
class ExpoControllerTest extends TestCase
@@ -34,6 +34,7 @@ protected function setupExpo(ExpoRepository $expoRepository)
3434
{
3535
$expoChannel = new ExpoChannel(new Expo(new ExpoRegistrar($expoRepository)), new Dispatcher);
3636
$expoController = new ExpoController($expoChannel);
37+
3738
return [$expoController, $expoChannel];
3839
}
3940

@@ -55,15 +56,15 @@ public function tearDown()
5556
}
5657

5758
/**
58-
* Data provider to help test the expo controller with the different repositories
59+
* Data provider to help test the expo controller with the different repositories.
5960
*
6061
* @return array
6162
*/
6263
public function availableRepositories()
6364
{
6465
return [
6566
[new ExpoDatabaseDriver],
66-
[new ExpoFileDriver]
67+
[new ExpoFileDriver],
6768
];
6869
}
6970

@@ -96,7 +97,7 @@ public function aDeviceCanSubscribeToTheSystem($expoRepository)
9697
if ($expoRepository instanceof ExpoDatabaseDriver) {
9798
$this->assertDatabaseHas(config('exponent-push-notifications.interests.database.table_name'), [
9899
'key' => 'NotificationChannels.ExpoPushNotifications.Test.User.'.(new User)->getKey(),
99-
'value' => $data['expo_token']
100+
'value' => $data['expo_token'],
100101
]);
101102
}
102103
}
@@ -180,7 +181,7 @@ public function aDeviceCanUnsubscribeSingleTokenFromTheSystem($expoRepository)
180181
if ($expoRepository instanceof ExpoDatabaseDriver) {
181182
$this->assertDatabaseMissing(config('exponent-push-notifications.interests.database.table_name'), [
182183
'key' => 'NotificationChannels.ExpoPushNotifications.Test.User.'.(new User)->getKey(),
183-
'value' => $data['expo_token']
184+
'value' => $data['expo_token'],
184185
]);
185186
}
186187
}
@@ -232,6 +233,7 @@ public function unsubscribeReturnsErrorResponseIfExceptionIsThrown()
232233

233234
$this->assertEquals('failed', $response->status);
234235
}
236+
235237
/**
236238
* Mocks a request for the ExpoController.
237239
*

0 commit comments

Comments
 (0)