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 <l.sanchez-prestataire@alptis.fr>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
Luc SANCHEZ
2024-11-28 17:11:04 +01:00
committed by GitHub
parent 604b186638
commit 15745d42b7
81 changed files with 532 additions and 680 deletions

View File

@@ -343,7 +343,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
// We try to get more information about the feed.
$this->view->feed->load(true);
$this->view->load_ok = true;
} catch (Exception $e) {
} catch (Exception) {
$this->view->load_ok = false;
}
@@ -793,9 +793,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
private static function applyLabelActions(int $nbNewEntries): int|false {
$tagDAO = FreshRSS_Factory::createTagDao();
$labels = FreshRSS_Context::labels();
$labels = array_filter($labels, static function (FreshRSS_Tag $label) {
return !empty($label->filtersAction('label'));
});
$labels = array_filter($labels, static fn(FreshRSS_Tag $label) => !empty($label->filtersAction('label')));
if (count($labels) <= 0) {
return 0;
}
@@ -1203,7 +1201,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$this->view->selectorSuccess = false;
$this->view->htmlContent = $entry->content(false);
}
} catch (Exception $e) {
} catch (Exception) {
$this->view->fatalError = _t('feedback.sub.feed.selector_preview.http_error');
}
}