Conditions | 9 |
Paths | 9 |
Total Lines | 25 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 17 |
CRAP Score | 9 |
Changes | 0 |
1 | <?php |
||
36 | 614 | protected function internalExecute(string|null $rawSql): void |
|
37 | { |
||
38 | 614 | $attempt = 0; |
|
39 | |||
40 | 614 | while (true) { |
|
41 | try { |
||
42 | if ( |
||
43 | 614 | ++$attempt === 1 |
|
44 | 614 | && $this->isolationLevel !== null |
|
45 | 614 | && $this->db->getTransaction() === null |
|
46 | ) { |
||
47 | 1 | $this->db->transaction( |
|
48 | 1 | fn (ConnectionPDOInterface $db) => $this->internalExecute($rawSql), |
|
|
|||
49 | 1 | $this->isolationLevel |
|
50 | 1 | ); |
|
51 | } else { |
||
52 | 614 | $this->pdoStatement?->execute(); |
|
53 | } |
||
54 | 613 | break; |
|
55 | 30 | } catch (PDOException $e) { |
|
56 | 30 | $rawSql = $rawSql ?: $this->getRawSql(); |
|
57 | 30 | $e = (new ConvertException($e, $rawSql))->run(); |
|
58 | |||
59 | 30 | if ($this->retryHandler === null || !($this->retryHandler)($e, $attempt)) { |
|
60 | 30 | 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.