peridot icon indicating copy to clipboard operation
peridot copied to clipboard

ReporterInterface does not include the methods added by HasEventEmitterTrait

Open ezzatron opened this issue 8 years ago • 0 comments

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.

ezzatron avatar Jan 19 '17 06:01 ezzatron