Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| AddEventDispatcherContextBuilder | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| process | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Common\ContextBuilders; |
| 3 | |
| 4 | use Apie\Core\Context\ApieContext; |
| 5 | use Apie\Core\ContextBuilders\ContextBuilderInterface; |
| 6 | use Psr\EventDispatcher\EventDispatcherInterface; |
| 7 | |
| 8 | class AddEventDispatcherContextBuilder implements ContextBuilderInterface |
| 9 | { |
| 10 | public function __construct(private readonly EventDispatcherInterface $dispatcher) |
| 11 | { |
| 12 | } |
| 13 | public function process(ApieContext $context): ApieContext |
| 14 | { |
| 15 | return $context->registerInstance($this->dispatcher); |
| 16 | } |
| 17 | } |