1 | <?php |
||
7 | class EmulatedStatement extends Statement |
||
8 | { |
||
9 | /** |
||
10 | * @inheritDoc |
||
11 | */ |
||
12 | public function __construct(MysqliAdapter $connection, array $values = null, $queryString) |
||
18 | |||
19 | /** |
||
20 | * @inheritDoc |
||
21 | */ |
||
22 | public function getWrappedStatement() |
||
26 | |||
27 | /** |
||
28 | * @inheritDoc |
||
29 | */ |
||
30 | public function bind(): void |
||
34 | |||
35 | /** |
||
36 | * @return string |
||
37 | */ |
||
38 | public function getRunnableQuery() |
||
45 | |||
46 | /** |
||
47 | * @inheritDoc |
||
48 | */ |
||
49 | public function createResult(): ResultInterface |
||
55 | } |
||
56 |
Our type inference engine has found an assignment of a scalar value (like a string, an integer or null) to a property which is an array.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.
To type hint that a parameter can be either an array or null, you can set a type hint of array and a default value of null. The PHP interpreter will then accept both an array or null for that parameter.
The function can be called with either null or an array for the parameter
$needle
but will only accept an array as$haystack
.