| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 98 | public function make( |
|
| 29 | array $interceptors, |
||
| 30 | ?EventDispatcherInterface $eventDispatcher = null, |
||
| 31 | ): CoreInterface|HandlerInterface { |
||
| 32 | /** @var CommandCore $core */ |
||
| 33 | 98 | $core = $this->container->get(CommandCore::class); |
|
| 34 | |||
| 35 | 98 | $interceptableCore = (new InterceptorPipeline($eventDispatcher))->withCore($core); |
|
| 36 | |||
| 37 | 98 | foreach ($interceptors as $interceptor) { |
|
| 38 | 1 | $interceptableCore->addInterceptor($this->container->get($interceptor)); |
|
| 39 | } |
||
| 40 | 98 | $interceptableCore->addInterceptor($this->container->get(AttributeInterceptor::class)); |
|
| 41 | |||
| 42 | 98 | return $interceptableCore; |
|
| 43 | } |
||
| 45 |