| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public static function new(?string $url = null) : self |
||
| 16 | { |
||
| 17 | if ($url !== null) { |
||
| 18 | return new self( |
||
| 19 | sprintf( |
||
| 20 | 'The options "driver" or "driverClass" are mandatory if a connection URL without scheme ' |
||
| 21 | . 'is given to DriverManager::getConnection(). Given URL "%s".', |
||
| 22 | $url |
||
| 23 | ) |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | |||
| 27 | return new self( |
||
| 28 | 'The options "driver" or "driverClass" are mandatory if no PDO ' |
||
| 29 | . 'instance is given to DriverManager::getConnection().' |
||
| 30 | ); |
||
| 33 |