Skip to content

Commit 88292ee

Browse files
committed
fix: styling
1 parent 7ee99f8 commit 88292ee

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/WebPushServiceProvider.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@ public function boot(): void
2727
{
2828
$this->app->when(WebPushChannel::class)
2929
->needs(WebPush::class)
30-
->give(function () {
31-
return (new WebPush(
32-
$this->webPushAuth(), [], 30, config('webpush.client_options', [])
33-
))
34-
->setReuseVAPIDHeaders(true)
35-
->setAutomaticPadding(config('webpush.automatic_padding'));
36-
});
30+
->give(fn (): \Minishlink\WebPush\WebPush => (new WebPush(
31+
$this->webPushAuth(), [], 30, config('webpush.client_options', [])
32+
))
33+
->setReuseVAPIDHeaders(true)
34+
->setAutomaticPadding(config('webpush.automatic_padding')));
3735

3836
$this->app->when(WebPushChannel::class)
3937
->needs(ReportHandlerInterface::class)
@@ -105,7 +103,7 @@ protected function getMigrationFileName(string $migrationFileName): string
105103

106104
return Collection::make([$this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR])
107105
->flatMap(fn ($path) => $filesystem->glob($path.'*_'.$migrationFileName))
108-
->push($this->app->databasePath()."/migrations/{$timestamp}_{$migrationFileName}")
106+
->push($this->app->databasePath().sprintf('/migrations/%s_%s', $timestamp, $migrationFileName))
109107
->first();
110108
}
111109
}

tests/WebPushServiceProviderTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public function it_does_not_generate_duplicate_migration_if_one_already_exists()
8989
$provider = new \NotificationChannels\WebPush\WebPushServiceProvider($this->app);
9090
$ref = new \ReflectionClass($provider);
9191
$method = $ref->getMethod('definePublishing');
92-
$method->setAccessible(true);
9392
$method->invoke($provider);
9493

9594
// Run vendor:publish which should reuse the existing filename rather than create a new one
@@ -129,7 +128,6 @@ public function it_reuses_existing_migration_filename_when_present(): void
129128

130129
$ref = new \ReflectionClass($provider);
131130
$method = $ref->getMethod('getMigrationFileName');
132-
$method->setAccessible(true);
133131

134132
$result = $method->invokeArgs($provider, ['create_push_subscriptions_table.php']);
135133

0 commit comments

Comments
 (0)