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