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/stats/idle.phtml | 18 ++++++------ app/views/stats/index.phtml | 60 +++++++++++++++++++-------------------- app/views/stats/repartition.phtml | 34 +++++++++++----------- 3 files changed, 56 insertions(+), 56 deletions(-) (limited to 'app/views/stats') diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml index 88c78d465..9421893fb 100644 --- a/app/views/stats/idle.phtml +++ b/app/views/stats/idle.phtml @@ -1,9 +1,9 @@ partial('aside_stats'); ?>
- + -

+

-

+

- +
  • - - - + + +
  • - () + ()
@@ -43,7 +43,7 @@ if ($nothing) { ?>

- +

diff --git a/app/views/stats/index.phtml b/app/views/stats/index.phtml index 2ff3e6c52..4af197c5b 100644 --- a/app/views/stats/index.phtml +++ b/app/views/stats/index.phtml @@ -1,63 +1,63 @@ partial('aside_stats'); ?>
- + -

+

-

+

- - + + - - - + + + - - - + + + - - - + + + - - - + + +
 
repartition['main_stream']['total']); ?>repartition['all_feeds']['total']); ?>repartition['main_stream']['total']) ?>repartition['all_feeds']['total']) ?>
repartition['main_stream']['count_reads']); ?>repartition['all_feeds']['count_reads']); ?>repartition['main_stream']['count_reads']) ?>repartition['all_feeds']['count_reads']) ?>
repartition['main_stream']['count_unreads']); ?>repartition['all_feeds']['count_unreads']); ?>repartition['main_stream']['count_unreads']) ?>repartition['all_feeds']['count_unreads']) ?>
repartition['main_stream']['count_favorites']); ?>repartition['all_feeds']['count_favorites']); ?>repartition['main_stream']['count_favorites']) ?>repartition['all_feeds']['count_favorites']) ?>
-

+

- - - - + + + + topFeed as $feed) { ?> - - - - + + + + @@ -65,18 +65,18 @@
-

+

-

+

-

+

@@ -90,4 +90,4 @@ echo htmlspecialchars(json_encode(array( 'entryByCategory' => $this->entryByCategory, ), JSON_UNESCAPED_UNICODE), ENT_NOQUOTES, 'UTF-8'); ?> - + diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml index 4bce418c9..7b445a7cc 100644 --- a/app/views/stats/repartition.phtml +++ b/app/views/stats/repartition.phtml @@ -1,12 +1,12 @@ partial('aside_stats'); ?>
- + -

+

feed) {?> - - + +
repartition['all_feeds']['total'] * 100, 1);?>repartition['all_feeds']['total'] * 100, 1) ?>
- - - - + + + + - - - - + + + +
repartition['total']; ?>repartition['count_reads']; ?>repartition['count_unreads']; ?>repartition['count_favorites']; ?>repartition['total'] ?>repartition['count_reads'] ?>repartition['count_unreads'] ?>repartition['count_favorites'] ?>
-

averageHour); ?>

+

averageHour) ?>

-

averageDayOfWeek); ?>

+

averageDayOfWeek) ?>

-

averageMonth); ?>

+

averageMonth) ?>

@@ -71,4 +71,4 @@ echo htmlspecialchars(json_encode(array( 'months' => $this->months, ), JSON_UNESCAPED_UNICODE), ENT_NOQUOTES, 'UTF-8'); ?> - + -- cgit v1.2.3