1 | <?php |
||
18 | class Pdo |
||
19 | { |
||
20 | /** |
||
21 | * Logger |
||
22 | * |
||
23 | * @var Logger |
||
24 | */ |
||
25 | protected $logger; |
||
26 | |||
27 | |||
28 | /** |
||
29 | * Dsn |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $dsn = 'mysql:host=localhost;dbname=mysql'; |
||
34 | |||
35 | |||
36 | /** |
||
37 | * Username |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $username = 'root'; |
||
42 | |||
43 | |||
44 | /** |
||
45 | * Password |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $password = ''; |
||
50 | |||
51 | |||
52 | /** |
||
53 | * Driver specific options |
||
54 | * |
||
55 | * @var array |
||
56 | */ |
||
57 | protected $options = []; |
||
58 | |||
59 | |||
60 | /** |
||
61 | * Connection resource |
||
62 | * |
||
63 | * @var resource |
||
64 | */ |
||
65 | protected $connection; |
||
66 | |||
67 | |||
68 | /** |
||
69 | * Last inserted id |
||
70 | * |
||
71 | * @var array |
||
72 | */ |
||
73 | protected $last_inserted_ids; |
||
74 | |||
75 | |||
76 | /** |
||
77 | * construct |
||
78 | * |
||
79 | * @param Iterable $config |
||
80 | * @param LoggerInterface $logger |
||
81 | */ |
||
82 | public function __construct(? Iterable $config, LoggerInterface $logger) |
||
87 | |||
88 | |||
89 | /** |
||
90 | * Connect |
||
91 | * |
||
92 | * @return Pdo |
||
93 | */ |
||
94 | public function connect(): Pdo |
||
103 | |||
104 | |||
105 | /** |
||
106 | * Forward calls |
||
107 | * |
||
108 | * @param array $method |
||
109 | * @param array $arguments |
||
110 | * @return mixed |
||
111 | */ |
||
112 | public function __call(string $method, array $arguments = []) |
||
116 | |||
117 | |||
118 | /** |
||
119 | * Set options |
||
120 | * |
||
121 | * @param Iterable $config |
||
122 | * @return Pdo |
||
123 | */ |
||
124 | public function setOptions(? Iterable $config = null) : Pdo |
||
153 | |||
154 | |||
155 | /** |
||
156 | * Get connection |
||
157 | * |
||
158 | * @return resource |
||
159 | */ |
||
160 | public function getResource() |
||
168 | |||
169 | |||
170 | /** |
||
171 | * Query |
||
172 | * |
||
173 | * @param string $query |
||
174 | * @return PDOStatement |
||
175 | */ |
||
176 | public function select(string $query): PDOStatement |
||
191 | |||
192 | |||
193 | /** |
||
194 | * Select query |
||
195 | * |
||
196 | * @param string $query |
||
197 | * @return bool |
||
198 | */ |
||
199 | public function query(string $query): bool |
||
218 | |||
219 | |||
220 | /** |
||
221 | * Prepare query |
||
222 | * |
||
223 | * @param string $query |
||
224 | * @param Iterable $values |
||
225 | * @return mysqli_stmt |
||
226 | */ |
||
227 | public function prepare(string $query, Iterable $values): mysqli_stmt |
||
251 | } |
||
252 |
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..