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/public/Collaboration | |
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/public/Collaboration')
5 files changed, 2 insertions, 6 deletions
diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php index 6b46d9157de..776bd46d407 100644 --- a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php +++ b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php @@ -98,5 +98,4 @@ class AutoCompleteEvent extends GenericEvent { public function getLimit(): int { return $this->getArgument('limit'); } - } diff --git a/lib/public/Collaboration/Collaborators/SearchResultType.php b/lib/public/Collaboration/Collaborators/SearchResultType.php index 3774640cebc..f8a130f1990 100644 --- a/lib/public/Collaboration/Collaborators/SearchResultType.php +++ b/lib/public/Collaboration/Collaborators/SearchResultType.php @@ -61,11 +61,11 @@ class SearchResultType { protected function getValidatedType($type) { $type = trim((string)$type); - if($type === '') { + if ($type === '') { throw new \InvalidArgumentException('Type must not be empty'); } - if($type === 'exact') { + if ($type === 'exact') { throw new \InvalidArgumentException('Provided type is a reserved word'); } diff --git a/lib/public/Collaboration/Resources/CollectionException.php b/lib/public/Collaboration/Resources/CollectionException.php index a1f7cd0836a..a7f05cdc939 100644 --- a/lib/public/Collaboration/Resources/CollectionException.php +++ b/lib/public/Collaboration/Resources/CollectionException.php @@ -30,5 +30,4 @@ namespace OCP\Collaboration\Resources; * @since 16.0.0 */ class CollectionException extends \RuntimeException { - } diff --git a/lib/public/Collaboration/Resources/IProvider.php b/lib/public/Collaboration/Resources/IProvider.php index 9bd5a8b9761..28bb06d2b85 100644 --- a/lib/public/Collaboration/Resources/IProvider.php +++ b/lib/public/Collaboration/Resources/IProvider.php @@ -60,5 +60,4 @@ interface IProvider { * @since 16.0.0 */ public function canAccessResource(IResource $resource, ?IUser $user): bool; - } diff --git a/lib/public/Collaboration/Resources/ResourceException.php b/lib/public/Collaboration/Resources/ResourceException.php index 8aa72447c95..562207f8e7b 100644 --- a/lib/public/Collaboration/Resources/ResourceException.php +++ b/lib/public/Collaboration/Resources/ResourceException.php @@ -30,5 +30,4 @@ namespace OCP\Collaboration\Resources; * @since 16.0.0 */ class ResourceException extends \RuntimeException { - } |