mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-24 15:18:40 +00:00
fix phpstan
This commit is contained in:
parent
0e5e967920
commit
b6c4f1e4bc
|
|
@ -72,7 +72,6 @@ final class MysqlConnection extends ConnectionAbstract
|
|||
}
|
||||
|
||||
$this->close();
|
||||
$this->prefix = $dbdata['prefix'] ?? '';
|
||||
|
||||
try {
|
||||
$this->con = new \PDO($this->dbdata['db'] . ':host=' . $this->dbdata['host'] . ':' . $this->dbdata['port'] . ';dbname=' . $this->dbdata['database'] . ';charset=utf8mb4', $this->dbdata['login'], $this->dbdata['password']);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ final class PostgresConnection extends ConnectionAbstract
|
|||
}
|
||||
|
||||
$this->close();
|
||||
$this->prefix = $dbdata['prefix'] ?? '';
|
||||
|
||||
try {
|
||||
$this->con = new \PDO($this->dbdata['db'] . ':host=' . $this->dbdata['host'] . ';port=' . $this->dbdata['port'] . ';dbname=' . $this->dbdata['database'], $this->dbdata['login'], $this->dbdata['password']);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ final class SQLiteConnection extends ConnectionAbstract
|
|||
}
|
||||
|
||||
$this->close();
|
||||
$this->prefix = $dbdata['prefix'] ?? '';
|
||||
|
||||
try {
|
||||
$this->con = new \PDO($this->dbdata['db'] . ':' . $this->dbdata['database']);
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@ final class SqlServerConnection extends ConnectionAbstract
|
|||
*/
|
||||
public function connect(array $dbdata = null) : void
|
||||
{
|
||||
$this->close();
|
||||
|
||||
$this->dbdata = $dbdata ?? $this->dbdata;
|
||||
|
||||
if (!isset($this->dbdata['db'], $this->dbdata['host'], $this->dbdata['port'], $this->dbdata['database'], $this->dbdata['login'], $this->dbdata['password'])
|
||||
|
|
@ -74,7 +72,6 @@ final class SqlServerConnection extends ConnectionAbstract
|
|||
}
|
||||
|
||||
$this->close();
|
||||
$this->prefix = $dbdata['prefix'] ?? '';
|
||||
|
||||
try {
|
||||
$this->con = new \PDO('sqlsrv:Server=' . $this->dbdata['host'] . ',' . $this->dbdata['port'] . ';Database=' . $this->dbdata['database'] . ';ConnectionPooling=0', $this->dbdata['login'], $this->dbdata['password']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user