From caff1023ea72bb2ea94130e18a2a6e2ccf819e5f Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 10 Apr 2020 14:19:56 +0200 Subject: 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 --- apps/workflowengine/lib/Check/FileMimeType.php | 1 - apps/workflowengine/lib/Check/RequestTime.php | 1 - apps/workflowengine/lib/Check/RequestUserAgent.php | 1 - 3 files changed, 3 deletions(-) (limited to 'apps/workflowengine/lib/Check') diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php index 9d378379e5e..0e02c405126 100644 --- a/apps/workflowengine/lib/Check/FileMimeType.php +++ b/apps/workflowengine/lib/Check/FileMimeType.php @@ -62,7 +62,6 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck { $this->_setFileInfo($storage, $path, $isDir); if (!isset($this->mimeType[$this->storage->getId()][$this->path]) || $this->mimeType[$this->storage->getId()][$this->path] === '') { - if ($isDir) { $this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory'; } else { diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php index aa35e8b84c9..9729129104f 100644 --- a/apps/workflowengine/lib/Check/RequestTime.php +++ b/apps/workflowengine/lib/Check/RequestTime.php @@ -26,7 +26,6 @@ use OCP\IL10N; use OCP\WorkflowEngine\ICheck; class RequestTime implements ICheck { - const REGEX_TIME = '([0-1][0-9]|2[0-3]):([0-5][0-9])'; const REGEX_TIMEZONE = '([a-zA-Z]+(?:\\/[a-zA-Z\-\_]+)+)'; diff --git a/apps/workflowengine/lib/Check/RequestUserAgent.php b/apps/workflowengine/lib/Check/RequestUserAgent.php index 24dfb1b906e..9679f631897 100644 --- a/apps/workflowengine/lib/Check/RequestUserAgent.php +++ b/apps/workflowengine/lib/Check/RequestUserAgent.php @@ -82,5 +82,4 @@ class RequestUserAgent extends AbstractStringCheck { public function isAvailableForScope(int $scope): bool { return true; } - } -- cgit v1.2.3