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