aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php4
-rw-r--r--apps/files_sharing/lib/External/Cache.php2
-rw-r--r--apps/files_sharing/lib/External/Storage.php4
-rw-r--r--apps/files_sharing/lib/Scanner.php2
-rw-r--r--apps/files_sharing/tests/CacheTest.php16
-rw-r--r--apps/files_sharing/tests/PermissionsTest.php6
-rw-r--r--apps/files_sharing/tests/SharedStorageTest.php6
-rw-r--r--apps/files_sharing/tests/WatcherTest.php4
8 files changed, 22 insertions, 22 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index 33ac1662a4d..131fe918530 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -223,7 +223,7 @@ class ShareesAPIController extends OCSController {
$this->result['lookupEnabled'] = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes';
}
- list($result, $hasMoreResults) = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset);
+ [$result, $hasMoreResults] = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset);
// extra treatment for 'exact' subarray, with a single merge expected keys might be lost
if (isset($result['exact'])) {
@@ -290,7 +290,7 @@ class ShareesAPIController extends OCSController {
foreach ($shareTypes as $shareType) {
$sharees = $this->getAllShareesByType($user, $shareType);
$shareTypeResults = [];
- foreach ($sharees as list($sharee, $displayname)) {
+ foreach ($sharees as [$sharee, $displayname]) {
if (!isset($this->searchResultTypeMap[$shareType])) {
continue;
}
diff --git a/apps/files_sharing/lib/External/Cache.php b/apps/files_sharing/lib/External/Cache.php
index 8af5ca1d98d..6a816b166ae 100644
--- a/apps/files_sharing/lib/External/Cache.php
+++ b/apps/files_sharing/lib/External/Cache.php
@@ -40,7 +40,7 @@ class Cache extends \OC\Files\Cache\Cache {
public function __construct($storage, ICloudId $cloudId) {
$this->cloudId = $cloudId;
$this->storage = $storage;
- list(, $remote) = explode('://', $cloudId->getRemote(), 2);
+ [, $remote] = explode('://', $cloudId->getRemote(), 2);
$this->remote = $remote;
$this->remoteUser = $cloudId->getUser();
parent::__construct($storage);
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index 339770c8601..f612aadfb32 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -73,9 +73,9 @@ class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage {
$this->cloudId = $options['cloudId'];
$discoveryService = \OC::$server->query(\OCP\OCS\IDiscoveryService::class);
- list($protocol, $remote) = explode('://', $this->cloudId->getRemote());
+ [$protocol, $remote] = explode('://', $this->cloudId->getRemote());
if (strpos($remote, '/')) {
- list($host, $root) = explode('/', $remote, 2);
+ [$host, $root] = explode('/', $remote, 2);
} else {
$host = $remote;
$root = '';
diff --git a/apps/files_sharing/lib/Scanner.php b/apps/files_sharing/lib/Scanner.php
index 59b5c8a0b2e..450256782e7 100644
--- a/apps/files_sharing/lib/Scanner.php
+++ b/apps/files_sharing/lib/Scanner.php
@@ -63,7 +63,7 @@ class Scanner extends \OC\Files\Cache\Scanner {
}
if ($this->storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) {
/** @var \OC\Files\Storage\Storage $storage */
- list($storage) = $this->storage->resolvePath('');
+ [$storage] = $this->storage->resolvePath('');
$this->sourceScanner = $storage->getScanner();
return $this->sourceScanner;
} else {
diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php
index b55fba78d42..5136f0972ea 100644
--- a/apps/files_sharing/tests/CacheTest.php
+++ b/apps/files_sharing/tests/CacheTest.php
@@ -90,7 +90,7 @@ class CacheTest extends TestCase {
$this->view->file_put_contents('container/shareddir/subdir/another too.txt', $textData);
$this->view->file_put_contents('container/shareddir/subdir/not a text file.xml', '<xml></xml>');
- list($this->ownerStorage,) = $this->view->resolvePath('');
+ [$this->ownerStorage,] = $this->view->resolvePath('');
$this->ownerCache = $this->ownerStorage->getCache();
$this->ownerStorage->getScanner()->scan('');
@@ -124,7 +124,7 @@ class CacheTest extends TestCase {
// retrieve the shared storage
$secondView = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2);
- list($this->sharedStorage,) = $secondView->resolvePath('files/shareddir');
+ [$this->sharedStorage,] = $secondView->resolvePath('files/shareddir');
$this->sharedCache = $this->sharedStorage->getCache();
}
@@ -213,7 +213,7 @@ class CacheTest extends TestCase {
*/
public function testSearch() {
foreach ($this->searchDataProvider() as $data) {
- list($pattern, $expectedFiles) = $data;
+ [$pattern, $expectedFiles] = $data;
$results = $this->sharedStorage->getCache()->search($pattern);
@@ -410,7 +410,7 @@ class CacheTest extends TestCase {
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
$this->assertTrue(\OC\Files\Filesystem::file_exists('/test.txt'));
- list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test.txt');
+ [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test.txt');
/**
* @var \OCA\Files_Sharing\SharedStorage $sharedStorage
*/
@@ -442,7 +442,7 @@ class CacheTest extends TestCase {
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
$this->assertTrue(\OC\Files\Filesystem::file_exists('/foo'));
- list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo');
+ [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo');
/**
* @var \OCA\Files_Sharing\SharedStorage $sharedStorage
*/
@@ -469,12 +469,12 @@ class CacheTest extends TestCase {
$this->shareManager->updateShare($share);
\OC_Util::tearDownFS();
- list($sourceStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/foo');
+ [$sourceStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/foo');
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
$this->assertTrue(\OC\Files\Filesystem::file_exists('/foo'));
/** @var SharedStorage $sharedStorage */
- list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo');
+ [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo');
$this->assertEquals($sourceStorage->getCache()->getNumericStorageId(), $sharedStorage->getCache()->getNumericStorageId());
}
@@ -511,7 +511,7 @@ class CacheTest extends TestCase {
\OC\Files\Filesystem::file_put_contents('/sub/bar.txt', 'bar');
/** @var SharedStorage $sharedStorage */
- list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/sub');
+ [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/sub');
$this->assertTrue($sharedStorage->getCache()->inCache('bar.txt'));
diff --git a/apps/files_sharing/tests/PermissionsTest.php b/apps/files_sharing/tests/PermissionsTest.php
index 6d3dabd609f..462a73f09d2 100644
--- a/apps/files_sharing/tests/PermissionsTest.php
+++ b/apps/files_sharing/tests/PermissionsTest.php
@@ -76,7 +76,7 @@ class PermissionsTest extends TestCase {
$this->view->file_put_contents('container/shareddir/textfile.txt', $textData);
$this->view->file_put_contents('container/shareddirrestricted/textfile1.txt', $textData);
- list($this->ownerStorage, $internalPath) = $this->view->resolvePath('');
+ [$this->ownerStorage, $internalPath] = $this->view->resolvePath('');
$this->ownerCache = $this->ownerStorage->getCache();
$this->ownerStorage->getScanner()->scan('');
@@ -110,8 +110,8 @@ class PermissionsTest extends TestCase {
// retrieve the shared storage
$this->secondView = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2);
- list($this->sharedStorage, $internalPath) = $this->secondView->resolvePath('files/shareddir');
- list($this->sharedStorageRestrictedShare, $internalPath) = $this->secondView->resolvePath('files/shareddirrestricted');
+ [$this->sharedStorage, $internalPath] = $this->secondView->resolvePath('files/shareddir');
+ [$this->sharedStorageRestrictedShare, $internalPath] = $this->secondView->resolvePath('files/shareddirrestricted');
$this->sharedCache = $this->sharedStorage->getCache();
$this->sharedCacheRestrictedShare = $this->sharedStorageRestrictedShare->getCache();
}
diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php
index 815d1620f06..6b51c471586 100644
--- a/apps/files_sharing/tests/SharedStorageTest.php
+++ b/apps/files_sharing/tests/SharedStorageTest.php
@@ -107,7 +107,7 @@ class SharedStorageTest extends TestCase {
// delete the local folder
/** @var \OC\Files\Storage\Storage $storage */
- list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder');
+ [$storage, $internalPath] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder');
$storage->rmdir($internalPath);
//enforce reload of the mount points
@@ -442,7 +442,7 @@ class SharedStorageTest extends TestCase {
/**
* @var \OCP\Files\Storage $sharedStorage
*/
- list($sharedStorage,) = $view->resolvePath($this->folder);
+ [$sharedStorage,] = $view->resolvePath($this->folder);
$this->assertTrue($sharedStorage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage'));
$sourceStorage = new \OC\Files\Storage\Temporary([]);
@@ -475,7 +475,7 @@ class SharedStorageTest extends TestCase {
/**
* @var \OCP\Files\Storage $sharedStorage
*/
- list($sharedStorage,) = $view->resolvePath($this->folder);
+ [$sharedStorage,] = $view->resolvePath($this->folder);
$this->assertTrue($sharedStorage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage'));
$sourceStorage = new \OC\Files\Storage\Temporary([]);
diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php
index 75d873f6e97..2a7367a230b 100644
--- a/apps/files_sharing/tests/WatcherTest.php
+++ b/apps/files_sharing/tests/WatcherTest.php
@@ -64,7 +64,7 @@ class WatcherTest extends TestCase {
$this->view->mkdir('container/shareddir');
$this->view->mkdir('container/shareddir/subdir');
- list($this->ownerStorage, $internalPath) = $this->view->resolvePath('');
+ [$this->ownerStorage, $internalPath] = $this->view->resolvePath('');
$this->ownerCache = $this->ownerStorage->getCache();
$this->ownerStorage->getScanner()->scan('');
@@ -85,7 +85,7 @@ class WatcherTest extends TestCase {
// retrieve the shared storage
$secondView = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2);
- list($this->sharedStorage, $internalPath) = $secondView->resolvePath('files/shareddir');
+ [$this->sharedStorage, $internalPath] = $secondView->resolvePath('files/shareddir');
$this->sharedCache = $this->sharedStorage->getCache();
}