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