| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 65 | 13 | public function inject(Container $container) |
|
| 66 | { |
||
| 67 | 13 | if ($this->isSingleton && $this->instance) { |
|
| 68 | 1 | return $this->instance; |
|
| 69 | } |
||
| 70 | 13 | $provider = $this->dependency->inject($container); |
|
| 71 | 13 | if ($provider instanceof SetContextInterface) { |
|
| 72 | 2 | $this->setContext($provider); |
|
| 73 | } |
||
| 74 | 13 | $this->instance = $provider->get(); |
|
| 75 | |||
| 76 | 13 | return $this->instance; |
|
| 77 | } |
||
| 78 | |||
| 94 |