aboutsummaryrefslogtreecommitdiff
path: root/app/FreshRSS.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-12-31 17:00:51 +0100
committerGravatar GitHub <noreply@github.com> 2021-12-31 17:00:51 +0100
commit77e9877316fcfacb26799afdf32d94c8411da80e (patch)
tree7fd9c85bf4854054be6536c14d120bc8b790debe /app/FreshRSS.php
parent09c84fb3bc44bf8e45619c27acc15b967aea14ce (diff)
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
Diffstat (limited to 'app/FreshRSS.php')
-rw-r--r--app/FreshRSS.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 54caef3bc..64b8d13ae 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -24,6 +24,8 @@ class FreshRSS extends Minz_FrontController {
Minz_Session::init('FreshRSS');
}
+ Minz_ActionController::$viewType = 'FreshRSS_View';
+
FreshRSS_Context::initSystem();
if (FreshRSS_Context::$system_conf == null) {
$message = 'Error during context system init!';
@@ -105,7 +107,7 @@ class FreshRSS extends Minz_FrontController {
case '.js':
$theme_id = $theme['id'];
$filename = $file;
- Minz_View::prependScript(Minz_Url::display(FreshRSS::getThemeFileUrl($theme_id, $filename)));
+ FreshRSS_View::prependScript(Minz_Url::display(FreshRSS::getThemeFileUrl($theme_id, $filename)));
break;
case '.css':
default:
@@ -120,21 +122,21 @@ class FreshRSS extends Minz_FrontController {
$filename = substr($filename, 0, -4);
$filename = $filename . '.rtl.css';
}
- Minz_View::prependStyle(Minz_Url::display(FreshRSS::getThemeFileUrl($theme_id, $filename)));
+ FreshRSS_View::prependStyle(Minz_Url::display(FreshRSS::getThemeFileUrl($theme_id, $filename)));
}
}
}
//Use prepend to insert before extensions. Added in reverse order.
if (Minz_Request::controllerName() !== 'index') {
- Minz_View::prependScript(Minz_Url::display('/scripts/extra.js?' . @filemtime(PUBLIC_PATH . '/scripts/extra.js')));
+ FreshRSS_View::prependScript(Minz_Url::display('/scripts/extra.js?' . @filemtime(PUBLIC_PATH . '/scripts/extra.js')));
}
- Minz_View::prependScript(Minz_Url::display('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js')));
+ FreshRSS_View::prependScript(Minz_Url::display('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js')));
}
private static function loadNotifications() {
$notif = Minz_Request::getNotification();
if ($notif) {
- Minz_View::_param('notification', $notif);
+ FreshRSS_View::_param('notification', $notif);
}
}