@coversDefaultClass seems to work fine on a trait as well as a class, but I get this error:
---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 13 | WARNING | The phpunit annotation @coversDefaultClass should | | only be used in class level comments. | | (MediaWiki.Commenting.PhpunitAnnotations.NotClass) ----------------------------------------------------------------------
I tried poking a little at the code for our sniff rules but didn't know how to fix the problem.