Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
16 | 4 | public function lastInsertId(?string $name = null) : string |
|
17 | { |
||
18 | 4 | if ($name !== null) { |
|
19 | // SQLite does not support sequences. However, PDO::lastInsertId() ignores the name parameter, and returns |
||
20 | // the last insert ID even if a sequence name is given. We expect an exception in that case. |
||
21 | 1 | throw new DriverException('SQLite does not support sequences.'); |
|
22 | } |
||
23 | |||
24 | 3 | return parent::lastInsertId(); |
|
25 | } |
||
27 |