| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 19 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 8 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 17 | 3 | public static function make(  | 
            |
| 18 | ContainerInterface $container,  | 
            ||
| 19 | array $services,  | 
            ||
| 20 | ExtractorInterface $extractor  | 
            ||
| 21 |     ): ContainerAwareEventBus { | 
            ||
| 22 | 3 |         $map = new Map('string', SetInterface::class); | 
            |
| 23 | |||
| 24 | 3 |         foreach ($services as $class => $listeners) { | 
            |
| 25 | 3 |             $set = new Set('string'); | 
            |
| 26 | |||
| 27 | 3 |             foreach ($listeners as $listener) { | 
            |
| 28 | 3 | $set = $set->add($listener);  | 
            |
| 29 | }  | 
            ||
| 30 | |||
| 31 | 3 | $map = $map->put($class, $set);  | 
            |
| 
                                                                                                                                                        
                         2 ignored issues 
                            –
                            show
                         | 
                |||
| 32 | }  | 
            ||
| 33 | |||
| 34 | 3 | return new ContainerAwareEventBus($container, $map, $extractor);  | 
            |
| 35 | }  | 
            ||
| 36 | }  | 
            ||
| 37 | 
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: