The expression return $statement could return the type true which is incompatible with the type-hinted return PDOStatement. Consider adding an additional type-check to rule them out.
Loading history...
39
}
40
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
}
51
52
8
public function queryValue(string $query, array $arguments = [], $defaultValue = null)