Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 0 |
1 | <?php |
||
14 | class Connection extends PDOConnection |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | 41 | public function __construct($dsn, $user = null, $password = null, ?array $options = null) |
|
23 | 41 | } |
|
24 | |||
25 | /** |
||
26 | * {@inheritDoc} |
||
27 | */ |
||
28 | 3 | public function lastInsertId($name = null) |
|
29 | { |
||
30 | 3 | if ($name === null) { |
|
31 | 3 | return parent::lastInsertId($name); |
|
32 | } |
||
33 | |||
34 | 2 | $stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'); |
|
35 | 2 | $stmt->execute([$name]); |
|
36 | |||
37 | 2 | return $stmt->fetchColumn(); |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * {@inheritDoc} |
||
42 | */ |
||
43 | 30 | public function quote($value, $type = ParameterType::STRING) |
|
53 | } |
||
54 | } |
||
55 |