Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 2 | public function instantiate($className) |
|
23 | { |
||
24 | 2 | $registry = $this->getModelRegistry(); |
|
25 | 2 | if ($registry->has($className)) { |
|
26 | 1 | return $registry->get($className); |
|
27 | } |
||
28 | |||
29 | 1 | $manager = $this->create($className); |
|
30 | 1 | $registry->set($manager->getClassName(), $manager); |
|
31 | 1 | return $manager; |
|
32 | } |
||
61 |