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/private/Files/Cache | |
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/private/Files/Cache')
-rw-r--r-- | lib/private/Files/Cache/Cache.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Cache/Propagator.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 1 | ||||
-rw-r--r-- | lib/private/Files/Cache/Storage.php | 1 | ||||
-rw-r--r-- | lib/private/Files/Cache/Updater.php | 1 | ||||
-rw-r--r-- | lib/private/Files/Cache/Watcher.php | 1 | ||||
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 1 |
7 files changed, 0 insertions, 9 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index bce9a1d88e0..2dfefeff662 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -331,7 +331,6 @@ class Cache implements ICache { * @param array $data [$key => $value] the metadata to update, only the fields provided in the array will be updated, non-provided values will remain unchanged */ public function update($id, array $data) { - if (isset($data['path'])) { // normalize path $data['path'] = $this->normalize($data['path']); @@ -990,7 +989,6 @@ class Cache implements ICache { * @return string */ public function normalize($path) { - return trim(\OC_Util::normalizeUnicode($path), '/'); } } diff --git a/lib/private/Files/Cache/Propagator.php b/lib/private/Files/Cache/Propagator.php index 7a1eae3498a..92fa6436548 100644 --- a/lib/private/Files/Cache/Propagator.php +++ b/lib/private/Files/Cache/Propagator.php @@ -200,6 +200,4 @@ class Propagator implements IPropagator { $this->connection->commit(); } - - } diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 87f32538ec7..2a5a6536697 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -238,7 +238,6 @@ class Scanner extends BasicEmitter implements IScanner { $this->emit('\OC\Files\Cache\Scanner', 'postScanFile', [$file, $this->storageId]); \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', ['path' => $file, 'storage' => $this->storageId]); } - } else { $this->removeFromCache($file); } diff --git a/lib/private/Files/Cache/Storage.php b/lib/private/Files/Cache/Storage.php index ca573be798a..62228e16290 100644 --- a/lib/private/Files/Cache/Storage.php +++ b/lib/private/Files/Cache/Storage.php @@ -126,7 +126,6 @@ class Storage { * @return string|null either the storage id string or null if the numeric id is not known */ public static function getStorageId($numericId) { - $sql = 'SELECT `id` FROM `*PREFIX*storages` WHERE `numeric_id` = ?'; $result = \OC_DB::executeAudited($sql, [$numericId]); if ($row = $result->fetchRow()) { diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 378cadfcace..60534a153dd 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -167,7 +167,6 @@ class Updater implements IUpdater { $this->cache->correctFolderSize($parent); } } - } /** diff --git a/lib/private/Files/Cache/Watcher.php b/lib/private/Files/Cache/Watcher.php index 6270f03ca92..d6291ca71e9 100644 --- a/lib/private/Files/Cache/Watcher.php +++ b/lib/private/Files/Cache/Watcher.php @@ -34,7 +34,6 @@ use OCP\Files\Cache\IWatcher; * check the storage backends for updates and change the cache accordingly */ class Watcher implements IWatcher { - protected $watchPolicy = self::CHECK_ONCE; protected $checkedPaths = []; diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 8c30eeda2cf..8d4f412868e 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -273,7 +273,6 @@ class CacheJail extends CacheWrapper { } else { return 0; } - } /** |