Formfeed-UK / nova-breadcrumbs

Augments Nova 4 Breadcrumbs with nesting and resource/static override methods
MIT License
20 stars 9 forks source link

Add make method annotation to adhere to parameters overwrite #11

Closed tassilogroeper closed 2 years ago

tassilogroeper commented 2 years ago

When using PHPStorm or PHPStan the parameters to the Breadcrumbs::make($request, $this) are not sensed correctly. Furthermore PHPStan breaks due to inheritance with Laravel\Nova\Fields\Field:

Static method Laravel\Nova\Fields\Field::make() invoked with 0 parameters, 1-3 required.

Fix

Overwrite the @method annotation.

/**
* @method static static make(NovaRequest $request, Resource $resource)
**/
ianrobertsFF commented 2 years ago

I don't use either, can you check if the changes in main are fixing the issue for you? Then ill do a release.

tassilogroeper commented 2 years ago

@ianrobertsFF Thanks! I was just generating the Pull request.

And Yes! I did it on my local after composer update, it works!

ianrobertsFF commented 2 years ago

Wunderbar, ill do the release now

tassilogroeper commented 2 years ago

If you like, do the indentation and rm additional empty line ;-) 👍

ianrobertsFF commented 2 years ago

Haha trying to use it on mobile right now, I've fixed the styling, but I wont do another release just for that, but it'll be in the next one.

Edit: For clarity the fix is in 1.0.4, but the styling changes to the annotation wont be

tassilogroeper commented 2 years ago

Great! nothing to worry about. Thanks for the quick reaction.

Cheers!