| Conditions | 9 |
| Paths | 9 |
| Total Lines | 25 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 17 |
| CRAP Score | 9 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 259 | protected function internalExecute(string|null $rawSql): void |
|
| 32 | { |
||
| 33 | 259 | $attempt = 0; |
|
| 34 | |||
| 35 | 259 | while (true) { |
|
| 36 | try { |
||
| 37 | if ( |
||
| 38 | 259 | ++$attempt === 1 |
|
| 39 | 259 | && $this->isolationLevel !== null |
|
| 40 | 259 | && $this->db->getTransaction() === null |
|
| 41 | ) { |
||
| 42 | 1 | $this->db->transaction( |
|
| 43 | 1 | fn (ConnectionPDOInterface $db) => $this->internalExecute($rawSql), |
|
|
|
|||
| 44 | 1 | $this->isolationLevel |
|
| 45 | 1 | ); |
|
| 46 | } else { |
||
| 47 | 259 | $this->pdoStatement?->execute(); |
|
| 48 | } |
||
| 49 | 259 | break; |
|
| 50 | 8 | } catch (Exception $e) { |
|
| 51 | 8 | $rawSql = $rawSql ?: $this->getRawSql(); |
|
| 52 | 8 | $e = (new ConvertException($e, $rawSql))->run(); |
|
| 53 | |||
| 54 | 8 | if ($this->retryHandler === null || !($this->retryHandler)($e, $attempt)) { |
|
| 55 | 8 | throw $e; |
|
| 56 | } |
||
| 61 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.