| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function get(): Map |
||
| 26 | { |
||
| 27 | $param = $this->ip->getParameter(); |
||
| 28 | $setAttribute = $param->getAttributes(Set::class); |
||
| 29 | if (! isset($setAttribute[0])) { |
||
| 30 | throw new SetNotFound((string) $param); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** @var Set<object> $set */ |
||
| 34 | $set = $setAttribute[0]->newInstance(); |
||
| 35 | |||
| 36 | /** @var array<string, LazyTo<object>> $lazies */ |
||
| 37 | $lazies = $this->multiBindings[$set->interface]; |
||
| 38 | |||
| 39 | return new Map($lazies, $this->injector); |
||
|
|
|||
| 40 | } |
||
| 42 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: