| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 13 | public function inject(Container $container) |
|
| 51 | { |
||
| 52 | 13 | if ($this->isSingleton && $this->instance) { |
|
| 53 | 1 | return $this->instance; |
|
| 54 | } |
||
| 55 | 13 | $provider = $this->dependency->inject($container); |
|
| 56 | 13 | if ($provider instanceof SetContextInterface) { |
|
| 57 | 2 | $this->setContext($provider); |
|
| 58 | } |
||
| 59 | 13 | $this->instance = $provider->get(); |
|
| 60 | |||
| 61 | 13 | return $this->instance; |
|
| 62 | } |
||
| 63 | |||
| 84 |