Conditions | 4 |
Paths | 6 |
Total Lines | 22 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | public function bindParam( |
||
41 | int|string $name, |
||
42 | mixed &$value, |
||
43 | ?int $dataType = null, |
||
44 | ?int $length = null, |
||
45 | mixed $driverOptions = null |
||
46 | ): static { |
||
47 | $this->prepare(); |
||
|
|||
48 | |||
49 | if ($dataType === null) { |
||
50 | $dataType = $this->queryBuilder()->schema()->getPdoType($value); |
||
51 | } |
||
52 | |||
53 | if ($length === null) { |
||
54 | $this->pdoStatement?->bindParam($name, $value, $dataType); |
||
55 | } elseif ($driverOptions === null) { |
||
56 | $this->pdoStatement?->bindParam($name, $value, $dataType, $length); |
||
57 | } else { |
||
58 | $this->pdoStatement?->bindParam($name, $value, $dataType, $length, $driverOptions); |
||
59 | } |
||
60 | |||
61 | return $this; |
||
62 | } |
||
64 |