1 | <?php |
||
19 | class PDOConnection implements ConnectionInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var \PDO $wrappedConnection |
||
23 | */ |
||
24 | private $wrappedConnection; |
||
25 | |||
26 | /** |
||
27 | * @param \PDO $connection |
||
28 | */ |
||
29 | 1 | public function __construct(\PDO $connection) |
|
33 | |||
34 | /** |
||
35 | * @return \PDO |
||
36 | */ |
||
37 | public function getWrappedConnection() |
||
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | 1 | public function prepareStatement($SQL, $parameters = []) |
|
56 | } |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.