| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 3 | public static function make( |
|
| 13 | ContainerInterface $container, |
||
| 14 | array $services |
||
| 15 | ): ContainerAwareCommandBus { |
||
| 16 | 3 | $map = new Map('string', 'string'); |
|
| 17 | |||
| 18 | 3 | foreach ($services as $class => $service) { |
|
| 19 | 3 | $map = $map->put($class, $service); |
|
|
1 ignored issue
–
show
|
|||
| 20 | } |
||
| 21 | |||
| 22 | 3 | return new ContainerAwareCommandBus($container, $map); |
|
| 23 | } |
||
| 24 | } |
||
| 25 |
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: