chore: stricter pint rules

This commit is contained in:
Benjamin Nussbaum 2025-06-17 21:30:59 +02:00
parent 16b2e8436e
commit e535496a1e
30 changed files with 134 additions and 83 deletions

View file

@ -128,8 +128,8 @@ class MashupCreateCommand extends Command
required: true,
default: 'Mashup',
validate: fn (string $value) => match (true) {
strlen($value) < 1 => 'The name must be at least 2 characters.',
strlen($value) > 50 => 'The name must not exceed 50 characters.',
mb_strlen($value) < 1 => 'The name must be at least 2 characters.',
mb_strlen($value) > 50 => 'The name must not exceed 50 characters.',
default => null,
}
);
@ -149,7 +149,7 @@ class MashupCreateCommand extends Command
$selectedPlugins = collect();
$availablePlugins = $plugins->mapWithKeys(fn ($plugin) => [$plugin->id => $plugin->name])->toArray();
for ($i = 0; $i < $requiredCount; $i++) {
for ($i = 0; $i < $requiredCount; ++$i) {
$position = match ($i) {
0 => 'first',
1 => 'second',

View file

@ -4,6 +4,7 @@ namespace App\Console\Commands;
use App\Jobs\GenerateScreenJob;
use Illuminate\Console\Command;
use Throwable;
class ScreenGeneratorCommand extends Command
{
@ -31,7 +32,7 @@ class ScreenGeneratorCommand extends Command
try {
$markup = view($view)->render();
} catch (\Throwable $e) {
} catch (Throwable $e) {
$this->error('Failed to render view: '.$e->getMessage());
return 1;