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 /apps/dav/lib/Command | |
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 'apps/dav/lib/Command')
-rw-r--r-- | apps/dav/lib/Command/ListCalendars.php | 3 | ||||
-rw-r--r-- | apps/dav/lib/Command/MoveCalendar.php | 3 | ||||
-rw-r--r-- | apps/dav/lib/Command/RemoveInvalidShares.php | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/apps/dav/lib/Command/ListCalendars.php b/apps/dav/lib/Command/ListCalendars.php index 00f14605eca..e63fbd2066e 100644 --- a/apps/dav/lib/Command/ListCalendars.php +++ b/apps/dav/lib/Command/ListCalendars.php @@ -70,7 +70,7 @@ class ListCalendars extends Command { $calendars = $this->caldav->getCalendarsForUser("principals/users/$user"); $calendarTableData = []; - foreach($calendars as $calendar) { + foreach ($calendars as $calendar) { // skip birthday calendar if ($calendar['uri'] === BirthdayService::BIRTHDAY_CALENDAR_URI) { continue; @@ -101,5 +101,4 @@ class ListCalendars extends Command { $output->writeln("<info>User <$user> has no calendars</info>"); } } - } diff --git a/apps/dav/lib/Command/MoveCalendar.php b/apps/dav/lib/Command/MoveCalendar.php index 8399fb5ed32..845e8970698 100644 --- a/apps/dav/lib/Command/MoveCalendar.php +++ b/apps/dav/lib/Command/MoveCalendar.php @@ -146,8 +146,7 @@ class MoveCalendar extends Command { * @param string $userDestination * @param bool $force */ - private function checkShares(array $calendar, string $userOrigin, string $userDestination, bool $force = false) - { + private function checkShares(array $calendar, string $userOrigin, string $userDestination, bool $force = false) { $shares = $this->calDav->getShares($calendar['id']); foreach ($shares as $share) { list(, $prefix, $userOrGroup) = explode('/', $share['href'], 3); diff --git a/apps/dav/lib/Command/RemoveInvalidShares.php b/apps/dav/lib/Command/RemoveInvalidShares.php index 9e3aecc60ed..b72396c96cd 100644 --- a/apps/dav/lib/Command/RemoveInvalidShares.php +++ b/apps/dav/lib/Command/RemoveInvalidShares.php @@ -62,7 +62,7 @@ class RemoveInvalidShares extends Command { ->from('dav_shares') ->execute(); - while($row = $result->fetch()) { + while ($row = $result->fetch()) { $principaluri = $row['principaluri']; $p = $this->principalBackend->getPrincipalByPath($principaluri); if ($p === null) { |