From dcbd60351435c9a5ea8d23dff703d449489aa335 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Mon, 30 Nov 2015 10:29:06 +0000 Subject: [PATCH 1/2] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- apps/files/controller/apicontroller.php | 2 +- apps/files/lib/activity.php | 4 ++-- apps/files_external/lib/config.php | 3 ++- apps/files_external/lib/config/configadapter.php | 1 - apps/files_external/lib/sftp.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/files/controller/apicontroller.php b/apps/files/controller/apicontroller.php index 1ecd5294c6..ed14b88747 100644 --- a/apps/files/controller/apicontroller.php +++ b/apps/files/controller/apicontroller.php @@ -127,7 +127,7 @@ class ApiController extends Controller { * * @NoAdminRequired * - * @param array|string $tagName tag name to filter by + * @param string[] $tagName tag name to filter by * @return DataResponse */ public function getFilesByTag($tagName) { diff --git a/apps/files/lib/activity.php b/apps/files/lib/activity.php index 23e3f26e62..a941572ed1 100644 --- a/apps/files/lib/activity.php +++ b/apps/files/lib/activity.php @@ -166,7 +166,7 @@ class Activity implements IExtension { * @param string $text * @param IL10N $l * @param array $params - * @return bool|string + * @return string|false */ protected function translateLong($text, IL10N $l, array $params) { switch ($text) { @@ -198,7 +198,7 @@ class Activity implements IExtension { * @param string $text * @param IL10N $l * @param array $params - * @return bool|string + * @return string|false */ protected function translateShort($text, IL10N $l, array $params) { switch ($text) { diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index fac3144553..cd2498eca4 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -243,6 +243,7 @@ class OC_Mount_Config { * * @param string $class backend class name * @param array $options backend configuration options + * @param boolean $isPersonal * @return int see self::STATUS_* * @throws Exception */ @@ -357,7 +358,7 @@ class OC_Mount_Config { * @param \OCP\IL10N $l * @param string $module * @param string $backend - * @return string + * @return OC_L10N_String */ private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) { switch (strtolower($module)) { diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php index 3a04512e8a..f9640d5337 100644 --- a/apps/files_external/lib/config/configadapter.php +++ b/apps/files_external/lib/config/configadapter.php @@ -32,7 +32,6 @@ use OCP\IUser; use OCA\Files_external\Service\UserStoragesService; use OCA\Files_External\Service\UserGlobalStoragesService; use OCA\Files_External\Lib\StorageConfig; -use OCP\Files\StorageNotAvailableException; use OCA\Files_External\Lib\FailedStorage; /** diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index f8651727fd..bcf3143736 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -195,7 +195,7 @@ class SFTP extends \OC\Files\Storage\Common { } /** - * @return bool|string + * @return string|false */ private function hostKeysPath() { try { From d6da0396d02693e35073cfd4ec990a85393a92e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 30 Nov 2015 23:00:51 +0100 Subject: [PATCH 2/2] Adjust patches --- apps/files/controller/apicontroller.php | 2 +- apps/files/service/tagservice.php | 2 +- apps/files_external/lib/config.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/files/controller/apicontroller.php b/apps/files/controller/apicontroller.php index ed14b88747..ee54db6319 100644 --- a/apps/files/controller/apicontroller.php +++ b/apps/files/controller/apicontroller.php @@ -127,7 +127,7 @@ class ApiController extends Controller { * * @NoAdminRequired * - * @param string[] $tagName tag name to filter by + * @param string $tagName tag name to filter by * @return DataResponse */ public function getFilesByTag($tagName) { diff --git a/apps/files/service/tagservice.php b/apps/files/service/tagservice.php index 1999d97e1a..cf3f2bb786 100644 --- a/apps/files/service/tagservice.php +++ b/apps/files/service/tagservice.php @@ -91,7 +91,7 @@ class TagService { /** * Get all files for the given tag * - * @param array $tagName tag name to filter by + * @param string $tagName tag name to filter by * @return FileInfo[] list of matching files * @throws \Exception if the tag does not exist */ diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index cd2498eca4..b0b9db123c 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -358,16 +358,16 @@ class OC_Mount_Config { * @param \OCP\IL10N $l * @param string $module * @param string $backend - * @return OC_L10N_String + * @return string */ private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) { switch (strtolower($module)) { case 'curl': - return $l->t('Note: The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); + return (string)$l->t('Note: The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); case 'ftp': - return $l->t('Note: The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); + return (string)$l->t('Note: The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); default: - return $l->t('Note: "%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', array($module, $backend)); + return (string)$l->t('Note: "%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', array($module, $backend)); } }