From 7a5236de3f13f08b8c51eb183c0dcf1c8c85beca Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 23 Oct 2019 11:18:20 +0200 Subject: Take advantage of PHP 5.4+ short echo (#2585) * Take advantage of PHP 5.4+ short echo https://php.net/migration54.new-features thanks to https://github.com/FreshRSS/FreshRSS/pull/2495 Use `` instead of `` 10kB of code saved :-) Done with regular expression: ``` <\?php echo (.+?);? *\?> ``` * Try Travis fix https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272 --- app/views/index/about.phtml | 26 +++++++++++++------------- app/views/index/global.phtml | 16 ++++++++-------- app/views/index/logs.phtml | 14 +++++++------- app/views/index/normal.phtml | 24 ++++++++++++------------ app/views/index/reader.phtml | 28 ++++++++++++++-------------- app/views/index/rss.phtml | 22 +++++++++++----------- app/views/index/tos.phtml | 10 +++++----- 7 files changed, 70 insertions(+), 70 deletions(-) (limited to 'app/views/index') diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml index 649729952..320847886 100644 --- a/app/views/index/about.phtml +++ b/app/views/index/about.phtml @@ -1,26 +1,26 @@
- + -

+

-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-

+

-

-

+

+

diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index 2f25b6dc2..a49e16525 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -9,7 +9,7 @@ } ?> -
+
-
- +
+
    nbEntries() === 0 ? ' empty' : ''; $url_base['params']['get'] = 'f_' . $feed->id(); ?> -
  • - ✇ - name(); ?> +
  • + ✇ + name() ?>
@@ -51,7 +51,7 @@
- +
-
display_posts ? '' : ' class="hide_posts"'; ?>> +
display_posts ? '' : ' class="hide_posts"' ?>>
diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml index a88f89278..2deb1c315 100644 --- a/app/views/index/logs.phtml +++ b/app/views/index/logs.phtml @@ -1,11 +1,11 @@
- + -

-

- +

+

+ - +

logsPaginator->items(); ?> @@ -15,12 +15,12 @@ logsPaginator->render('logs_pagination.phtml', 'page'); ?> -
date())); ?>info(), ENT_NOQUOTES, 'UTF-8'); ?>
+
date())) ?>info(), ENT_NOQUOTES, 'UTF-8') ?>
logsPaginator->render('logs_pagination.phtml','page'); ?>
-

+

diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index ac2ea812d..f556df201 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -14,9 +14,9 @@ if (!empty($this->entries)) { $today = @strtotime('today'); ?> -
">
- +
entries as $item) { $this->entry = Minz_ExtensionManager::callHook('entry_before_display', $item); @@ -36,23 +36,23 @@ if (!empty($this->entries)) { if ($display_today && $this->entry->isDay(FreshRSS_Days::TODAY, $today)) { ?>
entry->isDay(FreshRSS_Days::YESTERDAY, $today)) { ?>
entry->isDay(FreshRSS_Days::BEFORE_YESTERDAY, $today)) { ?>
entries)) { $this->renderHelper('index/normal/entry_header'); ?>
-
-

entry->title(); ?>

+
+

entry->title() ?>

entry->authors(); if (is_array($authors)): @@ -75,7 +75,7 @@ if (!empty($this->entries)) { echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> - +
entries)) {
-

-

+

+

diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index 129fae937..bbb6bd22b 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -9,16 +9,16 @@ if (!empty($this->entries)) {
- +
entries as $item) { $item = Minz_ExtensionManager::callHook('entry_before_display', $item); if (is_null($item)) { continue; } - ?>
+ ?>
-
+
categories, $item->feed()); //We most likely already have the feed object in cache if (empty($feed)) $feed = $item->feed(true); @@ -31,16 +31,16 @@ if (!empty($this->entries)) { $readUrl['params']['is_read'] = 0; } ?> - - isRead() ? 'read' : 'unread'); ?> + + isRead() ? 'read' : 'unread') ?> - - isFavorite() ? 'starred' : 'non-starred'); ?> + + isFavorite() ? 'starred' : 'non-starred') ?> - - ✇ name(); ?> + + ✇ name() ?> -

title(); ?>

+

title() ?>

authors(); @@ -50,7 +50,7 @@ if (!empty($this->entries)) { echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> - + entries)) { echo $item->date(); ?>
- content(); ?> + content() ?>
@@ -69,7 +69,7 @@ if (!empty($this->entries)) {
-

-

+

+

diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml index dcfaa0a57..00be01c28 100755 --- a/app/views/index/rss.phtml +++ b/app/views/index/rss.phtml @@ -1,18 +1,18 @@ -'; ?> +'; ?> - <?php echo $this->rss_title; ?> - - rss_title); ?> - - GMT - + <?= $this->rss_title ?> + + rss_title) ?> + + GMT + entries as $item) { ?> - <?php echo $item->title(); ?> - link(); ?> + <?= $item->title() ?> + link() ?> authors(); if (is_array($authors)) { @@ -30,8 +30,8 @@ foreach ($this->entries as $item) { content(); ?>]]> - date(true)); ?> - id(); ?> + date(true)) ?> + id() ?> diff --git a/app/views/index/tos.phtml b/app/views/index/tos.phtml index 1b3498134..38dd0add6 100644 --- a/app/views/index/tos.phtml +++ b/app/views/index/tos.phtml @@ -1,13 +1,13 @@
can_register) { ?> - - + + - - + + - terms_of_service; ?> + terms_of_service ?>
-- cgit v1.2.3