Closed zonuexe closed 1 year ago
Suppose you have code like this:
<?php /** * @param string $one * @param string $one */ function someFunction($one, $two): void { }
The author's intention is to write a param for $one and $two, but it mistakenly duplicates $one.
$one
$two
I use SetList::CLEAN_CODE from ECS, but it seems to be replaced as follows:
SetList::CLEAN_CODE
<?php /** - * @param string $one - * @param string $one + * @param string $two + * @param string $two */ function someFunction($one, $two): void { }
ParamNameTypoMalformWorker::fixTypos() certainly seems to have that problem.
ParamNameTypoMalformWorker::fixTypos()
We don't want a quick fix as we can fix these manually, but will report them as issues. Thank you for your work!
Hi, thanks for reporting. Could you share bug fixture and fix?
Yes, I'm going to submit a PR tonight, so please wait a moment.
Suppose you have code like this:
The author's intention is to write a param for
$one
and$two
, but it mistakenly duplicates$one
.I use
SetList::CLEAN_CODE
from ECS, but it seems to be replaced as follows:ParamNameTypoMalformWorker::fixTypos()
certainly seems to have that problem.We don't want a quick fix as we can fix these manually, but will report them as issues. Thank you for your work!