chore: phpstan fixes, rector

This commit is contained in:
Benjamin Nussbaum 2026-01-15 13:14:50 +01:00
parent d19a079b8a
commit b097b0a7d7
7 changed files with 15 additions and 17 deletions

View file

@ -156,9 +156,7 @@ test('can delete a device palette', function (): void {
->call('deleteDevicePalette', $palette->id);
expect(DevicePalette::find($palette->id))->toBeNull();
$component->assertSet('devicePalettes', function ($palettes) use ($palette) {
return $palettes->where('id', $palette->id)->isEmpty();
});
$component->assertSet('devicePalettes', fn ($palettes) => $palettes->where('id', $palette->id)->isEmpty());
});
test('can duplicate a device palette', function (): void {

View file

@ -467,7 +467,7 @@ YAML;
$zipFile = UploadedFile::fake()->createWithContent('invalid-default.zip', $zipContent);
$pluginImportService = new PluginImportService();
expect(fn () => $pluginImportService->importFromZip($zipFile, $user))
expect(fn (): Plugin => $pluginImportService->importFromZip($zipFile, $user))
->toThrow(Exception::class, 'Validation Error: The default value for multistring fields like `api_key` cannot contain commas.');
});
@ -497,7 +497,7 @@ YAML;
$zipFile = UploadedFile::fake()->createWithContent('invalid-placeholder.zip', $zipContent);
$pluginImportService = new PluginImportService();
expect(fn () => $pluginImportService->importFromZip($zipFile, $user))
expect(fn (): Plugin => $pluginImportService->importFromZip($zipFile, $user))
->toThrow(Exception::class, 'Validation Error: The placeholder value for multistring fields like `api_key` cannot contain commas.');
});