diff --git a/src/TokenRunner/DocBlock/MalformWorker/SwitchedTypeAndNameMalformWorker.php b/src/TokenRunner/DocBlock/MalformWorker/SwitchedTypeAndNameMalformWorker.php index 0cf3ede3..b9cb6095 100644 --- a/src/TokenRunner/DocBlock/MalformWorker/SwitchedTypeAndNameMalformWorker.php +++ b/src/TokenRunner/DocBlock/MalformWorker/SwitchedTypeAndNameMalformWorker.php @@ -16,7 +16,7 @@ final class SwitchedTypeAndNameMalformWorker implements MalformWorkerInterface * @var string * @see https://regex101.com/r/4us32A/1 */ - private const NAME_THEN_TYPE_REGEX = '#@((?:psalm-|phpstan-)?(?:param|var))(\s+)(?\$\w+)(\s+)(?[|\\\\\w\[\]]+)#'; + private const NAME_THEN_TYPE_REGEX = '#@((?:psalm-|phpstan-)?(?:param|var))(\s+)(?\$\w+)(\s+)(?[|\\\\\w\[\]\<\>]+)#'; /** * @param Tokens $tokens diff --git a/tests/Fixer/Commenting/ParamReturnAndVarTagMalformsFixer/Fixture/iterator_flip.php.inc b/tests/Fixer/Commenting/ParamReturnAndVarTagMalformsFixer/Fixture/iterator_flip.php.inc new file mode 100644 index 00000000..be381142 --- /dev/null +++ b/tests/Fixer/Commenting/ParamReturnAndVarTagMalformsFixer/Fixture/iterator_flip.php.inc @@ -0,0 +1,19 @@ + */ + return $value; +} + +?> +----- + $value */ + return $value; +} + +?> diff --git a/tests/Fixer/Commenting/ParamReturnAndVarTagMalformsFixer/ParamReturnAndVarTagMalformsFixerTest.php b/tests/Fixer/Commenting/ParamReturnAndVarTagMalformsFixer/ParamReturnAndVarTagMalformsFixerTest.php index baa16e6f..393d4531 100644 --- a/tests/Fixer/Commenting/ParamReturnAndVarTagMalformsFixer/ParamReturnAndVarTagMalformsFixerTest.php +++ b/tests/Fixer/Commenting/ParamReturnAndVarTagMalformsFixer/ParamReturnAndVarTagMalformsFixerTest.php @@ -8,9 +8,6 @@ use PHPUnit\Framework\Attributes\DataProvider; use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase; -/** - * @mimic https://github.com/rectorphp/rector/pull/807/files - */ final class ParamReturnAndVarTagMalformsFixerTest extends AbstractCheckerTestCase { #[DataProvider('provideData')]