| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Connection |
||
| 18 | { |
||
| 19 | protected static DBALConnection|null $conn = null; |
||
| 20 | 1 | ||
| 21 | public static function reset() : void |
||
| 22 | 1 | { |
|
| 23 | self::$conn = null; |
||
| 24 | } |
||
| 25 | 3 | ||
| 26 | 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: