| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function create($class, array $arguments = []) |
||
| 29 | { |
||
| 30 | $classHash = hash('md5', $class . implode("", array_values($arguments))); |
||
| 31 | if (!isset($this->instances[$classHash])) { |
||
| 32 | $this->instances[$classHash] = new $class($arguments); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $this->instances[$classHash]; |
||
| 36 | } |
||
| 46 |