diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
commit | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch) | |
tree | 186d494c2aea5dea7255d3584ef5d595fc6e6194 /core/templates/layout.user.php | |
parent | edf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff) | |
download | nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip |
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/templates/layout.user.php')
-rw-r--r-- | core/templates/layout.user.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 5dbc95e1179..318b1d5f34b 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -81,10 +81,10 @@ <div id="navigation" style="display: none;" aria-label="<?php p($l->t('More apps menu')); ?>"> <div id="apps"> <ul> - <?php foreach($_['navigation'] as $entry): ?> + <?php foreach ($_['navigation'] as $entry): ?> <li data-id="<?php p($entry['id']); ?>"> <a href="<?php print_unescaped($entry['href']); ?>" - <?php if($entry['active']): ?> class="active"<?php endif; ?> + <?php if ($entry['active']): ?> class="active"<?php endif; ?> aria-label="<?php p($entry['name']); ?>"> <svg width="16" height="16" viewBox="0 0 16 16" alt=""> <defs><filter id="invertMenuMore-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs> @@ -123,7 +123,11 @@ <div id="expand" tabindex="0" role="button" class="menutoggle" aria-label="<?php p($l->t('Settings'));?>" aria-haspopup="true" aria-controls="expanddiv" aria-expanded="false"> - <div class="avatardiv<?php if ($_['userAvatarSet']) { print_unescaped(' avatardiv-shown'); } else { print_unescaped('" style="display: none'); } ?>"> + <div class="avatardiv<?php if ($_['userAvatarSet']) { + print_unescaped(' avatardiv-shown'); + } else { + print_unescaped('" style="display: none'); + } ?>"> <?php if ($_['userAvatarSet']): ?> <img alt="" width="32" height="32" src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']]));?>" @@ -136,10 +140,10 @@ <nav class="settings-menu" id="expanddiv" style="display:none;" aria-label="<?php p($l->t('Settings menu'));?>"> <ul> - <?php foreach($_['settingsnavigation'] as $entry):?> + <?php foreach ($_['settingsnavigation'] as $entry):?> <li data-id="<?php p($entry['id']); ?>"> <a href="<?php print_unescaped($entry['href']); ?>" - <?php if($entry["active"]): ?> class="active"<?php endif; ?>> + <?php if ($entry["active"]): ?> class="active"<?php endif; ?>> <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>"> <?php p($entry['name']) ?> </a> |