peridot
peridot copied to clipboard
ReporterInterface does not include the methods added by HasEventEmitterTrait
Currently in some parts of the code, such as the new composite reporter, we assume that a reporter will have the setEventEmitter()
method, which comes from HasEventEmitterTrait
that we add in AbstractTest
:
array_map(function (ReporterInterface $reporter) use ($eventEmitter) {
$reporter->setEventEmitter($eventEmitter);
}, $this->reporters);
There's been some other related stuff where we typehint on abstract classes when we should really use an interface instead. I think we need to audit our typehints, and interfaces.