aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/lib')
-rw-r--r--apps/workflowengine/lib/AppInfo/Application.php1
-rw-r--r--apps/workflowengine/lib/BackgroundJobs/Rotate.php1
-rw-r--r--apps/workflowengine/lib/Check/AbstractStringCheck.php5
-rw-r--r--apps/workflowengine/lib/Check/FileMimeType.php23
-rw-r--r--apps/workflowengine/lib/Check/FileSize.php1
-rw-r--r--apps/workflowengine/lib/Check/FileSystemTags.php1
-rw-r--r--apps/workflowengine/lib/Check/RequestRemoteAddress.php1
-rw-r--r--apps/workflowengine/lib/Check/RequestTime.php1
-rw-r--r--apps/workflowengine/lib/Check/RequestURL.php9
-rw-r--r--apps/workflowengine/lib/Check/RequestUserAgent.php1
-rw-r--r--apps/workflowengine/lib/Check/UserGroupMembership.php1
-rw-r--r--apps/workflowengine/lib/Controller/RequestTimeController.php1
-rw-r--r--apps/workflowengine/lib/Manager.php1
-rw-r--r--apps/workflowengine/lib/Settings/Section.php1
14 files changed, 31 insertions, 17 deletions
diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php
index 09aa4ed3896..93b0ca49260 100644
--- a/apps/workflowengine/lib/AppInfo/Application.php
+++ b/apps/workflowengine/lib/AppInfo/Application.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/BackgroundJobs/Rotate.php b/apps/workflowengine/lib/BackgroundJobs/Rotate.php
index 66ac19f425a..d7984b1226a 100644
--- a/apps/workflowengine/lib/BackgroundJobs/Rotate.php
+++ b/apps/workflowengine/lib/BackgroundJobs/Rotate.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php
index 4e56cda377e..d92e9901365 100644
--- a/apps/workflowengine/lib/Check/AbstractStringCheck.php
+++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -68,8 +69,8 @@ abstract class AbstractStringCheck implements ICheck {
throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1);
}
- if (in_array($operator, ['matches', '!matches']) &&
- @preg_match($value, null) === false) {
+ if (in_array($operator, ['matches', '!matches'])
+ && @preg_match($value, null) === false) {
throw new \UnexpectedValueException($this->l->t('The given regular expression is invalid'), 2);
}
}
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php
index 3062994c6ba..a8dfa64528e 100644
--- a/apps/workflowengine/lib/Check/FileMimeType.php
+++ b/apps/workflowengine/lib/Check/FileMimeType.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -97,9 +98,9 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
return $this->cacheAndReturnMimeType($this->storage->getId(), $this->path, $cacheEntry->getMimeType());
}
- if ($this->storage->file_exists($this->path) &&
- $this->storage->filesize($this->path) &&
- $this->storage->instanceOfStorage(Local::class)
+ if ($this->storage->file_exists($this->path)
+ && $this->storage->filesize($this->path)
+ && $this->storage->instanceOfStorage(Local::class)
) {
$path = $this->storage->getLocalFile($this->path);
$mimeType = $this->mimeTypeDetector->detectContent($path);
@@ -125,12 +126,12 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
*/
protected function isWebDAVRequest() {
return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && (
- $this->request->getPathInfo() === '/webdav' ||
- str_starts_with($this->request->getPathInfo() ?? '', '/webdav/') ||
- $this->request->getPathInfo() === '/dav/files' ||
- str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/') ||
- $this->request->getPathInfo() === '/dav/uploads' ||
- str_starts_with($this->request->getPathInfo() ?? '', '/dav/uploads/')
+ $this->request->getPathInfo() === '/webdav'
+ || str_starts_with($this->request->getPathInfo() ?? '', '/webdav/')
+ || $this->request->getPathInfo() === '/dav/files'
+ || str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/')
+ || $this->request->getPathInfo() === '/dav/uploads'
+ || str_starts_with($this->request->getPathInfo() ?? '', '/dav/uploads/')
);
}
@@ -139,8 +140,8 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
*/
protected function isPublicWebDAVRequest() {
return substr($this->request->getScriptName(), 0 - strlen('/public.php')) === '/public.php' && (
- $this->request->getPathInfo() === '/webdav' ||
- str_starts_with($this->request->getPathInfo() ?? '', '/webdav/')
+ $this->request->getPathInfo() === '/webdav'
+ || str_starts_with($this->request->getPathInfo() ?? '', '/webdav/')
);
}
diff --git a/apps/workflowengine/lib/Check/FileSize.php b/apps/workflowengine/lib/Check/FileSize.php
index c1ee1d85ae9..5ee03ccc9cf 100644
--- a/apps/workflowengine/lib/Check/FileSize.php
+++ b/apps/workflowengine/lib/Check/FileSize.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php
index bd1609e9aff..811571f558a 100644
--- a/apps/workflowengine/lib/Check/FileSystemTags.php
+++ b/apps/workflowengine/lib/Check/FileSystemTags.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Check/RequestRemoteAddress.php b/apps/workflowengine/lib/Check/RequestRemoteAddress.php
index 6fb5a3026d6..b6f8fef5aed 100644
--- a/apps/workflowengine/lib/Check/RequestRemoteAddress.php
+++ b/apps/workflowengine/lib/Check/RequestRemoteAddress.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php
index b6b4e9176c2..a49986652b8 100644
--- a/apps/workflowengine/lib/Check/RequestTime.php
+++ b/apps/workflowengine/lib/Check/RequestTime.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Check/RequestURL.php b/apps/workflowengine/lib/Check/RequestURL.php
index 62d6dbc5c38..fb2ac7e8fd5 100644
--- a/apps/workflowengine/lib/Check/RequestURL.php
+++ b/apps/workflowengine/lib/Check/RequestURL.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -70,10 +71,10 @@ class RequestURL extends AbstractStringCheck {
return false;
}
return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && (
- $this->request->getPathInfo() === '/webdav' ||
- str_starts_with($this->request->getPathInfo() ?? '', '/webdav/') ||
- $this->request->getPathInfo() === '/dav/files' ||
- str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/')
+ $this->request->getPathInfo() === '/webdav'
+ || str_starts_with($this->request->getPathInfo() ?? '', '/webdav/')
+ || $this->request->getPathInfo() === '/dav/files'
+ || str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/')
);
}
}
diff --git a/apps/workflowengine/lib/Check/RequestUserAgent.php b/apps/workflowengine/lib/Check/RequestUserAgent.php
index 47db1bb0c68..572ef567074 100644
--- a/apps/workflowengine/lib/Check/RequestUserAgent.php
+++ b/apps/workflowengine/lib/Check/RequestUserAgent.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Check/UserGroupMembership.php b/apps/workflowengine/lib/Check/UserGroupMembership.php
index 215557a75a9..690f9974a49 100644
--- a/apps/workflowengine/lib/Check/UserGroupMembership.php
+++ b/apps/workflowengine/lib/Check/UserGroupMembership.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Controller/RequestTimeController.php b/apps/workflowengine/lib/Controller/RequestTimeController.php
index 1aca5d92d2d..4b34f16ce0a 100644
--- a/apps/workflowengine/lib/Controller/RequestTimeController.php
+++ b/apps/workflowengine/lib/Controller/RequestTimeController.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index 7d14fc83449..0f41679789d 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/workflowengine/lib/Settings/Section.php b/apps/workflowengine/lib/Settings/Section.php
index 5a13a9e4cec..aa790c9ddcc 100644
--- a/apps/workflowengine/lib/Settings/Section.php
+++ b/apps/workflowengine/lib/Settings/Section.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later