Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function __construct($sql, array $bindings, $previous) |
||
39 | { |
||
40 | parent::__construct('', 0, $previous); |
||
41 | |||
42 | $this->sql = $sql; |
||
43 | $this->bindings = $bindings; |
||
44 | $this->code = $previous->getCode(); |
||
45 | $this->message = $this->formatMessage($sql, $bindings, $previous); |
||
46 | |||
47 | if ($previous instanceof \PDOException) { |
||
48 | $this->errorInfo = $previous->errorInfo; |
||
49 | } |
||
50 | } |
||
51 | |||
84 | } |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.