First of all i know it's not a bug or really an issue, but i would like to have it as a feature request.
Reason for that, is currently using this fixer, leaves code base in inconsistent state.
If i use fully_qualified_strict_types to transforms imported FQCN parameters and return types in function arguments to short version, i would also expect that if it can also transforms for the types that are mentioned within Phpdoc.
When reporting an issue (bug) please provide the following information:
$ php -v):=> 7.1.16
$ php-cs-fixer -V):=> 2.10.0
/** @param \This\Is\Param\Namespace\User $x **/
public function beforePhpCsFixer(\This\Is\Param\Namespace\User $x, string $y): void
{
// function body
}
/** @param \This\Is\Param\Namespace\User $x **/
public function beforePhpCsFixer(User $x, string $y): void
{
// function body
}
/** @param User $x **/
public function beforePhpCsFixer(User $x, string $y): void
{
// function body
}
Thank you!
馃憤 for this feature. Btw, you have \This\Is\Param\Namespace\Use instead of \This\Is\Param\Namespace\User 馃槈
Updated it!
Just as a thought: should it be an option (but enabled by default)? I know people who prefer docs to always be FQCN even while code might use short version.
Definitely should be an option, the default behaviour of a fixer shouldn't be changed in minor releases.
Definitely should be an option
shouldn't be changed in minor
That thus depends on which version you target 馃槈 but I agree.
However, (in the case this feature gets built) enabling by default for next major, 馃憤 or 馃憥?
Thank you @ntzm and @dmvdbrugge for supporting my request.
Most helpful comment
That thus depends on which version you target 馃槈 but I agree.
However, (in the case this feature gets built) enabling by default for next major, 馃憤 or 馃憥?