diff options
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 20 | ||||
-rw-r--r-- | apps/files_sharing/lib/Capabilities.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Manager.php | 34 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Storage.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/Notification/Notifier.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/Updater.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/ApiTest.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareAPIControllerTest.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/ShareTest.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/SharedStorageTest.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/SizePropagationTest.php | 2 |
12 files changed, 42 insertions, 42 deletions
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 8915f135ba2..7d1d5c386d8 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -94,42 +94,42 @@ return [ */ [ 'name' => 'ShareAPI#getShares', - 'url' => '/api/v1/shares', + 'url' => '/api/v1/shares', 'verb' => 'GET', ], [ 'name' => 'ShareAPI#getInheritedShares', - 'url' => '/api/v1/shares/inherited', + 'url' => '/api/v1/shares/inherited', 'verb' => 'GET', ], [ 'name' => 'ShareAPI#createShare', - 'url' => '/api/v1/shares', + 'url' => '/api/v1/shares', 'verb' => 'POST', ], [ 'name' => 'ShareAPI#pendingShares', - 'url' => '/api/v1/shares/pending', + 'url' => '/api/v1/shares/pending', 'verb' => 'GET', ], [ 'name' => 'ShareAPI#getShare', - 'url' => '/api/v1/shares/{id}', + 'url' => '/api/v1/shares/{id}', 'verb' => 'GET', ], [ 'name' => 'ShareAPI#updateShare', - 'url' => '/api/v1/shares/{id}', + 'url' => '/api/v1/shares/{id}', 'verb' => 'PUT', ], [ 'name' => 'ShareAPI#deleteShare', - 'url' => '/api/v1/shares/{id}', + 'url' => '/api/v1/shares/{id}', 'verb' => 'DELETE', ], [ 'name' => 'ShareAPI#acceptShare', - 'url' => '/api/v1/shares/pending/{id}', + 'url' => '/api/v1/shares/pending/{id}', 'verb' => 'POST', ], /* @@ -137,12 +137,12 @@ return [ */ [ 'name' => 'DeletedShareAPI#index', - 'url' => '/api/v1/deletedshares', + 'url' => '/api/v1/deletedshares', 'verb' => 'GET', ], [ 'name' => 'DeletedShareAPI#undelete', - 'url' => '/api/v1/deletedshares/{id}', + 'url' => '/api/v1/deletedshares/{id}', 'verb' => 'POST', ], /* diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index 61e8f3b63b6..d4190708241 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -108,7 +108,7 @@ class Capabilities implements ICapability { //Federated sharing $res['federation'] = [ - 'outgoing' => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes', + 'outgoing' => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes', 'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes', 'expire_date' => ['enabled' => true] ]; diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 526e4fcce45..c922754207c 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -131,7 +131,7 @@ class Manager { * @return Mount|null * @throws \Doctrine\DBAL\DBALException */ - public function addShare($remote, $token, $password, $name, $owner, $shareType, $accepted=false, $user = null, $remoteId = -1, $parent = -1) { + public function addShare($remote, $token, $password, $name, $owner, $shareType, $accepted = false, $user = null, $remoteId = -1, $parent = -1) { $user = $user ? $user : $this->uid; $accepted = $accepted ? IShare::STATUS_ACCEPTED : IShare::STATUS_PENDING; $name = Filesystem::normalizePath('/' . $name); @@ -145,17 +145,17 @@ class Manager { $mountPoint = $tmpMountPointName; $hash = md5($tmpMountPointName); $data = [ - 'remote' => $remote, - 'share_token' => $token, - 'password' => $password, - 'name' => $name, - 'owner' => $owner, - 'user' => $user, - 'mountpoint' => $mountPoint, - 'mountpoint_hash' => $hash, - 'accepted' => $accepted, - 'remote_id' => $remoteId, - 'share_type' => $shareType, + 'remote' => $remote, + 'share_token' => $token, + 'password' => $password, + 'name' => $name, + 'owner' => $owner, + 'user' => $user, + 'mountpoint' => $mountPoint, + 'mountpoint_hash' => $hash, + 'accepted' => $accepted, + 'remote_id' => $remoteId, + 'share_type' => $shareType, ]; $i = 1; @@ -175,11 +175,11 @@ class Manager { $this->writeShareToDb($remote, $token, $password, $name, $owner, $user, $mountPoint, $hash, $accepted, $remoteId, $parent, $shareType); $options = [ - 'remote' => $remote, - 'token' => $token, - 'password' => $password, - 'mountpoint' => $mountPoint, - 'owner' => $owner + 'remote' => $remote, + 'token' => $token, + 'password' => $password, + 'mountpoint' => $mountPoint, + 'owner' => $owner ]; return $this->mountShare($options); } diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php index 5c183b2eae3..2cb69de8ee1 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -287,7 +287,7 @@ class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage { $returnValue = false; } - $cache->set($url, $returnValue, 60*60*24); + $cache->set($url, $returnValue, 60 * 60 * 24); return $returnValue; } diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php index 9b636c8d30d..2499896653b 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -178,7 +178,7 @@ class Notifier implements INotifier { 'id' => $notification->getObjectId(), 'name' => $share->getTarget(), ], - 'user' => [ + 'user' => [ 'type' => 'user', 'id' => $sharer->getUID(), 'name' => $sharer->getDisplayName(), @@ -219,7 +219,7 @@ class Notifier implements INotifier { 'id' => $group->getGID(), 'name' => $group->getDisplayName(), ], - 'user' => [ + 'user' => [ 'type' => 'user', 'id' => $sharer->getUID(), 'name' => $sharer->getDisplayName(), diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php index 9b5173b489c..2c9ccd10294 100644 --- a/apps/files_sharing/lib/Updater.php +++ b/apps/files_sharing/lib/Updater.php @@ -94,8 +94,8 @@ class Updater { * @param string $newPath new path relative to data/user/files */ private static function renameChildren($oldPath, $newPath) { - $absNewPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath); - $absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath); + $absNewPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath); + $absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath); $mountManager = \OC\Files\Filesystem::getMountManager(); $mountedShares = $mountManager->findIn('/' . \OCP\User::getUser() . '/files/' . $oldPath); diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 24351b9e86a..254915e7859 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -74,7 +74,7 @@ class ApiTest extends TestCase { \OC::$server->getConfig()->setAppValue('core', 'shareapi_expire_after_n_days', '7'); $this->folder = self::TEST_FOLDER_NAME; - $this->subfolder = '/subfolder_share_api_test'; + $this->subfolder = '/subfolder_share_api_test'; $this->subsubfolder = '/subsubfolder_share_api_test'; $this->filename = '/share-api-test.txt'; @@ -650,7 +650,7 @@ class ApiTest extends TestCase { $share3->setStatus(IShare::STATUS_ACCEPTED); $this->shareManager->updateShare($share3); - $testValues=[ + $testValues = [ ['query' => $this->folder, 'expectedResult' => $this->folder . $this->filename], ['query' => $this->folder . $this->subfolder, diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index 94939fcff2a..badfae2b63d 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -490,8 +490,8 @@ class ShareAPIControllerTest extends TestCase { */ public function createShare($id, $shareType, $sharedWith, $sharedBy, $shareOwner, $path, $permissions, - $shareTime, $expiration, $parent, $target, $mail_send, $note = '', $token=null, - $password=null, $label = '') { + $shareTime, $expiration, $parent, $target, $mail_send, $note = '', $token = null, + $password = null, $label = '') { $share = $this->getMockBuilder(IShare::class)->getMock(); $share->method('getId')->willReturn($id); $share->method('getShareType')->willReturn($shareType); @@ -511,7 +511,7 @@ class ShareAPIControllerTest extends TestCase { $share->method('getToken')->willReturn($token); $share->method('getPassword')->willReturn($password); - if ($shareType === IShare::TYPE_USER || + if ($shareType === IShare::TYPE_USER || $shareType === IShare::TYPE_GROUP || $shareType === IShare::TYPE_LINK) { $share->method('getFullId')->willReturn('ocinternal:'.$id); diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index 42bb0a90426..85267726068 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -276,7 +276,7 @@ class ShareesAPIControllerTest extends TestCase { $this->collaboratorSearch->expects($this->once()) ->method('search') - ->with($search, $expectedShareTypes, $this->anything(), $perPage, $perPage * ($page -1)) + ->with($search, $expectedShareTypes, $this->anything(), $perPage, $perPage * ($page - 1)) ->willReturn([[], false]); $sharees->expects($this->any()) diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php index 3b695493c23..35ca0a60de3 100644 --- a/apps/files_sharing/tests/ShareTest.php +++ b/apps/files_sharing/tests/ShareTest.php @@ -44,7 +44,7 @@ class ShareTest extends TestCase { parent::setUp(); $this->folder = self::TEST_FOLDER_NAME; - $this->subfolder = '/subfolder_share_api_test'; + $this->subfolder = '/subfolder_share_api_test'; $this->subsubfolder = '/subsubfolder_share_api_test'; $this->filename = '/share-api-test.txt'; diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index e3e57cc73a4..74975e7cf31 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'); + list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder'); $storage->rmdir($internalPath); //enforce reload of the mount points diff --git a/apps/files_sharing/tests/SizePropagationTest.php b/apps/files_sharing/tests/SizePropagationTest.php index 8496341e653..b7a23dca561 100644 --- a/apps/files_sharing/tests/SizePropagationTest.php +++ b/apps/files_sharing/tests/SizePropagationTest.php @@ -113,7 +113,7 @@ class SizePropagationTest extends TestCase { // but the size including mountpoints increases $newRecipientRootInfo = $recipientView->getFileInfo('', true); - $this->assertEquals($oldRecipientSize +3, $newRecipientRootInfo->getSize()); + $this->assertEquals($oldRecipientSize + 3, $newRecipientRootInfo->getSize()); // size of owner's root increases $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); |