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