From 97f9213da95187a9992f700597fb012429b60469 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Mon, 7 Dec 2015 12:05:27 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- apps/files_external/lib/smb.php | 1 - apps/files_external/tests/amazons3migration.php | 3 +++ .../tests/controller/storagescontrollertest.php | 6 ++++++ apps/files_external/tests/service/backendservicetest.php | 5 +++++ apps/files_sharing/appinfo/application.php | 1 - apps/files_sharing/lib/cache.php | 2 +- .../lib/controllers/externalsharescontroller.php | 3 +-- apps/files_sharing/lib/controllers/sharecontroller.php | 2 +- .../files_sharing/lib/middleware/sharingcheckmiddleware.php | 1 - apps/files_sharing/lib/sharedstorage.php | 2 -- 10 files changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index f58cd9849f2..a94840ead59 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -33,7 +33,6 @@ use Icewind\SMB\Exception\Exception; use Icewind\SMB\Exception\NotFoundException; use Icewind\SMB\NativeServer; use Icewind\SMB\Server; -use Icewind\Streams\CallbackWrapper; use Icewind\Streams\IteratorDirectory; use OC\Files\Filesystem; diff --git a/apps/files_external/tests/amazons3migration.php b/apps/files_external/tests/amazons3migration.php index 33fb6119a92..cc47107c7fe 100644 --- a/apps/files_external/tests/amazons3migration.php +++ b/apps/files_external/tests/amazons3migration.php @@ -130,6 +130,9 @@ class AmazonS3Migration extends \Test\TestCase { return $storages; } + /** + * @param string $id + */ public function deleteStorage($id) { $stmt = \OC::$server->getDatabaseConnection()->prepare( 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?' diff --git a/apps/files_external/tests/controller/storagescontrollertest.php b/apps/files_external/tests/controller/storagescontrollertest.php index 8a7acf81009..747bcd46e17 100644 --- a/apps/files_external/tests/controller/storagescontrollertest.php +++ b/apps/files_external/tests/controller/storagescontrollertest.php @@ -48,6 +48,9 @@ abstract class StoragesControllerTest extends \Test\TestCase { \OC_Mount_Config::$skipTest = false; } + /** + * @return \OCA\Files_External\Lib\Backend\Backend + */ protected function getBackendMock($class = '\OCA\Files_External\Lib\Backend\SMB', $storageClass = '\OC\Files\Storage\SMB') { $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend') ->disableOriginalConstructor() @@ -59,6 +62,9 @@ abstract class StoragesControllerTest extends \Test\TestCase { return $backend; } + /** + * @return \OCA\Files_External\Lib\Auth\AuthMechanism + */ protected function getAuthMechMock($scheme = 'null', $class = '\OCA\Files_External\Lib\Auth\NullMechanism') { $authMech = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism') ->disableOriginalConstructor() diff --git a/apps/files_external/tests/service/backendservicetest.php b/apps/files_external/tests/service/backendservicetest.php index 5097b479a5f..e9cb0e2c368 100644 --- a/apps/files_external/tests/service/backendservicetest.php +++ b/apps/files_external/tests/service/backendservicetest.php @@ -35,6 +35,11 @@ class BackendServiceTest extends \Test\TestCase { $this->l10n = $this->getMock('\OCP\IL10N'); } + /** + * @param string $class + * + * @return \OCA\Files_External\Lib\Backend\Backend + */ protected function getBackendMock($class) { $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend') ->disableOriginalConstructor() diff --git a/apps/files_sharing/appinfo/application.php b/apps/files_sharing/appinfo/application.php index ffe3a6a513f..6af450405a3 100644 --- a/apps/files_sharing/appinfo/application.php +++ b/apps/files_sharing/appinfo/application.php @@ -25,7 +25,6 @@ namespace OCA\Files_Sharing\AppInfo; -use OCA\Files_Sharing\Helper; use OCA\Files_Sharing\MountProvider; use OCP\AppFramework\App; use OC\AppFramework\Utility\SimpleContainer; diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index 2e615e231f1..c9032413783 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -98,7 +98,7 @@ class Shared_Cache extends Cache { /** * get the stored metadata of a file or folder * - * @param string|int $file + * @param string $file * @return array|false */ public function get($file) { diff --git a/apps/files_sharing/lib/controllers/externalsharescontroller.php b/apps/files_sharing/lib/controllers/externalsharescontroller.php index edf065ab476..ec576065669 100644 --- a/apps/files_sharing/lib/controllers/externalsharescontroller.php +++ b/apps/files_sharing/lib/controllers/externalsharescontroller.php @@ -45,7 +45,6 @@ class ExternalSharesController extends Controller { /** * @param string $appName * @param IRequest $request - * @param bool $incomingShareEnabled * @param \OCA\Files_Sharing\External\Manager $externalManager * @param IClientService $clientService */ @@ -84,7 +83,7 @@ class ExternalSharesController extends Controller { * @NoAdminRequired * @NoOutgoingFederatedSharingRequired * - * @param $id + * @param integer $id * @return JSONResponse */ public function destroy($id) { diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index 4b446d79ada..fe7b159449c 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -124,7 +124,7 @@ class ShareController extends Controller { * @UseSession * * Authenticates against password-protected shares - * @param $token + * @param string $token * @param string $password * @return RedirectResponse|TemplateResponse */ diff --git a/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php b/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php index 22b9d32a275..04dd28574d6 100644 --- a/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php +++ b/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php @@ -27,7 +27,6 @@ namespace OCA\Files_Sharing\Middleware; use OCP\App\IAppManager; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Middleware; -use OCP\AppFramework\Http\TemplateResponse; use OCP\Files\NotFoundException; use OCP\IConfig; use OCP\AppFramework\Utility\IControllerMethodReflector; diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 4807b5ee738..cda3f564d5f 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -32,8 +32,6 @@ namespace OC\Files\Storage; use OC\Files\Filesystem; use OCA\Files_Sharing\ISharedStorage; -use OCA\Files_Sharing\Propagator; -use OCA\Files_Sharing\SharedMount; use OCP\Lock\ILockingProvider; /** -- 2.39.5