aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Files
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/dav/lib/Files
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-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/Files')
-rw-r--r--apps/dav/lib/Files/BrowserErrorPagePlugin.php2
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php2
-rw-r--r--apps/dav/lib/Files/LazySearchBackend.php2
-rw-r--r--apps/dav/lib/Files/RootCollection.php1
-rw-r--r--apps/dav/lib/Files/Sharing/FilesDropPlugin.php1
5 files changed, 2 insertions, 6 deletions
diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php
index 9589ea11e0e..47de5020d56 100644
--- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php
+++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php
@@ -98,7 +98,7 @@ class BrowserErrorPagePlugin extends ServerPlugin {
$request = \OC::$server->getRequest();
$templateName = 'exception';
- if($httpCode === 403 || $httpCode === 404) {
+ if ($httpCode === 403 || $httpCode === 404) {
$templateName = (string)$httpCode;
}
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php
index 751580eabfc..fd951961623 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -419,7 +419,7 @@ class FileSearchBackend implements ISearchBackend {
} else {
throw new \InvalidArgumentException("searching by '$propertyName' is only allowed with a literal value");
}
- } else{
+ } else {
throw new \InvalidArgumentException("searching by '$propertyName' is not allowed inside a '{DAV:}or' or '{DAV:}not'");
}
} else {
diff --git a/apps/dav/lib/Files/LazySearchBackend.php b/apps/dav/lib/Files/LazySearchBackend.php
index 992205da72b..2ec41ccfd12 100644
--- a/apps/dav/lib/Files/LazySearchBackend.php
+++ b/apps/dav/lib/Files/LazySearchBackend.php
@@ -67,6 +67,4 @@ class LazySearchBackend implements ISearchBackend {
return [];
}
}
-
-
}
diff --git a/apps/dav/lib/Files/RootCollection.php b/apps/dav/lib/Files/RootCollection.php
index 6e2b7ef09d2..22142b46e1c 100644
--- a/apps/dav/lib/Files/RootCollection.php
+++ b/apps/dav/lib/Files/RootCollection.php
@@ -61,5 +61,4 @@ class RootCollection extends AbstractPrincipalCollection {
function getName() {
return 'files';
}
-
}
diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
index 6dbdeaa6fd9..b4201ef80c1 100644
--- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
+++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php
@@ -67,7 +67,6 @@ class FilesDropPlugin extends ServerPlugin {
}
public function beforeMethod(RequestInterface $request, ResponseInterface $response) {
-
if (!$this->enabled) {
return;
}