| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Connection |
||
| 18 | { |
||
| 19 | protected static DBALConnection|null $conn = null; |
||
| 20 | |||
| 21 | 1 | public static function reset() : void |
|
| 22 | { |
||
| 23 | 1 | self::$conn = null; |
|
| 24 | } |
||
| 25 | |||
| 26 | 3 | public static function get(array $params = null) : DBALConnection |
|
| 36 | } |
||
| 37 | |||
| 38 | public static function getNativeConnection() : PDO |
||
| 43 | } |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: