1 | <?php |
||
12 | class DbalReader implements CountableReader |
||
13 | { |
||
14 | /** |
||
15 | * @var Connection |
||
16 | */ |
||
17 | private $connection; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $data; |
||
23 | |||
24 | /** |
||
25 | * @var Statement |
||
26 | */ |
||
27 | private $stmt; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $sql; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | private $params; |
||
38 | |||
39 | /** |
||
40 | * @var integer |
||
41 | */ |
||
42 | private $rowCount; |
||
43 | |||
44 | /** |
||
45 | * @var boolean |
||
46 | */ |
||
47 | private $rowCountCalculated = true; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | private $key; |
||
53 | |||
54 | /** |
||
55 | * @param Connection $connection |
||
56 | * @param string $sql |
||
57 | * @param array $params |
||
58 | */ |
||
59 | public function __construct(Connection $connection, $sql, array $params = []) |
||
65 | |||
66 | /** |
||
67 | * Do calculate row count? |
||
68 | * |
||
69 | * @param boolean $calculate |
||
70 | */ |
||
71 | public function setRowCountCalculated($calculate = true) |
||
75 | |||
76 | /** |
||
77 | * Is row count calculated? |
||
78 | * |
||
79 | * @return boolean |
||
80 | */ |
||
81 | public function isRowCountCalculated() |
||
85 | |||
86 | /** |
||
87 | * Set Query string with Parameters |
||
88 | * |
||
89 | * @param string $sql |
||
90 | * @param array $params |
||
91 | */ |
||
92 | public function setSql($sql, array $params = []) |
||
98 | |||
99 | /** |
||
100 | * Set SQL parameters |
||
101 | * |
||
102 | * @param array $params |
||
103 | */ |
||
104 | public function setSqlParameters(array $params) |
||
111 | |||
112 | /** |
||
113 | * {@inheritdoc} |
||
114 | */ |
||
115 | public function current() |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function next() |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function key() |
||
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | public function valid() |
||
152 | |||
153 | /** |
||
154 | * {@inheritdoc} |
||
155 | */ |
||
156 | public function rewind() |
||
167 | |||
168 | /** |
||
169 | * {@inheritdoc} |
||
170 | */ |
||
171 | public function count() |
||
186 | |||
187 | private function doCalcRowCount() |
||
194 | |||
195 | /** |
||
196 | * Prepare given statement |
||
197 | * |
||
198 | * @param string $sql |
||
199 | * @param array $params |
||
200 | * |
||
201 | * @return Statement |
||
202 | */ |
||
203 | private function prepare($sql, array $params) |
||
212 | } |
||
213 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..