aboutsummaryrefslogtreecommitdiff
path: root/app/views/index
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/views/index
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/views/index')
-rw-r--r--app/views/index/about.phtml9
-rw-r--r--app/views/index/global.phtml1
-rw-r--r--app/views/index/logs.phtml1
-rw-r--r--app/views/index/normal.phtml1
-rw-r--r--app/views/index/reader.phtml1
-rwxr-xr-xapp/views/index/rss.phtml1
-rw-r--r--app/views/index/tos.phtml1
7 files changed, 12 insertions, 3 deletions
diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml
index cd8cfcade..e25e9a119 100644
--- a/app/views/index/about.phtml
+++ b/app/views/index/about.phtml
@@ -1,6 +1,9 @@
-<?php if (FreshRSS_Auth::hasAccess()) {?>
-<?php $this->partial('aside_configure'); ?>
-<?php } ?>
+<?php
+ /** @var FreshRSS_View $this */
+ if (FreshRSS_Auth::hasAccess()) {
+ $this->partial('aside_configure');
+ }
+?>
<main class="post content">
<?php if (FreshRSS_Auth::hasAccess()) {?>
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml
index ce1132df5..ff5fceaed 100644
--- a/app/views/index/global.phtml
+++ b/app/views/index/global.phtml
@@ -1,4 +1,5 @@
<?php
+ /** @var FreshRSS_View $this */
$this->partial('nav_menu');
$class = '';
diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml
index bcdc5b073..a8e78810c 100644
--- a/app/views/index/logs.phtml
+++ b/app/views/index/logs.phtml
@@ -1,3 +1,4 @@
+<?php /** @var FreshRSS_View $this */ ?>
<main class="post content">
<div class="link-back-wrapper">
<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index 4adc7047e..eb388fad3 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -1,4 +1,5 @@
<?php
+/** @var FreshRSS_View $this */
$this->partial('aside_feed');
$this->partial('nav_menu');
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index 6b68ea08f..315d7d7aa 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -1,3 +1,4 @@
+<?php /** @var FreshRSS_View $this */ ?>
<?php
$this->partial('aside_feed');
$this->partial('nav_menu');
diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml
index 00be01c28..f0772cc86 100755
--- a/app/views/index/rss.phtml
+++ b/app/views/index/rss.phtml
@@ -1,3 +1,4 @@
+<?php /** @var FreshRSS_View $this */ ?>
<?= '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
diff --git a/app/views/index/tos.phtml b/app/views/index/tos.phtml
index f8240ed29..5e7f8ea58 100644
--- a/app/views/index/tos.phtml
+++ b/app/views/index/tos.phtml
@@ -1,3 +1,4 @@
+<?php /** @var FreshRSS_View $this */ ?>
<main class="post content">
<?php if ($this->can_register) { ?>
<a href="<?= _url('auth', 'register') ?>">