| Total Complexity | 13 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Dbal |
||
| 6 | { |
||
| 7 | private $conn; |
||
| 8 | |||
| 9 | public function __construct(?Connection $conn) |
||
| 10 | { |
||
| 11 | $this->conn = $conn ?? new Connection(); |
||
| 12 | } |
||
| 13 | |||
| 14 | public function beginTransaction() |
||
| 15 | { |
||
| 16 | return $this->conn->beginTransaction(); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function commit() |
||
| 20 | { |
||
| 21 | return $this->conn->commit(); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function exec(string $statement) |
||
| 27 | } |
||
| 28 | |||
| 29 | public function lastInsertId(string $name = null) |
||
| 30 | { |
||
| 31 | return $this->conn->lastInsertId($name); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function prepare(string $statement, array $driverOptions = []) |
||
| 35 | { |
||
| 36 | return $this->conn->prepare($statement, $driverOptions); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function query(string $statement, int $fetch = null, $arg3 = null, $arg4 = null) |
||
| 47 | } |
||
| 48 | |||
| 49 | public function rollback($param) |
||
| 50 | { |
||
| 51 | return $this->conn->rollback(); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: