Total Complexity | 2 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | return new class ($this->injector, $instance) implements ProviderInterface |
||
|
|||
32 | { |
||
33 | private InjectorInterface $injector; |
||
34 | private Set $set; |
||
35 | |||
36 | public function __construct(InjectorInterface $injector, Set $set) |
||
37 | { |
||
38 | $this->injector = $injector; |
||
39 | $this->set = $set; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | public function get() |
||
48 | } |
||
49 | }; |
||
52 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: