Skip to content

Commit 89d735d

Browse files
committed
Replace local collect call with array helper
1 parent ed72df6 commit 89d735d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/framework/src/Facades/Features.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Hyde\Foundation\Concerns\Feature;
1111
use Hyde\Support\Concerns\Serializable;
1212
use Hyde\Support\Contracts\SerializableContract;
13+
use Illuminate\Support\Arr;
1314

1415
use function is_array;
1516
use function array_map;
@@ -138,10 +139,9 @@ public static function hasTorchlight(): bool
138139
*/
139140
public function toArray(): array
140141
{
141-
return collect(Feature::cases())
142-
->mapWithKeys(fn (Feature $feature): array => [
143-
$feature->value => in_array($feature->value, $this->features),
144-
])->toArray();
142+
return Arr::mapWithKeys(Feature::cases(), fn (Feature $feature): array => [
143+
$feature->value => in_array($feature->value, $this->features),
144+
]);
145145
}
146146

147147
protected function boot(): array

0 commit comments

Comments
 (0)