From 77e9877316fcfacb26799afdf32d94c8411da80e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 31 Dec 2021 17:00:51 +0100 Subject: Add PHPStan (#4021) * Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug --- app/Controllers/subscriptionController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 5a89d0e08..c01e01843 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -44,8 +44,8 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { * It displays categories and associated feeds. */ public function indexAction() { - Minz_View::appendScript(Minz_Url::display('/scripts/category.js?' . @filemtime(PUBLIC_PATH . '/scripts/category.js'))); - Minz_View::prependTitle(_t('sub.title') . ' · '); + FreshRSS_View::appendScript(Minz_Url::display('/scripts/category.js?' . @filemtime(PUBLIC_PATH . '/scripts/category.js'))); + FreshRSS_View::prependTitle(_t('sub.title') . ' · '); $this->view->onlyFeedsWithError = Minz_Request::paramTernary('error'); @@ -104,7 +104,7 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { $feed = $this->view->feeds[$id]; $this->view->feed = $feed; - Minz_View::prependTitle(_t('sub.title.feed_management') . ' · ' . $feed->name() . ' · '); + FreshRSS_View::prependTitle(_t('sub.title.feed_management') . ' · ' . $feed->name() . ' · '); if (Minz_Request::isPost()) { $user = trim(Minz_Request::param('http_user_feed' . $id, '')); @@ -282,13 +282,13 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { * This action displays the bookmarklet page. */ public function bookmarkletAction() { - Minz_View::prependTitle(_t('sub.title.subscription_tools') . ' . '); + FreshRSS_View::prependTitle(_t('sub.title.subscription_tools') . ' . '); } /** * This action displays the page to add a new feed */ public function addAction() { - Minz_View::prependTitle(_t('sub.title.add') . ' . '); + FreshRSS_View::prependTitle(_t('sub.title.add') . ' . '); } } -- cgit v1.2.3