If you specify an annotation at a class, code coverage ignores the class and its methods. This is correct behavior.
But the same does not work for enum, but it works for its methods.
Current behavior
Annotation codeCoverageIgnore ingores for enums.
How to reproduce
/**
* @codeCoverageIgnore
*/
enum Some
{
case SomeCase;
// not ignored, red coverage
public function isSomeCase(): bool
{
return $this === self::SomeCase;
}
}
enum Some
{
case SomeCase;
/**
* @codeCoverageIgnore
* ok ignored, without coverage
*/
public function isSomeCase(): bool
{
return $this === self::SomeCase;
}
}
Summary
If you specify an annotation at a class, code coverage ignores the class and its methods. This is correct behavior. But the same does not work for enum, but it works for its methods.
Current behavior
Annotation
codeCoverageIgnore
ingores for enums.How to reproduce
Expected behavior
Code coverage will ignore enum and predicate.