199ocero / radio-deck

Turn filament default radio button into a selectable card with icons, title and description.
https://filamentphp.com/plugins/jaocero-radio-deck
MIT License
63 stars 10 forks source link

Correct type hint #17

Closed juliangums closed 4 months ago

JackWH commented 4 months ago

Hey @juliangums, just tested and I can see each line causes a syntax error:

protected Arrayable|Closure|string $descriptions = [];

Cannot use array as default value for property JaOcero\RadioDeck\Forms\Components\RadioDeck::$descriptions of type Illuminate\Contracts\Support\Arrayable|Closure|string

You should extend the union type back to how it was originally, by adding |array:

protected Arrayable|Closure|string|array $descriptions = [];
juliangums commented 4 months ago

@JackWH can you check again?

199ocero commented 4 months ago

Merge @juliangums @JackWH yeah sorry I didn't check the last PR I thought it only removes the facade but some data type are remove. Can you check it again @JackWH ?

juliangums commented 4 months ago

My bad for not double-checking. I was experimenting with other parts of the code, and this should not have made it in the code. Was committed by accident.