Skip to content

Commit 7ee99f8

Browse files
committed
fix: styling
1 parent 76832bb commit 7ee99f8

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: laravel

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
"minishlink/web-push": "^9.0"
2424
},
2525
"require-dev": {
26-
"laravel/pint": "^1.21",
26+
"larastan/larastan": "^3.1",
27+
"laravel/pint": "^1.25",
2728
"mockery/mockery": "^1.0",
2829
"orchestra/testbench": "^9.2|^10.0",
29-
"larastan/larastan": "^3.1",
3030
"phpunit/phpunit": "^10.5|^11.5.3",
3131
"rector/rector": "^2.0"
3232
},
@@ -55,4 +55,4 @@
5555
"scripts": {
5656
"test": "vendor/bin/phpunit"
5757
}
58-
}
58+
}

src/WebPushServiceProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,12 @@ protected function definePublishing()
8989
__DIR__.'/../config/webpush.php' => config_path('webpush.php'),
9090
], 'config');
9191

92-
9392
$this->publishes([
9493
__DIR__.'/../migrations/create_push_subscriptions_table.php.stub' => $this->getMigrationFileName('create_push_subscriptions_table.php'),
9594
], 'migrations');
9695
}
9796

98-
/**
97+
/**
9998
* Returns existing migration file if found, else uses the current timestamp.
10099
*/
101100
protected function getMigrationFileName(string $migrationFileName): string

tests/WebPushServiceProviderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function it_publishes_migration(): void
3838
$migrationsPath = $this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR;
3939

4040
// Remove any existing matching migrations in the database/migrations folder for a clean test
41-
$existing = glob($migrationsPath.'*_' . 'create_push_subscriptions_table.php');
41+
$existing = glob($migrationsPath.'*_'.'create_push_subscriptions_table.php');
4242
foreach ($existing as $file) {
4343
@unlink($file);
4444
}
@@ -50,7 +50,7 @@ public function it_publishes_migration(): void
5050

5151
$this->assertEquals(0, $exit);
5252

53-
$found = glob($migrationsPath.'*_' . 'create_push_subscriptions_table.php');
53+
$found = glob($migrationsPath.'*_'.'create_push_subscriptions_table.php');
5454

5555
$this->assertNotEmpty($found, 'No migration was published to the database/migrations path');
5656

@@ -74,11 +74,11 @@ public function it_does_not_generate_duplicate_migration_if_one_already_exists()
7474
}
7575

7676
// Ensure no existing matching migrations are present before the test
77-
$existing = glob($migrationsPath . '*_create_push_subscriptions_table.php');
77+
$existing = glob($migrationsPath.'*_create_push_subscriptions_table.php');
7878
foreach ($existing as $file) {
7979
@unlink($file);
8080
}
81-
81+
8282
// Create a fake existing migration file in the app migrations directory that should be detected and reused
8383
$existingFilename = $migrationsPath.'2020_01_01_000000_create_push_subscriptions_table.php';
8484
file_put_contents($existingFilename, "<?php\n// existing migration\n");
@@ -101,7 +101,7 @@ public function it_does_not_generate_duplicate_migration_if_one_already_exists()
101101
$this->assertEquals(0, $exit);
102102

103103
// After publishing, ensure no additional migration with a different timestamp suffix was created
104-
$found = glob($migrationsPath.'*_' . 'create_push_subscriptions_table.php');
104+
$found = glob($migrationsPath.'*_'.'create_push_subscriptions_table.php');
105105

106106
// There should be exactly one matching migration (the existing one we created)
107107
$this->assertCount(1, $found, 'A duplicate migration file was created instead of reusing the existing one');

0 commit comments

Comments
 (0)