From 5b28a35003a015e29770094932157f13a3f7f5c0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 9 Jun 2024 20:32:12 +0200 Subject: Pass PHPStan level 9 (#6544) * More PHPStan * More, passing * 4 more files * Update to PHPStan 1.11.4 Needed for fixed bug: Consider numeric-string types after string concat https://github.com/phpstan/phpstan/releases/tag/1.11.4 * Pass PHPStan level 9 Start tracking booleansInConditions * Fix mark as read * Fix doctype * ctype_digit --- app/views/helpers/index/article.phtml | 4 ++-- app/views/helpers/index/normal/entry_bottom.phtml | 8 ++++---- app/views/helpers/index/normal/entry_header.phtml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'app/views/helpers/index') diff --git a/app/views/helpers/index/article.phtml b/app/views/helpers/index/article.phtml index 56fd06b4f..bfdfdb8d1 100644 --- a/app/views/helpers/index/article.phtml +++ b/app/views/helpers/index/article.phtml @@ -10,11 +10,11 @@ 'entry', 'a' => 'bookmark', 'params' => ['id' => $entry->id()]]; if ($entry->isFavorite()) { - $favoriteUrl['params']['is_favorite'] = 0; + $favoriteUrl['params']['is_favorite'] = '0'; } $readUrl = ['c' => 'entry', 'a' => 'read', 'params' => ['id' => $entry->id()]]; if ($entry->isRead()) { - $readUrl['params']['is_read'] = 0; + $readUrl['params']['is_read'] = '0'; } ?>
diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index e5bfd7fd0..21bd1d355 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -12,9 +12,9 @@ if (FreshRSS_Auth::hasAccess()) { if ($bottomline_read) { ?>
  • 'entry', 'a' => 'read', 'params' => array('id' => $this->entry->id())); + $arUrl = ['c' => 'entry', 'a' => 'read', 'params' => ['id' => $this->entry->id()]]; if ($this->entry->isRead()) { - $arUrl['params']['is_read'] = 0; + $arUrl['params']['is_read'] = '0'; } ?>entry->isRead() ? 'read' : 'unread'); ?>
  • 'entry', 'a' => 'bookmark', 'params' => array('id' => $this->entry->id())); + $arUrl = ['c' => 'entry', 'a' => 'bookmark', 'params' => ['id' => $this->entry->id()]]; if ($this->entry->isFavorite()) { - $arUrl['params']['is_favorite'] = 0; + $arUrl['params']['is_favorite'] = '0'; } ?>entry->isFavorite() ? 'starred' : 'non-starred'); ?>
  • 'entry', 'a' => 'read', 'params' => array('id' => $this->entry->id())); + $arUrl = ['c' => 'entry', 'a' => 'read', 'params' => ['id' => $this->entry->id()]]; if ($this->entry->isRead()) { - $arUrl['params']['is_read'] = 0; + $arUrl['params']['is_read'] = '0'; } ?>entry->isRead() ? 'read' : 'unread'); ?>
  • 'entry', 'a' => 'bookmark', 'params' => array('id' => $this->entry->id())); + $arUrl = ['c' => 'entry', 'a' => 'bookmark', 'params' => ['id' => $this->entry->id()]]; if ($this->entry->isFavorite()) { - $arUrl['params']['is_favorite'] = 0; + $arUrl['params']['is_favorite'] = '0'; } ?>entry->isFavorite() ? 'starred' : 'non-starred'); ?>