Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.3332 |
Changes | 0 |
1 | <?php |
||
41 | 20 | public function executePrepared(string $query, array $arguments = [], string $exceptionMessage = ''): PDOStatement |
|
42 | { |
||
43 | 20 | $statement = $this->preparedStatements($query); |
|
44 | 20 | if (! $statement->execute($arguments)) { |
|
45 | $exceptionMessage = $exceptionMessage ? : 'Error retrieving data from database'; |
||
46 | throw new PersistenceException($exceptionMessage); |
||
47 | } |
||
48 | |||
49 | 20 | return $statement; |
|
50 | } |
||
63 |