tighten/duster

argument (User $user = null) should be (?User $user = null) ?

BadChoice opened this issue · 1 comments

Hello,
Our team has been discussing this rule that makes duster to fail when we declare a nullable type of an default null type.

We believe the second form is the correct, since the type is a nullable user, however we understand that there are cases that the first form makes sense, but it is not a good architecture

Is there any reason why duster defaults to the first form, and is there any way to force the second one?

Thanks!

We use Pint under the hood for a lot of default preferences, this is something it brings in from the Pint Laravel Preset

https://cs.symfony.com/doc/rules/function_notation/nullable_type_declaration_for_default_null_value.html#example-2