| Conditions | 2 |
| Paths | 3 |
| Total Lines | 28 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public static function get(array $setting) |
||
| 32 | { |
||
| 33 | $instance = null; |
||
| 34 | |||
| 35 | try { |
||
| 36 | |||
| 37 | // Create a PDO instance. |
||
| 38 | $pdoInstance = new PDO( |
||
| 39 | 'mysql:host=' |
||
| 40 | . $setting['host'] . ';dbname=' |
||
| 41 | . $setting['dbname'] . ';charset=' |
||
| 42 | . $setting['charset'] |
||
| 43 | , (string) $setting['user'] |
||
| 44 | , (string) $setting['pass'] |
||
| 45 | ); |
||
| 46 | |||
| 47 | // Use MySQL data driver. |
||
| 48 | $instance = new MysqlDriver($pdoInstance); |
||
| 49 | |||
| 50 | // @codeCoverageIgnoreStart |
||
| 51 | |||
| 52 | } catch(PDOException $e) { |
||
| 53 | echo $e->getMessage(); |
||
| 54 | } |
||
| 55 | |||
| 56 | // @codeCoverageIgnoreEnd |
||
| 57 | |||
| 58 | return $instance; |
||
| 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