SanderRonde / phpstan-vscode

PHPStan plugin for VSCode
https://marketplace.visualstudio.com/items?itemName=SanderRonde.phpstan-vscode
MIT License
47 stars 8 forks source link

Place `@phpstan-ignore` inside existing docblocks #89

Closed jrmajor closed 4 months ago

jrmajor commented 4 months ago

If there is a docblock above a problematic line, I would like the “ignore PHPStan error” fix to place the @phpstan-ignore directive inside the docblock, instead of creating a new comment.

Example:

class Siblings extends Relation
{
    /** @var Person */
    protected $parent; // error on this line
}

Current fix:

class Siblings extends Relation
{
    /** @var Person */
    // @phpstan-ignore-next-line
    protected $parent; // error on this line
}

Expected fix:

class Siblings extends Relation
{
    /**
     * @var Person
     * @phpstan-ignore-next-line
     */
    protected $parent; // error on this line
}

If this is desired, I can tackle this after #88 is merged.

SanderRonde commented 4 months ago

I agree that this indeed a very nice feature to have. If you need any help feel free to ask!