| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 60% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class DatabaseFactory |
||
| 16 | { |
||
| 17 | private static ?Factory $factory = null; |
||
| 18 | |||
| 19 | 2060 | /** |
|
| 20 | * @throws InvalidConfigException |
||
| 21 | 2060 | */ |
|
| 22 | 2060 | public static function initialize(ContainerInterface $container = null, array $definitions = []): void |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Get `Connection` instance. |
||
| 29 | * |
||
| 30 | * @param array $config |
||
| 31 | * |
||
| 32 | * @throws CircularReferenceException|InvalidConfigException|NotFoundException|NotInstantiableException |
||
| 33 | 19 | * |
|
| 34 | * @return object |
||
| 35 | 19 | */ |
|
| 36 | public static function connection(array $config): object |
||
| 39 | } |
||
| 40 | |||
| 41 | 19 | /** |
|
| 42 | * Creates a Class defined by config passed. |
||
| 43 | * |
||
| 44 | * @param array|string $config parameters for creating a class. |
||
| 45 | * |
||
| 46 | * @throws CircularReferenceException|InvalidConfigException|NotFoundException|NotInstantiableException |
||
| 47 | */ |
||
| 48 | private static function createClass($config): object |
||
| 59 |