Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class SqlsrvPDO extends \PDO |
||
12 | { |
||
13 | /** |
||
14 | * Returns value of the last inserted ID. |
||
15 | * |
||
16 | * SQLSERVER driver implements {@see PDO::lastInsertId()} method but with a single peculiarity: |
||
17 | * |
||
18 | * When `$sequence` value is a null or an empty string it returns an empty string. |
||
19 | * But when parameter is not specified it works as expected and returns actual |
||
20 | * last inserted ID (like the other PDO drivers). |
||
21 | * |
||
22 | * @param string|null $name the sequence name. Defaults to null. |
||
23 | * |
||
24 | * @return string last inserted ID value. |
||
25 | */ |
||
26 | public function lastInsertId(string $name = null): string |
||
31 |