| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.1481 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | */ |
||
| 21 | 42 | public function getSequenceNumber(string $name) : string |
|
| 22 | 42 | { |
|
| 23 | 42 | $stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'); |
|
| 24 | $stmt->execute([$name]); |
||
| 25 | |||
| 26 | $sequenceNumber = $stmt->fetchColumn(); |
||
| 27 | |||
| 28 | 3 | if ($sequenceNumber === false) { |
|
| 29 | throw new PDOException('No sequence with name "' . $name . '" found.'); |
||
| 30 | 3 | } |
|
| 58 |