From f8f163d054110f7e0ff6650fca146b474335f4bd Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:36:27 +0200 Subject: 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 Co-authored-by: Alexandre Alapetite --- app/Models/DatabaseDAOPGSQL.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Models/DatabaseDAOPGSQL.php') 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 . '`'; -- cgit v1.2.3