1 | <?php |
||
10 | class DbalReader implements CountableReader |
||
11 | { |
||
12 | /** |
||
13 | * @var Connection |
||
14 | */ |
||
15 | private $connection; |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | private $data; |
||
21 | |||
22 | /** |
||
23 | * @var Statement |
||
24 | */ |
||
25 | private $stmt; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $sql; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | private $params; |
||
36 | |||
37 | /** |
||
38 | * @var integer |
||
39 | */ |
||
40 | private $rowCount; |
||
41 | |||
42 | /** |
||
43 | * @var boolean |
||
44 | */ |
||
45 | private $rowCountCalculated = true; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | private $key; |
||
51 | |||
52 | /** |
||
53 | * @param Connection $connection |
||
54 | * @param string $sql |
||
55 | * @param array $params |
||
56 | */ |
||
57 | 11 | public function __construct(Connection $connection, $sql, array $params = []) |
|
63 | |||
64 | /** |
||
65 | * Do calculate row count? |
||
66 | * |
||
67 | * @param boolean $calculate |
||
68 | */ |
||
69 | 2 | public function setRowCountCalculated($calculate = true) |
|
73 | |||
74 | /** |
||
75 | * Is row count calculated? |
||
76 | * |
||
77 | * @return boolean |
||
78 | */ |
||
79 | 1 | public function isRowCountCalculated() |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 3 | public function getFields() |
|
98 | |||
99 | /** |
||
100 | * Set Query string with Parameters |
||
101 | * |
||
102 | * @param string $sql |
||
103 | * @param array $params |
||
104 | */ |
||
105 | 11 | public function setSql($sql, array $params = []) |
|
111 | |||
112 | /** |
||
113 | * Set SQL parameters |
||
114 | * |
||
115 | * @param array $params |
||
116 | */ |
||
117 | 11 | public function setSqlParameters(array $params) |
|
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | 3 | public function current() |
|
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | 2 | public function next() |
|
145 | |||
146 | /** |
||
147 | * {@inheritdoc} |
||
148 | */ |
||
149 | 1 | public function key() |
|
153 | |||
154 | /** |
||
155 | * {@inheritdoc} |
||
156 | */ |
||
157 | 3 | public function valid() |
|
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | */ |
||
169 | 8 | public function rewind() |
|
180 | |||
181 | /** |
||
182 | * {@inheritdoc} |
||
183 | */ |
||
184 | 3 | public function count() |
|
199 | |||
200 | 2 | private function doCalcRowCount() |
|
207 | |||
208 | /** |
||
209 | * Prepare given statement |
||
210 | * |
||
211 | * @param string $sql |
||
212 | * @param array $params |
||
213 | * |
||
214 | * @return Statement |
||
215 | */ |
||
216 | 9 | private function prepare($sql, array $params) |
|
225 | } |
||
226 |
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..