| Total Complexity | 5 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class Connection extends PDOConnection |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * {@inheritDoc} |
||
| 19 | */ |
||
| 20 | public function lastInsertId($name = null) |
||
| 21 | { |
||
| 22 | if ($name === null) { |
||
| 23 | return parent::lastInsertId($name); |
||
| 24 | } |
||
| 25 | |||
| 26 | $stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'); |
||
| 27 | $stmt->execute([$name]); |
||
| 28 | |||
| 29 | return $stmt->fetchColumn(); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritDoc} |
||
| 34 | */ |
||
| 35 | public function quote(string $input) : string |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritDoc} |
||
| 49 | */ |
||
| 50 | protected function createStatement(\PDOStatement $stmt) : PDOStatement |
||
| 53 | } |
||
| 54 | } |
||
| 55 |