Total Complexity | 11 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class handller extends database |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * |
||
17 | */ |
||
18 | public function __construct(array $settings) |
||
19 | { |
||
20 | if(in_array($settings['type'],self::TYPES)){ |
||
21 | if($settings['type'] === 'Mysqli'){ |
||
22 | if(self::CheckParam($settings)){ |
||
23 | $db = new Mysqlidb([ |
||
24 | 'host' => $this->host, |
||
25 | 'username' => $this->username, |
||
26 | 'password' => $this->password, |
||
27 | 'db' => $this->dbname, |
||
28 | 'charset' => $this->charset |
||
29 | ]); |
||
30 | if($db){ |
||
31 | $this->connect = $db; |
||
32 | } else { |
||
33 | throw new \exception('a problem to connecting'); |
||
34 | } |
||
35 | } else { |
||
36 | throw new \exception('required parameters not found'); |
||
37 | } |
||
38 | } |
||
39 | if($settings['type'] === 'Json' and isset($settings['dbname'])){ |
||
40 | $this->type = $settings['type']; |
||
41 | $this->dbname = $settings['dbname']; |
||
42 | parent::Json_init(); |
||
43 | } else { |
||
44 | throw new \exception('parameter dbanme not found'); |
||
45 | } |
||
46 | } else { |
||
47 | throw new \exception('parameter type not found'); |
||
48 | } |
||
49 | } |
||
50 | |||
51 | private static function CheckParam(array $array){ |
||
61 | } |
||
62 | } |
||
63 | } |
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