Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParamReturnAndVarTagMalformsFixer doesn't work nice with nested array in multi-line doc-block #49

Open
annuh opened this issue Jul 11, 2024 · 0 comments

Comments

@annuh
Copy link

annuh commented Jul 11, 2024

Hi!
I noticed that the Symplify\CodingStandard\Fixer\Commenting\ParamReturnAndVarTagMalformsFixer tries to 'fix' correct multi-line doc-blocks.

The following code:

    /**
      * @param array<string, array{
      *     foo: string
     * }> $foo
     */
    public function test($foo, $bar): void {}

Produces the following diff:

    ---------- begin diff ----------
     /**
-     * @param array<string, array{
+     * @param array<string, $bar array{
      *     foo: string
      * }> $foo
      */
    ----------- end diff -----------


Applied checkers:

 * Symplify\CodingStandard\Fixer\Commenting\ParamReturnAndVarTagMalformsFixer

This doesn't happen when the missing argument ($bar) is also defined in the doc-block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant