| Conditions | 3 |
| Paths | 3 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function PDO() { |
||
| 34 | |||
| 35 | if(empty($this->conn)) { |
||
| 36 | |||
| 37 | try { |
||
| 38 | |||
| 39 | $this->conn = new PDO( |
||
| 40 | $this->config['driver'] . ":host=" . |
||
| 41 | $this->config['hostname'] . ";charset=" . |
||
| 42 | $this->config['charset'] . ";port=" . |
||
| 43 | $this->config['port'] . ";dbname=" . |
||
| 44 | $this->config['database'], |
||
| 45 | $this->config['username'], |
||
| 46 | $this->config['password'], |
||
| 47 | $this->config['options'] |
||
| 48 | ); |
||
| 49 | |||
| 50 | } catch(PDOException $exception) { |
||
| 51 | |||
| 52 | echo json_encode( |
||
| 53 | ['error' => |
||
| 54 | [ |
||
| 55 | 'message' => $exception->getMessage() |
||
| 56 | ] |
||
| 65 | } |
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