Skip to content

Add comment ignore #786

@soullivaneuh

Description

@soullivaneuh

Summary of a problem or a feature request

Sometime we can have error like this:

 ------ ----------------------------------------------- 
  Line   tests/AppBundle/Entity/AbstractEntityTest.php  
 ------ ----------------------------------------------- 
  162    Call to an undefined method object::getId().   
 ------ ----------------------------------------------- 

This case is a false positive (see #323) but can not be fixed yet.

I can use ignoreErrors either because the error message is way to common.

It would be great to be able to ignore phpstan analyse via code comment like this:

$var = $this; // phpstan-ignore

// phpstan-ignore-next-line
$this->methodNotExists();

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions