| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 2 | public function getRepository(string $entityName): EntityRepository |
|
| 21 | { |
||
| 22 | 2 | if (!isset($this->repositories[$entityName])) { |
|
| 23 | 2 | $this->repositories[$entityName] = new EntityRepository( |
|
| 24 | 2 | $this->adapter, |
|
| 25 | $entityName, |
||
| 26 | 2 | HydratorFactory::create() |
|
| 27 | ); |
||
| 28 | } |
||
| 29 | |||
| 30 | 2 | return $this->repositories[$entityName]; |
|
| 31 | } |
||
| 32 | } |
||
| 33 |