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