Skip to content

Commit a8d0783

Browse files
committed
Add and update array shape of config methods
1 parent 486800a commit a8d0783

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/Database.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,23 @@ protected function log(string $message, LogLevel $level = LogLevel::ERROR) : voi
112112
*
113113
* @return array<string,mixed>
114114
*/
115+
#[ArrayShape([
116+
'host' => 'string',
117+
'port' => 'int',
118+
'username' => 'string|null',
119+
'password' => 'string|null',
120+
'schema' => 'string|null',
121+
'socket' => 'string|null',
122+
'persistent' => 'bool',
123+
'engine' => 'string',
124+
'charset' => 'string',
125+
'collation' => 'string',
126+
'timezone' => 'string',
127+
'ssl' => 'array',
128+
'failover' => 'array',
129+
'options' => 'array',
130+
'report' => 'int',
131+
])]
115132
protected function makeConfig(array $config) : array
116133
{
117134
return \array_replace_recursive([
@@ -308,6 +325,7 @@ public function reconnect() : static
308325
'password' => 'string|null',
309326
'schema' => 'string|null',
310327
'socket' => 'string|null',
328+
'persistent' => 'bool',
311329
'engine' => 'string',
312330
'charset' => 'string',
313331
'collation' => 'string',

0 commit comments

Comments
 (0)