diff options
author | Joas Schilling <coding@schilljs.com> | 2023-11-23 10:22:34 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-23 10:36:13 +0100 |
commit | aa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch) | |
tree | 843203cd1346158aab3515687e37a90e78c929e9 /apps/files_sharing/lib/Controller | |
parent | 272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff) | |
download | nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip |
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/lib/Controller')
7 files changed, 29 insertions, 29 deletions
diff --git a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php index aec011aa7ac..6b54a3489c6 100644 --- a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php +++ b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php @@ -77,14 +77,14 @@ class DeletedShareAPIController extends OCSController { private $serverContainer; public function __construct(string $appName, - IRequest $request, - ShareManager $shareManager, - string $UserId, - IUserManager $userManager, - IGroupManager $groupManager, - IRootFolder $rootFolder, - IAppManager $appManager, - IServerContainer $serverContainer) { + IRequest $request, + ShareManager $shareManager, + string $UserId, + IUserManager $userManager, + IGroupManager $groupManager, + IRootFolder $rootFolder, + IAppManager $appManager, + IServerContainer $serverContainer) { parent::__construct($appName, $request); $this->shareManager = $shareManager; diff --git a/apps/files_sharing/lib/Controller/PublicPreviewController.php b/apps/files_sharing/lib/Controller/PublicPreviewController.php index 089610f711f..54a1a321665 100644 --- a/apps/files_sharing/lib/Controller/PublicPreviewController.php +++ b/apps/files_sharing/lib/Controller/PublicPreviewController.php @@ -51,10 +51,10 @@ class PublicPreviewController extends PublicShareController { private $share; public function __construct(string $appName, - IRequest $request, - ShareManager $shareManger, - ISession $session, - IPreview $previewManager) { + IRequest $request, + ShareManager $shareManger, + ISession $session, + IPreview $previewManager) { parent::__construct($appName, $request, $session); $this->shareManager = $shareManger; diff --git a/apps/files_sharing/lib/Controller/SettingsController.php b/apps/files_sharing/lib/Controller/SettingsController.php index 00d627095b8..ff087d4a196 100644 --- a/apps/files_sharing/lib/Controller/SettingsController.php +++ b/apps/files_sharing/lib/Controller/SettingsController.php @@ -41,8 +41,8 @@ class SettingsController extends Controller { private $userId; public function __construct(IRequest $request, - IConfig $config, - string $userId) { + IConfig $config, + string $userId) { parent::__construct(Application::APP_ID, $request); $this->config = $config; diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 5b69d522545..98423e7dd1f 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -260,7 +260,7 @@ class ShareAPIController extends OCSController { $result['share_with'] = $share->getSharedWith(); $result['share_with_displayname'] = $sharedWith !== null ? $sharedWith->getDisplayName() : $share->getSharedWith(); $result['share_with_displayname_unique'] = $sharedWith !== null ? ( - !empty($sharedWith->getSystemEMailAddress()) ? $sharedWith->getSystemEMailAddress() : $sharedWith->getUID() + !empty($sharedWith->getSystemEMailAddress()) ? $sharedWith->getSystemEMailAddress() : $sharedWith->getUID() ) : $share->getSharedWith(); $userStatuses = $this->userStatusManager->getUserStatuses([$share->getSharedWith()]); @@ -364,7 +364,7 @@ class ShareAPIController extends OCSController { $result['attributes'] = null; if ($attributes = $share->getAttributes()) { - $result['attributes'] = (string)\json_encode($attributes->toArray()); + $result['attributes'] = (string)\json_encode($attributes->toArray()); } return $result; @@ -1314,8 +1314,8 @@ class ShareAPIController extends OCSController { } if (!$this->hasPermission($newPermissions, Constants::PERMISSION_READ) && ( - $this->hasPermission($newPermissions, Constants::PERMISSION_UPDATE) || $this->hasPermission($newPermissions, Constants::PERMISSION_DELETE) - )) { + $this->hasPermission($newPermissions, Constants::PERMISSION_UPDATE) || $this->hasPermission($newPermissions, Constants::PERMISSION_DELETE) + )) { throw new OCSBadRequestException($this->l->t('Share must have READ permission if UPDATE or DELETE permission is set')); } } diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index dc60463dac7..835d08c446c 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -71,8 +71,8 @@ use OCP\Security\ISecureRandom; use OCP\Share; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager as ShareManager; -use OCP\Share\IShare; use OCP\Share\IPublicShareTemplateFactory; +use OCP\Share\IShare; use OCP\Template; /** @@ -569,10 +569,10 @@ class ShareController extends AuthPublicShareController { * @param string $filePath */ protected function publishActivity($subject, - array $parameters, - $affectedUser, - $fileId, - $filePath) { + array $parameters, + $affectedUser, + $fileId, + $filePath) { $event = $this->activityManager->generateEvent(); $event->setApp('files_sharing') ->setType('public_links') diff --git a/apps/files_sharing/lib/Controller/ShareInfoController.php b/apps/files_sharing/lib/Controller/ShareInfoController.php index 720705121d2..a1379a63d9a 100644 --- a/apps/files_sharing/lib/Controller/ShareInfoController.php +++ b/apps/files_sharing/lib/Controller/ShareInfoController.php @@ -53,8 +53,8 @@ class ShareInfoController extends ApiController { * @param IManager $shareManager */ public function __construct(string $appName, - IRequest $request, - IManager $shareManager) { + IRequest $request, + IManager $shareManager) { parent::__construct($appName, $request); $this->shareManager = $shareManager; diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index c151ab53327..00bc85e4a96 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -38,9 +38,6 @@ declare(strict_types=1); */ namespace OCA\Files_Sharing\Controller; -use OCP\Constants; -use function array_slice; -use function array_values; use Generator; use OC\Collaboration\Collaborators\SearchResult; use OCA\Files_Sharing\ResponseDefinitions; @@ -51,11 +48,14 @@ use OCP\AppFramework\OCSController; use OCP\Collaboration\Collaborators\ISearch; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; +use OCP\Constants; use OCP\IConfig; use OCP\IRequest; use OCP\IURLGenerator; -use OCP\Share\IShare; use OCP\Share\IManager; +use OCP\Share\IShare; +use function array_slice; +use function array_values; use function usort; /** |