summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-01-11 12:57:03 +0100
committerMorris Jobke <hey@morrisjobke.de>2021-01-11 13:14:41 +0100
commit24d436cb600a725ba162a5387552a996a6fc486f (patch)
tree91e00673fad2c999776991ca57d09e8af9a10ed5 /apps/files_external
parent8b656e321bbf358d8074ce8a3976fac5defdece0 (diff)
downloadnextcloud-server-24d436cb600a725ba162a5387552a996a6fc486f.tar.gz
nextcloud-server-24d436cb600a725ba162a5387552a996a6fc486f.zip
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Controller/GlobalStoragesController.php2
-rw-r--r--apps/files_external/lib/Controller/StoragesController.php20
-rw-r--r--apps/files_external/lib/Controller/UserGlobalStoragesController.php6
-rw-r--r--apps/files_external/lib/Controller/UserStoragesController.php2
-rw-r--r--apps/files_external/lib/MountConfig.php6
5 files changed, 18 insertions, 18 deletions
diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php
index 7ce2c84b8a9..f6032ae902b 100644
--- a/apps/files_external/lib/Controller/GlobalStoragesController.php
+++ b/apps/files_external/lib/Controller/GlobalStoragesController.php
@@ -179,7 +179,7 @@ class GlobalStoragesController extends StoragesController {
} catch (NotFoundException $e) {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id])
+ 'message' => $this->l10n->t('Storage with ID "%d" not found', [$id])
],
Http::STATUS_NOT_FOUND
);
diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php
index d58d61e3939..80adeb47f7d 100644
--- a/apps/files_external/lib/Controller/StoragesController.php
+++ b/apps/files_external/lib/Controller/StoragesController.php
@@ -145,7 +145,7 @@ abstract class StoragesController extends Controller {
$this->logger->logException($e);
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Invalid backend or authentication mechanism class')
+ 'message' => $this->l10n->t('Invalid backend or authentication mechanism class')
],
Http::STATUS_UNPROCESSABLE_ENTITY
);
@@ -164,7 +164,7 @@ abstract class StoragesController extends Controller {
if ($mountPoint === '') {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Invalid mount point'),
+ 'message' => $this->l10n->t('Invalid mount point'),
],
Http::STATUS_UNPROCESSABLE_ENTITY
);
@@ -174,7 +174,7 @@ abstract class StoragesController extends Controller {
// objectstore must not be sent from client side
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Objectstore forbidden'),
+ 'message' => $this->l10n->t('Objectstore forbidden'),
],
Http::STATUS_UNPROCESSABLE_ENTITY
);
@@ -188,7 +188,7 @@ abstract class StoragesController extends Controller {
// invalid backend
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Invalid storage backend "%s"', [
+ 'message' => $this->l10n->t('Invalid storage backend "%s"', [
$backend->getIdentifier(),
]),
],
@@ -200,7 +200,7 @@ abstract class StoragesController extends Controller {
// not permitted to use backend
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Not permitted to use backend "%s"', [
+ 'message' => $this->l10n->t('Not permitted to use backend "%s"', [
$backend->getIdentifier(),
]),
],
@@ -211,7 +211,7 @@ abstract class StoragesController extends Controller {
// not permitted to use auth mechanism
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Not permitted to use authentication mechanism "%s"', [
+ 'message' => $this->l10n->t('Not permitted to use authentication mechanism "%s"', [
$authMechanism->getIdentifier(),
]),
],
@@ -223,7 +223,7 @@ abstract class StoragesController extends Controller {
// unsatisfied parameters
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Unsatisfied backend parameters'),
+ 'message' => $this->l10n->t('Unsatisfied backend parameters'),
],
Http::STATUS_UNPROCESSABLE_ENTITY
);
@@ -232,7 +232,7 @@ abstract class StoragesController extends Controller {
// unsatisfied parameters
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Unsatisfied authentication mechanism parameters'),
+ 'message' => $this->l10n->t('Unsatisfied authentication mechanism parameters'),
],
Http::STATUS_UNPROCESSABLE_ENTITY
);
@@ -347,7 +347,7 @@ abstract class StoragesController extends Controller {
} catch (NotFoundException $e) {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id]),
+ 'message' => $this->l10n->t('Storage with ID "%d" not found', [$id]),
],
Http::STATUS_NOT_FOUND
);
@@ -376,7 +376,7 @@ abstract class StoragesController extends Controller {
} catch (NotFoundException $e) {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id]),
+ 'message' => $this->l10n->t('Storage with ID "%d" not found', [$id]),
],
Http::STATUS_NOT_FOUND
);
diff --git a/apps/files_external/lib/Controller/UserGlobalStoragesController.php b/apps/files_external/lib/Controller/UserGlobalStoragesController.php
index f26b4dd67f9..7bab5e47caa 100644
--- a/apps/files_external/lib/Controller/UserGlobalStoragesController.php
+++ b/apps/files_external/lib/Controller/UserGlobalStoragesController.php
@@ -125,7 +125,7 @@ class UserGlobalStoragesController extends StoragesController {
} catch (NotFoundException $e) {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id])
+ 'message' => $this->l10n->t('Storage with ID "%d" not found', [$id])
],
Http::STATUS_NOT_FOUND
);
@@ -169,7 +169,7 @@ class UserGlobalStoragesController extends StoragesController {
} else {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Storage with ID "%d" is not user editable', [$id])
+ 'message' => $this->l10n->t('Storage with ID "%d" is not user editable', [$id])
],
Http::STATUS_FORBIDDEN
);
@@ -177,7 +177,7 @@ class UserGlobalStoragesController extends StoragesController {
} catch (NotFoundException $e) {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id])
+ 'message' => $this->l10n->t('Storage with ID "%d" not found', [$id])
],
Http::STATUS_NOT_FOUND
);
diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php
index 8686921c90c..5b981b7c643 100644
--- a/apps/files_external/lib/Controller/UserStoragesController.php
+++ b/apps/files_external/lib/Controller/UserStoragesController.php
@@ -198,7 +198,7 @@ class UserStoragesController extends StoragesController {
} catch (NotFoundException $e) {
return new DataResponse(
[
- 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id])
+ 'message' => $this->l10n->t('Storage with ID "%d" not found', [$id])
],
Http::STATUS_NOT_FOUND
);
diff --git a/apps/files_external/lib/MountConfig.php b/apps/files_external/lib/MountConfig.php
index 23b37544c54..30b45ccf0cc 100644
--- a/apps/files_external/lib/MountConfig.php
+++ b/apps/files_external/lib/MountConfig.php
@@ -295,11 +295,11 @@ class MountConfig {
private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) {
switch (strtolower($module)) {
case 'curl':
- return (string)$l->t('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 $l->t('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 (string)$l->t('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 $l->t('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 (string)$l->t('"%1$s" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it.', [$module, $backend]);
+ return $l->t('"%1$s" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it.', [$module, $backend]);
}
}