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 /lib/private/Contacts | |
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 'lib/private/Contacts')
7 files changed, 6 insertions, 14 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ActionFactory.php b/lib/private/Contacts/ContactsMenu/ActionFactory.php index 2c216bf2592..0cdd1245b31 100644 --- a/lib/private/Contacts/ContactsMenu/ActionFactory.php +++ b/lib/private/Contacts/ContactsMenu/ActionFactory.php @@ -52,5 +52,4 @@ class ActionFactory implements IActionFactory { public function newEMailAction($icon, $name, $email) { return $this->newLinkAction($icon, $name, 'mailto:' . $email); } - } diff --git a/lib/private/Contacts/ContactsMenu/ActionProviderStore.php b/lib/private/Contacts/ContactsMenu/ActionProviderStore.php index b8ddf9258fa..5513dd06362 100644 --- a/lib/private/Contacts/ContactsMenu/ActionProviderStore.php +++ b/lib/private/Contacts/ContactsMenu/ActionProviderStore.php @@ -109,5 +109,4 @@ class ActionProviderStore { return array_merge($all, $providers); }, []); } - } diff --git a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php index b1fd74e5bf9..eac169afb77 100644 --- a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php +++ b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php @@ -98,5 +98,4 @@ class LinkAction implements ILinkAction { 'hyperlink' => $this->href, ]; } - } diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index dfa6db61607..0542d60ad3c 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -137,22 +137,22 @@ class ContactsStore implements IContactsStore { } // Prevent enumerating local users - if($disallowEnumeration && $entry->getProperty('isLocalSystemBook')) { + if ($disallowEnumeration && $entry->getProperty('isLocalSystemBook')) { $filterUser = true; $mailAddresses = $entry->getEMailAddresses(); - foreach($mailAddresses as $mailAddress) { - if($mailAddress === $filter) { + foreach ($mailAddresses as $mailAddress) { + if ($mailAddress === $filter) { $filterUser = false; break; } } - if($entry->getProperty('UID') && $entry->getProperty('UID') === $filter) { + if ($entry->getProperty('UID') && $entry->getProperty('UID') === $filter) { $filterUser = false; } - if($filterUser) { + if ($filterUser) { return false; } } @@ -182,7 +182,7 @@ class ContactsStore implements IContactsStore { * @return IEntry|null */ public function findOne(IUser $user, $shareType, $shareWith) { - switch($shareType) { + switch ($shareType) { case 0: case 6: $filter = ['UID']; @@ -224,7 +224,6 @@ class ContactsStore implements IContactsStore { } else { $match = null; } - } return $match; @@ -262,5 +261,4 @@ class ContactsStore implements IContactsStore { return $entry; } - } diff --git a/lib/private/Contacts/ContactsMenu/Entry.php b/lib/private/Contacts/ContactsMenu/Entry.php index c4b590e9397..675d925134b 100644 --- a/lib/private/Contacts/ContactsMenu/Entry.php +++ b/lib/private/Contacts/ContactsMenu/Entry.php @@ -164,5 +164,4 @@ class Entry implements IEntry { 'lastMessage' => '', ]; } - } diff --git a/lib/private/Contacts/ContactsMenu/Manager.php b/lib/private/Contacts/ContactsMenu/Manager.php index ba761c5ece8..293f1366b05 100644 --- a/lib/private/Contacts/ContactsMenu/Manager.php +++ b/lib/private/Contacts/ContactsMenu/Manager.php @@ -118,5 +118,4 @@ class Manager { } } } - } diff --git a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php index adf09065a45..bb5e64d15aa 100644 --- a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php +++ b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php @@ -59,5 +59,4 @@ class EMailProvider implements IProvider { $entry->addAction($action); } } - } |