diff options
| author | 2023-05-11 13:02:04 +0200 | |
|---|---|---|
| committer | 2023-05-11 13:02:04 +0200 | |
| commit | 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 (patch) | |
| tree | 7ba9f5aebb01d12045b9067a86b5060ba13dca18 /app/views | |
| parent | fe7d9bbcd68660a59b813346c236b61b25a51c80 (diff) | |
A few additional PHPStan rules (#5388)
A subset of
https://github.com/phpstan/phpstan-strict-rules
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/auth/index.phtml | 2 | ||||
| -rwxr-xr-x | app/views/helpers/logs_pagination.phtml | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/views/auth/index.phtml b/app/views/auth/index.phtml index a18ab49e2..45183592a 100644 --- a/app/views/auth/index.phtml +++ b/app/views/auth/index.phtml @@ -16,7 +16,7 @@ <label class="group-name" for="auth_type"><?= _t('admin.auth.type') ?></label> <div class="group-controls"> <select id="auth_type" name="auth_type" required="required" data-leave-validation="<?= FreshRSS_Context::$system_conf->auth_type ?>"> - <?php if (!in_array(FreshRSS_Context::$system_conf->auth_type, array('form', 'http_auth', 'none'))) { ?> + <?php if (!in_array(FreshRSS_Context::$system_conf->auth_type, ['form', 'http_auth', 'none'], true)) { ?> <option selected="selected"></option> <?php } ?> <option value="form"<?= FreshRSS_Context::$system_conf->auth_type === 'form' ? ' selected="selected"' : '', diff --git a/app/views/helpers/logs_pagination.phtml b/app/views/helpers/logs_pagination.phtml index c7b9ca0ca..c9f18dc07 100755 --- a/app/views/helpers/logs_pagination.phtml +++ b/app/views/helpers/logs_pagination.phtml @@ -18,13 +18,13 @@ <?php $params[$getteur] = $this->currentPage - 1; ?> - + <li class="item pager-previous"> <?php if ($this->currentPage > 1) { ?> <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">‹ <?= _t('conf.logs.pagination.previous') ?></a> <?php } ?> </li> - + <?php if ($this->currentPage - 2 > 1) { ?> <li class="item">…</a></li> @@ -32,7 +32,7 @@ <?php for ($i = $this->currentPage - 2; $i <= $this->currentPage + 2; $i++) { - if($i > 0 && $i <= $this->nbPage) { + if ($i > 0 && $i <= $this->nbPage) { $params[$getteur] = $i; if ($i != $this->currentPage) { $class = ''; @@ -46,18 +46,18 @@ } } ?> - <?php if ($this->nbPage > $i - 1) { ?> + <?php if ($this->nbPage > $this->currentPage + 2) { ?> <li class="item">…</a></li> <?php } ?> <?php $params[$getteur] = $this->currentPage + 1; ?> - + <li class="item pager-next"> <?php if ($this->currentPage < $this->nbPage) { ?> <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('conf.logs.pagination.next') ?> ›</a> <?php } ?> </li> - + <?php $params[$getteur] = $this->nbPage; ?> <li class="item pager-last"> <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('conf.logs.pagination.last') ?> »</a> |
