coding-standard
coding-standard copied to clipboard
PHPStan type-aliases are converted to FQCN
When you use type aliases by PHPStan, even if you use a @phpstan- prefixed annotation, like @phpstan-param, the SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation rule auto-corrects it to a FQCN and with that ruins it.
Suggested solution: Add @phpstan-param,@phpstan-return,@phpstan-var (any other?) to the ignoredAnnotationNames as sane defaults.
Will you prepare PR please?
If the suggested fix is acceptable, gladly! :)
Although, it came to my mind that is there a realistic scenario where @phpstan-param is used to specify a class/interface reference instead of @param? Is these a scenario where somebody would like to override what is in @param like this and that is also a class/interface reference? I hope not...