The expression return static::instance could return the type null which is incompatible with the type-hinted return kalanis\kw_mapper\Storag...abase\DatabaseSingleton. Consider adding an additional type-check to rule them out.
Loading history...
26
}
27
28
2
protected function __construct()
29
{
30
2
}
31
32
/**
33
* @codeCoverageIgnore why someone would run that?!
34
*/
35
private function __clone()
36
{
37
}
38
39
/**
40
* @param Config $config
41
* @throws MapperException
42
* @return ADatabase
43
*/
44
56
final public function getDatabase(Config $config): ADatabase
45
{
46
56
if (empty($this->database[$config->getDriver()])) {