From 1744d6613f1a8ae1318acb6e19d6fcc385f6eb12 Mon Sep 17 00:00:00 2001 From: francoism90 Date: Fri, 21 Jun 2024 21:05:07 +0200 Subject: [PATCH] Fix deprecated warning --- src/Support/Blade/Bladeable.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Support/Blade/Bladeable.php b/src/Support/Blade/Bladeable.php index 19da34da..66795b47 100644 --- a/src/Support/Blade/Bladeable.php +++ b/src/Support/Blade/Bladeable.php @@ -12,7 +12,7 @@ public static function classMerged(ComponentAttributeBag $attributeBag, ?array $ $values ??= static::classAttributes($attributeBag); return collect($values) - ->map(function (mixed $value = null, int|string $key) use ($attributeBag) { + ->map(function (mixed $value, int|string $key) use ($attributeBag) { if (is_bool($value) && $value === false) { return; } @@ -27,7 +27,8 @@ public static function classMerged(ComponentAttributeBag $attributeBag, ?array $ public static function classAttributes(ComponentAttributeBag $attributeBag): Collection { - return str($attributeBag->whereStartsWith('class:'))->matchAll('/class:(.*?)\=/s'); + return str($attributeBag->whereStartsWith('class:')) + ->matchAll('/class:(.*?)\=/s'); } public static function classKeys(...$keys): Collection