1 | <?php |
||
19 | class Mysql |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Logger |
||
24 | * |
||
25 | * @var Logger |
||
26 | */ |
||
27 | protected $logger; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Host |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $host = 'localhost'; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Port |
||
40 | * |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $port = 3306; |
||
44 | |||
45 | |||
46 | /** |
||
47 | * Username |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $username = 'root'; |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Password |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | protected $password = ''; |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Database |
||
64 | * |
||
65 | * @var string |
||
66 | */ |
||
67 | protected $database = ''; |
||
68 | |||
69 | |||
70 | /** |
||
71 | * Charset |
||
72 | * |
||
73 | * @var string |
||
74 | */ |
||
75 | protected $charset = 'utf8'; |
||
76 | |||
77 | |||
78 | /** |
||
79 | * Connection resource |
||
80 | * |
||
81 | * @var resource |
||
82 | */ |
||
83 | protected $connection; |
||
84 | |||
85 | |||
86 | /** |
||
87 | * Last inserted id |
||
88 | * |
||
89 | * @var array |
||
90 | */ |
||
91 | protected $last_inserted_ids; |
||
92 | |||
93 | |||
94 | /** |
||
95 | * construct |
||
96 | * |
||
97 | * @param Iterable $config |
||
98 | * @param LoggerInterface $logger |
||
99 | */ |
||
100 | public function __construct(? Iterable $config, LoggerInterface $logger) |
||
105 | |||
106 | |||
107 | /** |
||
108 | * Connect |
||
109 | * |
||
110 | * @return Mysql |
||
111 | */ |
||
112 | public function connect(): Mysql |
||
127 | |||
128 | |||
129 | /** |
||
130 | * Forward calls |
||
131 | * |
||
132 | * @param array $method |
||
133 | * @param array $arguments |
||
134 | * @return mixed |
||
135 | */ |
||
136 | public function __call(string $method, array $arguments = []) |
||
140 | |||
141 | |||
142 | /** |
||
143 | * Set options |
||
144 | * |
||
145 | * @param Iterable $config |
||
146 | * @return Mysql |
||
147 | */ |
||
148 | public function setOptions(? Iterable $config = null) : Mysql |
||
181 | |||
182 | |||
183 | /** |
||
184 | * Get connection |
||
185 | * |
||
186 | * @return resource |
||
187 | */ |
||
188 | public function getResource() |
||
196 | |||
197 | |||
198 | /** |
||
199 | * Query |
||
200 | * |
||
201 | * @param string $query |
||
202 | * @return mysqli_result |
||
203 | */ |
||
204 | public function select(string $query): mysqli_result |
||
219 | |||
220 | |||
221 | /** |
||
222 | * Select query |
||
223 | * |
||
224 | * @param string $query |
||
225 | * @return bool |
||
226 | */ |
||
227 | public function query(string $query): bool |
||
242 | |||
243 | |||
244 | /** |
||
245 | * Prepare query |
||
246 | * |
||
247 | * @param string $query |
||
248 | * @param Iterable $values |
||
249 | * @return mysqli_stmt |
||
250 | */ |
||
251 | public function prepare(string $query, Iterable $values): mysqli_stmt |
||
279 | } |
||
280 |
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..