Recently I was playing with code-coverage generation and when running PHPUnit it was detected that we have a few unit tests having multiple @coversDefaultClass annotations.
That's plain wrong, only one is allowed (in fact PHPUnit stops when that happens). Such an annotation is about to define the default class to apply when the @covers annotations do no specify a class. Just that.
So we should start erroring in the Sniff when multiple are detected. Of course, only that annotation, classes and methods are allowed to have multiple @covers ones.
Recently I was playing with code-coverage generation and when running PHPUnit it was detected that we have a few unit tests having multiple
@coversDefaultClass
annotations.That's plain wrong, only one is allowed (in fact PHPUnit stops when that happens). Such an annotation is about to define the default class to apply when the
@covers
annotations do no specify a class. Just that.So we should start erroring in the Sniff when multiple are detected. Of course, only that annotation, classes and methods are allowed to have multiple
@covers
ones.Ciao :-)