| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function newInstance() |
||
| 27 | { |
||
| 28 | if (isset($this->entityFactories[$this->name])) { |
||
| 29 | return $this->entityFactories[$this->name]->getEntity(); |
||
| 30 | } |
||
| 31 | |||
| 32 | if ($this->genericFactory !== null) { |
||
| 33 | return $this->genericFactory->getEntity($this->name); |
||
| 34 | } |
||
| 35 | |||
| 36 | return parent::newInstance(); |
||
| 37 | } |
||
| 45 |