| Conditions | 4 |
| Paths | 4 |
| Total Lines | 25 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4.0378 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 1 | } |
|
| 20 | |||
| 21 | 1 | /** |
|
| 22 | 1 | * @psalm-suppress UnusedClosureParam |
|
| 23 | 1 | * |
|
| 24 | * @throws Throwable |
||
| 25 | 1 | */ |
|
| 26 | protected function internalExecute(string|null $rawSql): void |
||
| 27 | { |
||
| 28 | $attempt = 0; |
||
| 29 | 1 | ||
| 30 | 1 | while (true) { |
|
| 31 | try { |
||
| 32 | 1 | if ( |
|
| 33 | 1 | ++$attempt === 1 |
|
| 34 | 1 | && $this->isolationLevel !== null |
|
| 35 | 1 | && $this->db->getTransaction() === null |
|
| 36 | 1 | ) { |
|
| 37 | $this->db->transaction( |
||
| 38 | fn (ConnectionPDOInterface $db) => $this->internalExecute($rawSql), |
||
|
|
|||
| 39 | $this->isolationLevel, |
||
| 40 | ); |
||
| 41 | } else { |
||
| 42 | $this->pdoStatement?->execute(); |
||
| 43 | 1 | } |
|
| 44 | break; |
||
| 56 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.