| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 54 | public function object() |
||
| 55 | { |
||
| 56 | if ($this->di->has($this->class)) { |
||
| 57 | return $this->di->get($this->class); |
||
| 58 | } |
||
| 59 | |||
| 60 | if ($this->contract) { |
||
| 61 | if ($this->optional) { |
||
| 62 | return null; |
||
| 63 | } |
||
| 64 | |||
| 65 | throw new DependsInterfaceNotAssignedException($this->class); |
||
| 66 | } |
||
| 67 | |||
| 68 | return $this->di->set($this->class, $this->di->object($this->class)); |
||
| 69 | } |
||
| 71 |