Skip to content

Commit 8b3e4e3

Browse files
committed
style: break long lines
1 parent 35dc642 commit 8b3e4e3

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

system/Database/BaseConnection.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,11 @@ public function initialize()
421421
$this->connID = $this->connect($this->pConnect);
422422
} catch (Throwable $e) {
423423
$this->connID = false;
424-
$connectionErrors[] = sprintf('Main connection [%s]: %s', $this->DBDriver, $e->getMessage());
424+
$connectionErrors[] = sprintf(
425+
'Main connection [%s]: %s',
426+
$this->DBDriver,
427+
$e->getMessage()
428+
);
425429
log_message('error', 'Error connecting to the database: ' . $e);
426430
}
427431

@@ -442,7 +446,12 @@ public function initialize()
442446
// Try to connect
443447
$this->connID = $this->connect($this->pConnect);
444448
} catch (Throwable $e) {
445-
$connectionErrors[] = sprintf('Failover #%d [%s]: %s', ++$index, $this->DBDriver, $e->getMessage());
449+
$connectionErrors[] = sprintf(
450+
'Failover #%d [%s]: %s',
451+
++$index,
452+
$this->DBDriver,
453+
$e->getMessage()
454+
);
446455
log_message('error', 'Error connecting to the database: ' . $e);
447456
}
448457

system/Database/Postgre/Connection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ public function connect(bool $persistent = false)
7878
$this->connID = $persistent === true ? pg_pconnect($this->DSN) : pg_connect($this->DSN);
7979

8080
if ($this->connID !== false) {
81-
if ($persistent === true && pg_connection_status($this->connID) === PGSQL_CONNECTION_BAD && pg_ping($this->connID) === false
81+
if (
82+
$persistent === true
83+
&& pg_connection_status($this->connID) === PGSQL_CONNECTION_BAD
84+
&& pg_ping($this->connID) === false
8285
) {
8386
$error = pg_last_error($this->connID);
8487

0 commit comments

Comments
 (0)