mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
chore: stricter pint rules
This commit is contained in:
parent
16b2e8436e
commit
e535496a1e
30 changed files with 134 additions and 83 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue