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