| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | class DoctrineFacade implements DoctrineFacadeInterface |
||
| 23 | { |
||
| 24 | private EntityManagerPoolInterface|null $managerPool; |
||
| 25 | |||
| 26 | 1 | public function __construct(private readonly EntityManagerPoolFactoryInterface $managerPoolFactory) |
|
| 27 | { |
||
| 28 | 1 | $this->managerPool = null; |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | public function getManager(string $name = null): EntityManagerInterface |
|
| 32 | { |
||
| 33 | 1 | if (!$name) { |
|
| 34 | 1 | $name = DoctrinePluginConfigurationInterface::MANAGER_DEFAULT; |
|
| 35 | } |
||
| 36 | |||
| 37 | 1 | return $this->managerPool()->getManager($name); |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @throws MissingMappingDriverImplementation |
||
| 42 | * @throws Exception |
||
| 43 | */ |
||
| 44 | 1 | public function getDefaultManager(): EntityManagerInterface |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | protected function managerPool(): EntityManagerPoolInterface |
|
| 58 |