Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
AddEventDispatcherContextBuilder
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 process
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\Common\ContextBuilders;
3
4use Apie\Core\Context\ApieContext;
5use Apie\Core\ContextBuilders\ContextBuilderInterface;
6use Psr\EventDispatcher\EventDispatcherInterface;
7
8class 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}