Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function create(string $tableName): ?RepositoryInterface |
||
38 | { |
||
39 | if (isset($this->entities[$tableName])) { |
||
40 | $entityClass = $this->entities[$tableName]; |
||
41 | $repository = $this->entityManager->getRepository($entityClass); |
||
42 | |||
43 | if ($repository instanceof RepositoryInterface) { |
||
44 | return $repository; |
||
45 | } |
||
46 | } |
||
47 | |||
48 | return null; |
||
49 | } |
||
51 |