| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 4 | protected function setTransactionIsolationLevel(string $level): void |
|
| 35 | { |
||
| 36 | 4 | match ($level) { |
|
| 37 | 4 | self::SERIALIZABLE => $this->db->createCommand('PRAGMA read_uncommitted = False;')->execute(), |
|
| 38 | 4 | self::READ_UNCOMMITTED => $this->db->createCommand('PRAGMA read_uncommitted = True;')->execute(), |
|
| 39 | 4 | default => throw new NotSupportedException( |
|
| 40 | 4 | self::class . ' only supports transaction isolation levels READ UNCOMMITTED and SERIALIZABLE.' |
|
| 41 | 4 | ), |
|
| 45 |