Total Complexity | 10 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class DbalFactory |
||
11 | { |
||
12 | private $params; |
||
13 | |||
14 | /** @var ContainerInterface */ |
||
15 | protected $container; |
||
16 | |||
17 | public function __construct($params) |
||
20 | } |
||
21 | |||
22 | public function __invoke(ContainerInterface $container) |
||
23 | { |
||
24 | $this->container = $container; |
||
25 | $conf = $this->prepareConfig($this->params); |
||
26 | return new DatabaseManager($conf); |
||
27 | } |
||
28 | |||
29 | protected function prepareConfig($params): DatabaseConfig |
||
30 | { |
||
31 | if ($params instanceof DatabaseConfig) { |
||
32 | return $params; |
||
33 | } |
||
34 | if (isset($params['connections'])) { |
||
35 | // prepare connections |
||
36 | foreach ($params['connections'] as &$connection) { |
||
37 | $connection = $this->prepareConnection($connection); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | return new DatabaseConfig($params); |
||
42 | } |
||
43 | |||
44 | protected function prepareConnection(array $connection): array |
||
53 | } |
||
54 | |||
55 | protected function getAlias(string $alias): string |
||
58 | } |
||
59 | } |
||
60 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths