Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 81.82% |
Changes | 0 |
1 | <?php |
||
17 | class Connection |
||
18 | { |
||
19 | protected static ?PDO $conn = null; |
||
20 | |||
21 | 1 | public static function reset() : void |
|
22 | { |
||
23 | 1 | self::$conn = null; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @throws ConnectionException |
||
28 | */ |
||
29 | 3 | public static function get(?PDO $pdo = null) : PDO |
|
30 | { |
||
31 | 3 | if(self::$conn instanceof PDO) { |
|
32 | 1 | return self::$conn; |
|
33 | } |
||
34 | 3 | if($pdo instanceof PDO) { |
|
35 | 2 | self::$conn = $pdo; |
|
36 | 2 | return self::$conn; |
|
37 | } |
||
38 | 2 | ConnectionException::undefined(); |
|
39 | } |
||
40 | |||
41 | public static function getNativeConnection() : PDO |
||
44 | } |
||
45 | |||
46 | } |
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