diff options
author | Romain d'Alverny <rdalverny@gmail.com> | 2022-01-11 12:36:17 +0100 |
---|---|---|
committer | Romain d'Alverny <rdalverny@gmail.com> | 2022-01-11 12:36:17 +0100 |
commit | 138865bbde25bb6193930c98e30c33913d19e367 (patch) | |
tree | 626e8e26dd4f4776ce9f8cd743987f08377127ed /custom/views | |
parent | 5f2b708377aec4bc5f1d731dfbb50557552d0482 (diff) | |
download | planet-138865bbde25bb6193930c98e30c33913d19e367.tar planet-138865bbde25bb6193930c98e30c33913d19e367.tar.gz planet-138865bbde25bb6193930c98e30c33913d19e367.tar.bz2 planet-138865bbde25bb6193930c98e30c33913d19e367.tar.xz planet-138865bbde25bb6193930c98e30c33913d19e367.zip |
Install code QA helpers, enforce PSR2
Installs phpcs, phpmd, parallel-lint, phpstan.
Diffstat (limited to 'custom/views')
-rwxr-xr-x | custom/views/archive/index.tpl.php | 24 | ||||
-rw-r--r-- | custom/views/default/index.tpl.php | 6 | ||||
-rw-r--r-- | custom/views/install.tpl.php | 3 |
3 files changed, 17 insertions, 16 deletions
diff --git a/custom/views/archive/index.tpl.php b/custom/views/archive/index.tpl.php index 16bc6ab..7dd2737 100755 --- a/custom/views/archive/index.tpl.php +++ b/custom/views/archive/index.tpl.php @@ -1,9 +1,9 @@ <?php $count = 0; -$today = Array(); -$week = Array(); -$month = Array(); -$older = Array(); +$today = array(); +$week = array(); +$month = array(); +$older = array(); $now = time(); foreach ($items as $item) { @@ -45,11 +45,11 @@ header('Content-type: text/html; charset=UTF-8'); <p class="article-content"><?=_g('No news, good news.')?></p> </div> <?php endif; ?> - <?php if (count($today)): ?> + <?php if (count($today)) : ?> <div class="article"> <h2><?=_g('Today')?></h2> <ul> - <?php foreach ($today as $item): ?> + <?php foreach ($today as $item) : ?> <?php $feed = $item->get_feed(); ?> <li> <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> : @@ -60,11 +60,11 @@ header('Content-type: text/html; charset=UTF-8'); </div> <?php endif; ?> - <?php if (count($week)): ?> + <?php if (count($week)) : ?> <div class="article"> <h2><?=_g('This week')?></h2> <ul> - <?php foreach ($week as $item): ?> + <?php foreach ($week as $item) : ?> <?php $feed = $item->get_feed(); ?> <li> <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> : @@ -75,11 +75,11 @@ header('Content-type: text/html; charset=UTF-8'); </div> <?php endif; ?> - <?php if (count($month)): ?> + <?php if (count($month)) : ?> <div class="article"> <h2><?=_g('This month')?></h2> <ul> - <?php foreach ($month as $item): ?> + <?php foreach ($month as $item) : ?> <?php $feed = $item->get_feed(); ?> <li> <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> : @@ -90,11 +90,11 @@ header('Content-type: text/html; charset=UTF-8'); </div> <?php endif; ?> - <?php if (count($older)): ?> + <?php if (count($older)) : ?> <div class="article"> <h2><?=_g('Older items')?></h2> <ul> - <?php foreach ($older as $item): ?> + <?php foreach ($older as $item) : ?> <?php $feed = $item->get_feed(); ?> <li> <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> : diff --git a/custom/views/default/index.tpl.php b/custom/views/default/index.tpl.php index c33ffa5..b3fa1e0 100644 --- a/custom/views/default/index.tpl.php +++ b/custom/views/default/index.tpl.php @@ -32,7 +32,7 @@ header('Content-type: text/html; charset=UTF-8'); <p class="article-content"><?=_g('No news, good news.')?></p> </div> <?php else : ?> - <?php foreach ($items as $item): ?> + <?php foreach ($items as $item) : ?> <?php $arParsedUrl = parse_url($item->get_feed()->getWebsite()); $host = 'from-' . preg_replace('/[^a-zA-Z0-9]/i', '-', $arParsedUrl['host']); @@ -60,7 +60,9 @@ header('Content-type: text/html; charset=UTF-8'); <?php echo $item->get_content(); ?> </div> </div> - <?php if (++$count == $limit) { break; } ?> + <?php if (++$count == $limit) { + break; + } ?> <?php endforeach; ?> <?php endif; ?> </div> diff --git a/custom/views/install.tpl.php b/custom/views/install.tpl.php index 9eaff65..8fbb99e 100644 --- a/custom/views/install.tpl.php +++ b/custom/views/install.tpl.php @@ -102,8 +102,7 @@ </form> </div> -<?php elseif ($status =='installed'): ?> - +<?php elseif ($status =='installed') : ?> <p><?=_g('Congratulations! Your moonmoon is ready.')?></p> <h3><?=_g("What's next?")?></h3> <ol> |