Skip to content

Commit ff81a66

Browse files
Make mago happy
1 parent bbe233b commit ff81a66

File tree

10 files changed

+7
-22
lines changed

10 files changed

+7
-22
lines changed

src/Console/Commands/BackupCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
*/
1717
final class BackupCommand extends Command
1818
{
19-
// @mago-expect lint:strictness/require-property-type
2019
protected $signature = 'statamic:backup';
2120

22-
// @mago-expect lint:strictness/require-property-type
2321
protected $description = 'Run the backup pipeline';
2422

2523
public function handle(): void

src/Console/Commands/ClearFilesCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
/**
1414
* Clear the backup temp directory
15-
*
16-
* @mago-expect lint:strictness/require-property-type
1715
*/
1816
final class ClearFilesCommand extends Command
1917
{

src/Console/Commands/RestoreCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
/**
1818
* Restore content from a directory / backup
19-
*
20-
* @mago-expect lint:strictness/require-property-type
2119
*/
2220
final class RestoreCommand extends Command
2321
{

src/Http/Resources/BackupResource.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
final class BackupResource extends JsonResource
1313
{
14-
// @mago-expect lint:parameter-type
1514
public function toArray($request): array
1615
{
1716
return [

src/Http/Resources/MetadataResource.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313
final class MetadataResource extends JsonResource
1414
{
15-
// @mago-expect lint:parameter-type
1615
public function toArray($request): array
1716
{
1817
return [

src/ServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Statamic\Facades\Permission;
1919
use Statamic\Providers\AddonServiceProvider;
2020

21-
// @mago-expect lint:strictness/require-property-type
2221
final class ServiceProvider extends AddonServiceProvider
2322
{
2423
protected $viewNamespace = 'itiden-backup';

tests/Feature/CreateBackupTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@
6868

6969
postJson(cp_route('api.itiden.backup.store'));
7070

71-
Event::assertDispatched(BackupCreated::class, function (BackupCreated $event): bool {
72-
return $event->backup->name === app(BackupRepository::class)->all()->first()->name;
73-
});
71+
Event::assertDispatched(
72+
BackupCreated::class,
73+
fn(BackupCreated $event) => $event->backup->name === app(BackupRepository::class)->all()->first()->name,
74+
);
7475
});
7576

7677
it('dispatches failed event when error occurs', function (): void {

tests/Feature/RestoreBackupTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@
8989

9090
$response = postJson(cp_route('api.itiden.backup.restore', $backup->id));
9191

92-
Event::assertDispatched(BackupRestored::class, function (BackupRestored $event) use ($backup): bool {
93-
return $event->backup->id === $backup->id;
94-
});
92+
Event::assertDispatched(BackupRestored::class, fn(BackupRestored $event) => $event->backup->id === $backup->id);
9593
expect($response->status())->toBe(Response::HTTP_OK);
9694
});
9795

tests/TestCase.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class TestCase extends AddonTestCase
1616

1717
protected string $addonServiceProvider = ServiceProvider::class;
1818

19-
// @mago-expect lint:parameter-type
2019
protected function resolveApplicationConfiguration($app): void
2120
{
2221
parent::resolveApplicationConfiguration($app);

tests/Unit/PipeTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@
4747
test('can skip a pipe with users', function (): void {
4848
$pipe = app()->make(Users::class);
4949

50-
$callable = function (Zipper $z): Zipper {
51-
return $z;
52-
};
50+
$callable = fn(Zipper $z) => $z;
5351

5452
File::deleteDirectory(Stache::store('users')->directory());
5553

@@ -69,9 +67,7 @@
6967
test('can skip a pipe with stache content', function (): void {
7068
$pipe = app()->make(StacheData::class);
7169

72-
$callable = function (Zipper $z): Zipper {
73-
return $z;
74-
};
70+
$callable = fn(Zipper $z) => $z;
7571

7672
config()->set('backup.stache_stores', ['non-existing-store']);
7773

0 commit comments

Comments
 (0)