summaryrefslogtreecommitdiff
path: root/app/Models/DatabaseDAOPGSQL.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-07-07 22:36:27 +0200
committerGravatar GitHub <noreply@github.com> 2023-07-07 22:36:27 +0200
commitf8f163d054110f7e0ff6650fca146b474335f4bd (patch)
treedbd831e600bc76ca2830cd417bd52b712ff97309 /app/Models/DatabaseDAOPGSQL.php
parent7f9594b8c7d7799f2e5f89328bd5981410db8cf0 (diff)
Chore/processing of depreciations and updating code to php72 minimum (#5504)
* processing of depreciations and updating of code to php7.2 minimum * Autoformat many strange array indenting And revert a few unwanted changes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/DatabaseDAOPGSQL.php')
-rw-r--r--app/Models/DatabaseDAOPGSQL.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/DatabaseDAOPGSQL.php b/app/Models/DatabaseDAOPGSQL.php
index 29b16e3dc..7976d5e14 100644
--- a/app/Models/DatabaseDAOPGSQL.php
+++ b/app/Models/DatabaseDAOPGSQL.php
@@ -6,8 +6,8 @@
class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite {
//PostgreSQL error codes
- const UNDEFINED_COLUMN = '42703';
- const UNDEFINED_TABLE = '42P01';
+ public const UNDEFINED_COLUMN = '42703';
+ public const UNDEFINED_TABLE = '42P01';
public function tablesAreCorrect(): bool {
$db = FreshRSS_Context::$system_conf->db;
@@ -71,13 +71,13 @@ pg_total_relation_size('`{$this->pdo->prefix()}entrytag`')
SQL;
$res = $this->fetchColumn($sql, 0);
}
- return intval($res[0] ?? -1);
+ return (int)($res[0] ?? -1);
}
public function optimize(): bool {
$ok = true;
- $tables = array('category', 'feed', 'entry', 'entrytmp', 'tag', 'entrytag');
+ $tables = ['category', 'feed', 'entry', 'entrytmp', 'tag', 'entrytag'];
foreach ($tables as $table) {
$sql = 'VACUUM `_' . $table . '`';