Skip to content

Commit

Permalink
Merge pull request #31 from grummbeer/elvis
Browse files Browse the repository at this point in the history
Micro optimization. Use the Elvis operator instead of the ternary operator.
  • Loading branch information
dmolineus authored Sep 23, 2024
2 parents 92eaf29 + 16e25e8 commit 260ae0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/contao/templates/nav_hofff.html5
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?php foreach ($this->items as $item): ?>
<li class="<?php if($item['isActive']) echo 'active '; if($item['class']) echo $item['class']; ?>"
><a href="<?php echo $item['href']; ?>"
title="<?php echo $item['pageTitle'] ? $item['pageTitle'] : $item['title']; ?>"
title="<?php echo $item['pageTitle'] ?: $item['title']; ?>"
class="<?php if($item['isActive']) echo 'active '; if($item['class']) echo $item['class']; ?>"
<?php if($item['accesskey'] != ''): ?>accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?>
<?php if($item['tabindex'] ?? null): ?>tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?>
Expand Down

0 comments on commit 260ae0d

Please sign in to comment.