diff options
| author | 2021-02-28 12:26:24 +0100 | |
|---|---|---|
| committer | 2021-02-28 12:26:24 +0100 | |
| commit | 947e918f05d70d5dce4efa4ef403e593581c3fa9 (patch) | |
| tree | e66ef1ffe8a6cc0ffbea1bff1791588f72879637 /app/views/index | |
| parent | bf2718cada964fba66d8497592abcb73cb9520ba (diff) | |
Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length
* Also check whitespace in CSS files
* Fix line length ext.php
* More syntax, string templates
* Fix exclude-pattern
* Test JS files as well
Diffstat (limited to 'app/views/index')
| -rw-r--r-- | app/views/index/global.phtml | 6 | ||||
| -rw-r--r-- | app/views/index/logs.phtml | 6 | ||||
| -rw-r--r-- | app/views/index/normal.phtml | 16 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 8 |
4 files changed, 24 insertions, 12 deletions
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index af16a0bfa..e286d0946 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -27,7 +27,8 @@ if (!empty($feeds)) { ?> <div class="box category" data-unread="<?= $cat->nbNotRead() ?>"> - <div class="box-title"><a class="title" data-unread="<?= format_number($cat->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $cat->name() ?></a></div> + <div class="box-title"><a class="title" data-unread="<?= format_number($cat->nbNotRead()) ?>" + href="<?= Minz_Url::display($url_base) ?>"><?= $cat->name() ?></a></div> <ul class="box-content"> <?php @@ -37,7 +38,8 @@ $empty = $feed->nbEntries() === 0 ? ' empty' : ''; $url_base['params']['get'] = 'f_' . $feed->id(); ?> - <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> + <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" + data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $feed->name() ?></a> </li> diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml index 2deb1c315..3bbf233ac 100644 --- a/app/views/index/logs.phtml +++ b/app/views/index/logs.phtml @@ -15,10 +15,12 @@ <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> <?php foreach ($items as $log) { ?> - <div class="log <?= $log->level() ?>"><span class="date"><?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?></span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div> + <div class="log <?= $log->level() ?>"><span class="date"> + <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?> + </span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div> <?php } ?> - <?php $this->logsPaginator->render('logs_pagination.phtml','page'); ?> + <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> </div> <?php } else { ?> <p class="alert alert-warn"><?= _t('index.log.empty') ?></p> diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index aee7246d0..ba941066e 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -61,10 +61,10 @@ $today = @strtotime('today'); ?></div><?php $display_others = false; } - ?><div class="flux<?php echo !$this->entry->isRead() ? ' not_read' : ''; - ?><?php echo $this->entry->isFavorite() ? ' favorite' : ''; - ?>" id="flux_<?php echo $this->entry->id(); - ?>" data-feed="<?php echo $this->feed->id(); + ?><div class="flux<?= !$this->entry->isRead() ? ' not_read' : '' + ?><?= $this->entry->isFavorite() ? ' favorite' : '' + ?>" id="flux_<?= $this->entry->id() + ?>" data-feed="<?= $this->feed->id() ?>"><?php $this->renderHelper('index/normal/entry_header'); @@ -74,7 +74,9 @@ $today = @strtotime('today'); <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $this->entry->link() ?>"><?= $this->entry->title() ?></a></h1> <div class="subtitle"> <div class="website"><a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>"> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?> + <img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /> + <?php endif; ?> <span><?= $this->feed->name() ?></span></a> </div> <div class="date"><?= $this->entry->date() ?></div> @@ -88,7 +90,9 @@ $today = @strtotime('today'); echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> - <em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:"' . htmlspecialchars_decode($author, ENT_QUOTES) . '"'])) ?>"><?= $author ?></a></em> + <em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest( + ['search' => 'author:"' . htmlspecialchars_decode($author, ENT_QUOTES) . '"']) + ) ?>"><?= $author ?></a></em> <?php endforeach; ?> </div><?php endif; ?> </div> diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index f2f76f8b6..9febbb52f 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -44,7 +44,9 @@ $content_width = FreshRSS_Context::$user_conf->content_width; <?= _i($item->isFavorite() ? 'starred' : 'non-starred') ?> </a> <a class="website" href="<?= _url('index', 'reader', 'get', 'f_' . $feed->id()) ?>"> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?> + <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /> + <?php endif; ?> <span><?= $feed->name() ?></span> </a> <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $item->link() ?>"><?= $item->title() ?></a></h1> @@ -57,7 +59,9 @@ $content_width = FreshRSS_Context::$user_conf->content_width; echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> -<em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))])) ?>"><?= $author ?></a></em> +<em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest( + ['search' => 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))]) + ) ?>"><?= $author ?></a></em> <?php endforeach; echo ' — '; |
