From 15745d42b779ad14efde2932ab116f45eee39246 Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:11:04 +0100 Subject: Upgrade code to php 8.1 (#6748) * revert Fix code indentation Fix code Upgrade code to php 8.1 * fix remarques * code review * code review * code review * Apply suggestions from code review * code review * Fixes * Many remainging updates of array syntax * Lost case 'reading-list' * Uneeded PHPDoc --------- Co-authored-by: Luc Sanchez Co-authored-by: Alexandre Alapetite --- app/views/helpers/export/articles.phtml | 8 ++++---- app/views/helpers/feed/update.phtml | 4 ++-- app/views/helpers/javascript_vars.phtml | 30 +++++++++++++++--------------- app/views/helpers/logs_pagination.phtml | 10 +++++----- 4 files changed, 26 insertions(+), 26 deletions(-) (limited to 'app/views/helpers') diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index f62573dd4..20001fb59 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -5,18 +5,18 @@ $username = Minz_User::name() ?? Minz_User::INTERNAL_USER; $options = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; -$articles = array( +$articles = [ 'id' => 'user/' . str_replace('/', '', $username) . '/state/org.freshrss/' . $this->type, 'title' => $this->list_title, 'author' => $username, - 'items' => array(), -); + 'items' => [], +]; echo rtrim(json_encode($articles, $options) ?: '', " ]}\n\r\t"), "\n"; $first = true; if (empty($this->entryIdsTagNames)) { - $this->entryIdsTagNames = array(); + $this->entryIdsTagNames = []; } foreach ($this->entries as $entry) { diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index c9f8fea62..b6ae16f34 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -129,11 +129,11 @@