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