1 | <?php |
||
14 | class Database extends BaseEventEmitter implements DatabaseInterface |
||
15 | { |
||
16 | use LoopAwareTrait; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | const STATE_INIT = 0; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | const STATE_CONNECT_PENDING = 4; |
||
27 | |||
28 | /** |
||
29 | * @var int |
||
30 | */ |
||
31 | const STATE_CONNECT_FAILED = 2; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | const STATE_CONNECT_SUCCEEDED = 6; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | const STATE_AUTH_PENDING = 5; |
||
42 | |||
43 | /** |
||
44 | * @var int |
||
45 | */ |
||
46 | const STATE_AUTH_FAILED = 3; |
||
47 | |||
48 | /** |
||
49 | * @var int |
||
50 | */ |
||
51 | const STATE_AUTH_SUCCEEDED = 7; |
||
52 | |||
53 | /** |
||
54 | * @var int |
||
55 | */ |
||
56 | const STATE_DISCONNECT_PENDING = 8; |
||
57 | |||
58 | /** |
||
59 | * @var int |
||
60 | */ |
||
61 | const STATE_DISCONNECT_SUCCEEDED = 1; |
||
62 | |||
63 | /** |
||
64 | * @var mixed[] |
||
65 | */ |
||
66 | protected $config; |
||
67 | |||
68 | /** |
||
69 | * @var int |
||
70 | */ |
||
71 | protected $state; |
||
72 | |||
73 | /** |
||
74 | * @var Connector |
||
75 | */ |
||
76 | protected $connector; |
||
77 | |||
78 | /** |
||
79 | * @param LoopInterface $loop |
||
80 | * @param mixed[] $config |
||
81 | */ |
||
82 | public function __construct(LoopInterface $loop, $config = []) |
||
88 | |||
89 | /** |
||
90 | * @override |
||
91 | * @inheritDoc |
||
92 | */ |
||
93 | public function isPaused() |
||
98 | |||
99 | /** |
||
100 | * @override |
||
101 | * @inheritDoc |
||
102 | */ |
||
103 | public function pause() |
||
107 | |||
108 | /** |
||
109 | * @override |
||
110 | * @inheritDoc |
||
111 | */ |
||
112 | public function resume() |
||
116 | |||
117 | /** |
||
118 | * @override |
||
119 | * @inheritDoc |
||
120 | */ |
||
121 | public function isStarted() |
||
125 | |||
126 | /** |
||
127 | * @override |
||
128 | * @inheritDoc |
||
129 | */ |
||
130 | public function start($conn = 'default') |
||
147 | |||
148 | /** |
||
149 | * @override |
||
150 | * @inheritDoc |
||
151 | */ |
||
152 | public function stop() |
||
161 | |||
162 | /** |
||
163 | * @override |
||
164 | * @inheritDoc |
||
165 | */ |
||
166 | public function getState() |
||
170 | |||
171 | /** |
||
172 | * @inheritDoc |
||
173 | */ |
||
174 | public function getInfo() |
||
178 | |||
179 | /** |
||
180 | * @inheritDoc |
||
181 | */ |
||
182 | public function setDatabase($dbname) |
||
186 | |||
187 | /** |
||
188 | * @inheritDoc |
||
189 | */ |
||
190 | public function getDatabase() |
||
194 | |||
195 | /** |
||
196 | * @inheritDoc |
||
197 | */ |
||
198 | public function beginTransaction() |
||
212 | |||
213 | /** |
||
214 | * @inheritDoc |
||
215 | */ |
||
216 | public function endTransaction(TransactionInterface $trans) |
||
220 | |||
221 | /** |
||
222 | * @inheritDoc |
||
223 | */ |
||
224 | public function inTransaction() |
||
228 | |||
229 | public function getConnection() |
||
233 | |||
234 | |||
235 | /** |
||
236 | * Create configuration file. |
||
237 | * |
||
238 | * @param mixed[] $config |
||
239 | * @return mixed[] |
||
240 | */ |
||
241 | protected function createConfig($config = []) |
||
260 | } |
||
261 |
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..