aboutsummaryrefslogtreecommitdiffstats
path: root/core/BackgroundJobs
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 /core/BackgroundJobs
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 'core/BackgroundJobs')
-rw-r--r--core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
index 4489afe1f02..c24c8aa05a3 100644
--- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
+++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
@@ -48,18 +48,18 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob {
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
$instanceId = $this->config->getSystemValue('instanceid', null);
- if(!is_string($instanceId) || empty($instanceId)) {
+ if (!is_string($instanceId) || empty($instanceId)) {
return;
}
$updaterFolderPath = $dataDir . '/updater-' . $instanceId;
$backupFolderPath = $updaterFolderPath . '/backups';
- if(file_exists($backupFolderPath)) {
+ if (file_exists($backupFolderPath)) {
$this->log->info("$backupFolderPath exists - start to clean it up");
$dirList = [];
$dirs = new \DirectoryIterator($backupFolderPath);
- foreach($dirs as $dir) {
+ foreach ($dirs as $dir) {
// skip files and dot dirs
if ($dir->isFile() || $dir->isDot()) {
continue;
@@ -80,7 +80,7 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob {
$dirList = array_slice($dirList, 0, -3);
$this->log->info("List of all directories that will be deleted: " . json_encode($dirList));
- foreach($dirList as $dir) {
+ foreach ($dirList as $dir) {
$this->log->info("Removing $dir ...");
\OC_Helper::rmdirr($dir);
}