Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/comments/lib/Activity/Provider.php2
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Calendar.php10
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Event.php4
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Todo.php4
-rw-r--r--apps/dav/lib/CalDAV/Publishing/PublishPlugin.php2
-rw-r--r--apps/encryption/lib/Controller/RecoveryController.php34
-rw-r--r--apps/encryption/lib/Controller/SettingsController.php4
-rw-r--r--apps/encryption/lib/Controller/StatusController.php8
-rw-r--r--apps/encryption/lib/Crypto/EncryptAll.php2
-rw-r--r--apps/federatedfilesharing/lib/Notifier.php4
-rw-r--r--apps/federation/lib/Controller/SettingsController.php2
-rw-r--r--apps/files/lib/Controller/ApiController.php2
-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
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php3
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php2
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php4
-rw-r--r--apps/sharebymail/lib/Activity.php8
-rw-r--r--apps/theming/lib/IconBuilder.php4
-rw-r--r--apps/workflowengine/lib/Check/RequestUserAgent.php2
-rw-r--r--core/Migrations/Version13000Date20170718121200.php2
-rw-r--r--core/ajax/update.php63
-rw-r--r--lib/private/App/AppStore/Bundles/EducationBundle.php2
-rw-r--r--lib/private/App/AppStore/Bundles/GroupwareBundle.php2
-rw-r--r--lib/private/App/AppStore/Bundles/SocialSharingBundle.php2
-rw-r--r--lib/private/App/DependencyAnalyzer.php18
-rw-r--r--lib/private/AppFramework/Http/Dispatcher.php4
-rw-r--r--lib/private/AppFramework/Routing/RouteConfig.php2
-rw-r--r--lib/private/Collaboration/Collaborators/Search.php2
-rw-r--r--lib/private/Files/FileInfo.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php2
-rw-r--r--lib/private/L10N/Factory.php6
-rw-r--r--lib/private/Notification/Notification.php2
-rw-r--r--lib/private/Preview/TXT.php2
-rw-r--r--lib/private/Security/Normalizer/IpAddress.php4
-rw-r--r--lib/private/Template/JSConfigHelper.php90
39 files changed, 170 insertions, 172 deletions
diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php
index 566b7835b56..527c9c4ca69 100644
--- a/apps/comments/lib/Activity/Provider.php
+++ b/apps/comments/lib/Activity/Provider.php
@@ -185,7 +185,7 @@ class Provider implements IProvider {
// they will get the dead entries in their stream.
return [
'actor' => $subjectParameters[0],
- 'fileId' => (int) $event->getObjectId(),
+ 'fileId' => $event->getObjectId(),
'filePath' => trim($subjectParameters[1], '/'),
];
}
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
index 7e762b4c088..382825d8955 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
@@ -229,32 +229,32 @@ class Calendar extends Base {
case self::SUBJECT_UNSHARE_USER . '_self':
return [
'actor' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
];
case self::SUBJECT_SHARE_USER . '_you':
case self::SUBJECT_UNSHARE_USER . '_you':
return [
'user' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
];
case self::SUBJECT_SHARE_USER . '_by':
case self::SUBJECT_UNSHARE_USER . '_by':
return [
'user' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'actor' => $this->generateUserParameter($parameters[2]),
];
case self::SUBJECT_SHARE_GROUP . '_you':
case self::SUBJECT_UNSHARE_GROUP . '_you':
return [
'group' => $this->generateGroupParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
];
case self::SUBJECT_SHARE_GROUP . '_by':
case self::SUBJECT_UNSHARE_GROUP . '_by':
return [
'group' => $this->generateGroupParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'actor' => $this->generateUserParameter($parameters[2]),
];
}
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
index 4aa2c8c0b0e..8850715a1c5 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
@@ -195,14 +195,14 @@ class Event extends Base {
case self::SUBJECT_OBJECT_UPDATE . '_event':
return [
'actor' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'event' => $this->generateObjectParameter($parameters[2]),
];
case self::SUBJECT_OBJECT_ADD . '_event_self':
case self::SUBJECT_OBJECT_DELETE . '_event_self':
case self::SUBJECT_OBJECT_UPDATE . '_event_self':
return [
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'event' => $this->generateObjectParameter($parameters[2]),
];
}
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
index 64f542b9f7e..2f6c088be0a 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
@@ -127,7 +127,7 @@ class Todo extends Event {
case self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action':
return [
'actor' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'todo' => $this->generateObjectParameter($parameters[2]),
];
case self::SUBJECT_OBJECT_ADD . '_todo_self':
@@ -136,7 +136,7 @@ class Todo extends Event {
case self::SUBJECT_OBJECT_UPDATE . '_todo_completed_self':
case self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action_self':
return [
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'todo' => $this->generateObjectParameter($parameters[2]),
];
}
diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
index f34baffd784..e5ae9064ae7 100644
--- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
+++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
@@ -138,7 +138,7 @@ class PublishPlugin extends ServerPlugin {
$canPublish &= ($node->getOwner() === $node->getPrincipalURI());
}
- return new AllowedSharingModes((bool)$canShare, (bool)$canPublish);
+ return new AllowedSharingModes($canShare, $canPublish);
});
}
}
diff --git a/apps/encryption/lib/Controller/RecoveryController.php b/apps/encryption/lib/Controller/RecoveryController.php
index 801ae42e033..6455700cd9b 100644
--- a/apps/encryption/lib/Controller/RecoveryController.php
+++ b/apps/encryption/lib/Controller/RecoveryController.php
@@ -75,36 +75,36 @@ class RecoveryController extends Controller {
public function adminRecovery($recoveryPassword, $confirmPassword, $adminEnableRecovery) {
// Check if both passwords are the same
if (empty($recoveryPassword)) {
- $errorMessage = (string)$this->l->t('Missing recovery key password');
+ $errorMessage = $this->l->t('Missing recovery key password');
return new DataResponse(['data' => ['message' => $errorMessage]],
Http::STATUS_BAD_REQUEST);
}
if (empty($confirmPassword)) {
- $errorMessage = (string)$this->l->t('Please repeat the recovery key password');
+ $errorMessage = $this->l->t('Please repeat the recovery key password');
return new DataResponse(['data' => ['message' => $errorMessage]],
Http::STATUS_BAD_REQUEST);
}
if ($recoveryPassword !== $confirmPassword) {
- $errorMessage = (string)$this->l->t('Repeated recovery key password does not match the provided recovery key password');
+ $errorMessage = $this->l->t('Repeated recovery key password does not match the provided recovery key password');
return new DataResponse(['data' => ['message' => $errorMessage]],
Http::STATUS_BAD_REQUEST);
}
if (isset($adminEnableRecovery) && $adminEnableRecovery === '1') {
if ($this->recovery->enableAdminRecovery($recoveryPassword)) {
- return new DataResponse(['data' => ['message' => (string)$this->l->t('Recovery key successfully enabled')]]);
+ return new DataResponse(['data' => ['message' => $this->l->t('Recovery key successfully enabled')]]);
}
- return new DataResponse(['data' => ['message' => (string)$this->l->t('Could not enable recovery key. Please check your recovery key password!')]], Http::STATUS_BAD_REQUEST);
+ return new DataResponse(['data' => ['message' => $this->l->t('Could not enable recovery key. Please check your recovery key password!')]], Http::STATUS_BAD_REQUEST);
} elseif (isset($adminEnableRecovery) && $adminEnableRecovery === '0') {
if ($this->recovery->disableAdminRecovery($recoveryPassword)) {
- return new DataResponse(['data' => ['message' => (string)$this->l->t('Recovery key successfully disabled')]]);
+ return new DataResponse(['data' => ['message' => $this->l->t('Recovery key successfully disabled')]]);
}
- return new DataResponse(['data' => ['message' => (string)$this->l->t('Could not disable recovery key. Please check your recovery key password!')]], Http::STATUS_BAD_REQUEST);
+ return new DataResponse(['data' => ['message' => $this->l->t('Could not disable recovery key. Please check your recovery key password!')]], Http::STATUS_BAD_REQUEST);
}
// this response should never be sent but just in case.
- return new DataResponse(['data' => ['message' => (string)$this->l->t('Missing parameters')]], Http::STATUS_BAD_REQUEST);
+ return new DataResponse(['data' => ['message' => $this->l->t('Missing parameters')]], Http::STATUS_BAD_REQUEST);
}
/**
@@ -116,22 +116,22 @@ class RecoveryController extends Controller {
public function changeRecoveryPassword($newPassword, $oldPassword, $confirmPassword) {
//check if both passwords are the same
if (empty($oldPassword)) {
- $errorMessage = (string)$this->l->t('Please provide the old recovery password');
+ $errorMessage = $this->l->t('Please provide the old recovery password');
return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST);
}
if (empty($newPassword)) {
- $errorMessage = (string)$this->l->t('Please provide a new recovery password');
+ $errorMessage = $this->l->t('Please provide a new recovery password');
return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST);
}
if (empty($confirmPassword)) {
- $errorMessage = (string)$this->l->t('Please repeat the new recovery password');
+ $errorMessage = $this->l->t('Please repeat the new recovery password');
return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST);
}
if ($newPassword !== $confirmPassword) {
- $errorMessage = (string)$this->l->t('Repeated recovery key password does not match the provided recovery key password');
+ $errorMessage = $this->l->t('Repeated recovery key password does not match the provided recovery key password');
return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST);
}
@@ -142,14 +142,14 @@ class RecoveryController extends Controller {
return new DataResponse(
[
'data' => [
- 'message' => (string)$this->l->t('Password successfully changed.')]
+ 'message' => $this->l->t('Password successfully changed.')]
]
);
}
return new DataResponse(
[
'data' => [
- 'message' => (string)$this->l->t('Could not change the password. Maybe the old password was not correct.')
+ 'message' => $this->l->t('Could not change the password. Maybe the old password was not correct.')
]
], Http::STATUS_BAD_REQUEST);
}
@@ -169,14 +169,14 @@ class RecoveryController extends Controller {
return new DataResponse(
[
'data' => [
- 'message' => (string)$this->l->t('Recovery Key disabled')]
+ 'message' => $this->l->t('Recovery Key disabled')]
]
);
}
return new DataResponse(
[
'data' => [
- 'message' => (string)$this->l->t('Recovery Key enabled')]
+ 'message' => $this->l->t('Recovery Key enabled')]
]
);
}
@@ -184,7 +184,7 @@ class RecoveryController extends Controller {
return new DataResponse(
[
'data' => [
- 'message' => (string)$this->l->t('Could not enable the recovery key, please try again or contact your administrator')
+ 'message' => $this->l->t('Could not enable the recovery key, please try again or contact your administrator')
]
], Http::STATUS_BAD_REQUEST);
}
diff --git a/apps/encryption/lib/Controller/SettingsController.php b/apps/encryption/lib/Controller/SettingsController.php
index f918f176767..6ccfe51400e 100644
--- a/apps/encryption/lib/Controller/SettingsController.php
+++ b/apps/encryption/lib/Controller/SettingsController.php
@@ -142,11 +142,11 @@ class SettingsController extends Controller {
if ($result === true) {
$this->session->setStatus(Session::INIT_SUCCESSFUL);
return new DataResponse(
- ['message' => (string) $this->l->t('Private key password successfully updated.')]
+ ['message' => $this->l->t('Private key password successfully updated.')]
);
} else {
return new DataResponse(
- ['message' => (string) $errorMessage],
+ ['message' => $errorMessage],
Http::STATUS_BAD_REQUEST
);
}
diff --git a/apps/encryption/lib/Controller/StatusController.php b/apps/encryption/lib/Controller/StatusController.php
index f3541eeed93..a17023fdcfd 100644
--- a/apps/encryption/lib/Controller/StatusController.php
+++ b/apps/encryption/lib/Controller/StatusController.php
@@ -73,25 +73,25 @@ class StatusController extends Controller {
switch ($this->session->getStatus()) {
case Session::INIT_EXECUTED:
$status = 'interactionNeeded';
- $message = (string)$this->l->t(
+ $message = $this->l->t(
'Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files.'
);
break;
case Session::NOT_INITIALIZED:
$status = 'interactionNeeded';
if ($this->encryptionManager->isEnabled()) {
- $message = (string)$this->l->t(
+ $message = $this->l->t(
'Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.'
);
} else {
- $message = (string)$this->l->t(
+ $message = $this->l->t(
'Please enable server side encryption in the admin settings in order to use the encryption module.'
);
}
break;
case Session::INIT_SUCCESSFUL:
$status = 'success';
- $message = (string)$this->l->t('Encryption app is enabled and ready');
+ $message = $this->l->t('Encryption app is enabled and ready');
}
return new DataResponse(
diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php
index 8124f2a7a75..3d18d8b3a53 100644
--- a/apps/encryption/lib/Crypto/EncryptAll.php
+++ b/apps/encryption/lib/Crypto/EncryptAll.php
@@ -422,7 +422,7 @@ class EncryptAll {
continue;
}
- $subject = (string)$this->l->t('one-time password for server-side-encryption');
+ $subject = $this->l->t('one-time password for server-side-encryption');
list($htmlBody, $textBody) = $this->createMailBody($password);
// send it out now
diff --git a/apps/federatedfilesharing/lib/Notifier.php b/apps/federatedfilesharing/lib/Notifier.php
index bd0ca88d885..f365a14a13c 100644
--- a/apps/federatedfilesharing/lib/Notifier.php
+++ b/apps/federatedfilesharing/lib/Notifier.php
@@ -151,14 +151,14 @@ class Notifier implements INotifier {
switch ($action->getLabel()) {
case 'accept':
$action->setParsedLabel(
- (string)$l->t('Accept')
+ $l->t('Accept')
)
->setPrimary(true);
break;
case 'decline':
$action->setParsedLabel(
- (string)$l->t('Decline')
+ $l->t('Decline')
);
break;
}
diff --git a/apps/federation/lib/Controller/SettingsController.php b/apps/federation/lib/Controller/SettingsController.php
index 7f68f238366..466f1c008a7 100644
--- a/apps/federation/lib/Controller/SettingsController.php
+++ b/apps/federation/lib/Controller/SettingsController.php
@@ -71,7 +71,7 @@ class SettingsController extends Controller {
[
'url' => $url,
'id' => $id,
- 'message' => (string) $this->l->t('Added to the list of trusted servers')
+ 'message' => $this->l->t('Added to the list of trusted servers')
]
);
}
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index a852be5dad5..206ddbd6ed6 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -321,7 +321,7 @@ class ApiController extends Controller {
foreach ($navItems as $item) {
// check if data is valid
if (($show === 0 || $show === 1) && isset($item['expandedState']) && $key === $item['expandedState']) {
- $this->config->setUserValue($this->userSession->getUser()->getUID(), 'files', $key, (int)$show);
+ $this->config->setUserValue($this->userSession->getUser()->getUID(), 'files', $key, $show);
return new Response();
}
}
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]);
}
}
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index c8b4e857520..12408d8e108 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -1064,7 +1064,7 @@ class ShareAPIController extends OCSController {
}
if ($permissions !== null) {
- $newPermissions = (int) $permissions;
+ $newPermissions = $permissions;
$newPermissions = $newPermissions & ~Constants::PERMISSION_SHARE;
}
@@ -1147,7 +1147,6 @@ class ShareAPIController extends OCSController {
// NOT A LINK SHARE
else {
if ($permissions !== null) {
- $permissions = (int) $permissions;
$share->setPermissions($permissions);
}
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index c857df85229..33ac1662a4d 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -212,7 +212,7 @@ class ShareesAPIController extends OCSController {
}
sort($shareTypes);
- $this->limit = (int) $perPage;
+ $this->limit = $perPage;
$this->offset = $perPage * ($page - 1);
// In global scale mode we always search the loogup server
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 6acd970c40e..b21301cd96a 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -239,9 +239,9 @@ class CheckSetupController extends Controller {
return '';
}
- $features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
+ $features = $this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
if (!$this->config->getSystemValue('appstoreenabled', true)) {
- $features = (string)$this->l10n->t('Federated Cloud Sharing');
+ $features = $this->l10n->t('Federated Cloud Sharing');
}
// Check if at least OpenSSL after 1.01d or 1.0.2b
diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php
index 79d7028afcf..23f036c4700 100644
--- a/apps/sharebymail/lib/Activity.php
+++ b/apps/sharebymail/lib/Activity.php
@@ -288,24 +288,24 @@ class Activity implements IProvider {
case self::SUBJECT_SHARED_EMAIL_SELF:
case self::SUBJECT_UNSHARED_EMAIL_SELF:
return [
- 'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]),
+ 'file' => $this->generateFileParameter($event->getObjectId(), $parameters[0]),
'email' => $this->generateEmailParameter($parameters[1]),
];
case self::SUBJECT_SHARED_EMAIL_BY:
case self::SUBJECT_UNSHARED_EMAIL_BY:
return [
- 'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]),
+ 'file' => $this->generateFileParameter($event->getObjectId(), $parameters[0]),
'email' => $this->generateEmailParameter($parameters[1]),
'actor' => $this->generateUserParameter($parameters[2]),
];
case self::SUBJECT_SHARED_EMAIL_PASSWORD_SEND:
return [
- 'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]),
+ 'file' => $this->generateFileParameter($event->getObjectId(), $parameters[0]),
'email' => $this->generateEmailParameter($parameters[1]),
];
case self::SUBJECT_SHARED_EMAIL_PASSWORD_SEND_SELF:
return [
- 'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]),
+ 'file' => $this->generateFileParameter($event->getObjectId(), $parameters[0]),
];
}
throw new \InvalidArgumentException();
diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php
index 68d1ff311fe..65b7be430ed 100644
--- a/apps/theming/lib/IconBuilder.php
+++ b/apps/theming/lib/IconBuilder.php
@@ -198,8 +198,8 @@ class IconBuilder {
// offset for icon positioning
$border_w = (int)($appIconFile->getImageWidth() * 0.05);
$border_h = (int)($appIconFile->getImageHeight() * 0.05);
- $innerWidth = (int)($appIconFile->getImageWidth() - $border_w * 2);
- $innerHeight = (int)($appIconFile->getImageHeight() - $border_h * 2);
+ $innerWidth = ($appIconFile->getImageWidth() - $border_w * 2);
+ $innerHeight = ($appIconFile->getImageHeight() - $border_h * 2);
$appIconFile->adaptiveResizeImage($innerWidth, $innerHeight);
// center icon
$offset_w = 512 / 2 - $innerWidth / 2;
diff --git a/apps/workflowengine/lib/Check/RequestUserAgent.php b/apps/workflowengine/lib/Check/RequestUserAgent.php
index 9679f631897..d5ca80e9d3e 100644
--- a/apps/workflowengine/lib/Check/RequestUserAgent.php
+++ b/apps/workflowengine/lib/Check/RequestUserAgent.php
@@ -76,7 +76,7 @@ class RequestUserAgent extends AbstractStringCheck {
* @return string
*/
protected function getActualValue() {
- return (string) $this->request->getHeader('User-Agent');
+ return $this->request->getHeader('User-Agent');
}
public function isAvailableForScope(int $scope): bool {
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php
index 41492905a04..f85b379f89e 100644
--- a/core/Migrations/Version13000Date20170718121200.php
+++ b/core/Migrations/Version13000Date20170718121200.php
@@ -1031,7 +1031,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
$insert->setParameter('propertypath', (string) $row['propertypath'])
->setParameter('propertyname', (string) $row['propertyname'])
->setParameter('propertyvalue', (string) $row['propertyvalue'])
- ->setParameter('userid', (string) ($match[2] ?? ''));
+ ->setParameter('userid', ($match[2] ?? ''));
$insert->execute();
}
}
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 137df3097a1..09931ec91e2 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -47,7 +47,7 @@ $eventSource = \OC::$server->createEventSource();
// need to send an initial message to force-init the event source,
// which will then trigger its own CSRF check and produces its own CSRF error
// message
-$eventSource->send('success', (string)$l->t('Preparing update'));
+$eventSource->send('success', $l->t('Preparing update'));
class FeedBackHandler {
/** @var integer */
@@ -83,23 +83,23 @@ class FeedBackHandler {
if (empty($desc)) {
$desc = $this->currentStep;
}
- $this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
+ $this->eventSource->send('success', $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
break;
case '\OC\Repair::finishProgress':
$this->progressStateMax = $this->progressStateStep;
- $this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
+ $this->eventSource->send('success', $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
break;
case '\OC\Repair::step':
- $this->eventSource->send('success', (string)$this->l10n->t('Repair step:') . ' ' . $event->getArgument(0));
+ $this->eventSource->send('success', $this->l10n->t('Repair step:') . ' ' . $event->getArgument(0));
break;
case '\OC\Repair::info':
- $this->eventSource->send('success', (string)$this->l10n->t('Repair info:') . ' ' . $event->getArgument(0));
+ $this->eventSource->send('success', $this->l10n->t('Repair info:') . ' ' . $event->getArgument(0));
break;
case '\OC\Repair::warning':
- $this->eventSource->send('notice', (string)$this->l10n->t('Repair warning:') . ' ' . $event->getArgument(0));
+ $this->eventSource->send('notice', $this->l10n->t('Repair warning:') . ' ' . $event->getArgument(0));
break;
case '\OC\Repair::error':
- $this->eventSource->send('notice', (string)$this->l10n->t('Repair error:') . ' ' . $event->getArgument(0));
+ $this->eventSource->send('notice', $this->l10n->t('Repair error:') . ' ' . $event->getArgument(0));
break;
}
}
@@ -108,7 +108,7 @@ class FeedBackHandler {
if (\OCP\Util::needUpgrade()) {
$config = \OC::$server->getSystemConfig();
if ($config->getValue('upgrade.disable-web', false)) {
- $eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
+ $eventSource->send('failure', $l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
$eventSource->close();
exit();
}
@@ -130,12 +130,12 @@ if (\OCP\Util::needUpgrade()) {
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->addListener('\OC\DB\Migrator::executeSql', function ($event) use ($eventSource, $l) {
if ($event instanceof GenericEvent) {
- $eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
+ $eventSource->send('success', $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
}
});
$dispatcher->addListener('\OC\DB\Migrator::checkTable', function ($event) use ($eventSource, $l) {
if ($event instanceof GenericEvent) {
- $eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
+ $eventSource->send('success', $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
}
});
$feedBack = new FeedBackHandler($eventSource, $l);
@@ -148,46 +148,46 @@ if (\OCP\Util::needUpgrade()) {
$dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']);
$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
+ $eventSource->send('success', $l->t('Turned on maintenance mode'));
});
$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
+ $eventSource->send('success', $l->t('Turned off maintenance mode'));
});
$updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Maintenance mode is kept active'));
+ $eventSource->send('success', $l->t('Maintenance mode is kept active'));
});
$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Updating database schema'));
+ $eventSource->send('success', $l->t('Updating database schema'));
});
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Updated database'));
+ $eventSource->send('success', $l->t('Updated database'));
});
$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
+ $eventSource->send('success', $l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
});
$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Checked database schema update'));
+ $eventSource->send('success', $l->t('Checked database schema update'));
});
$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Checking updates of apps'));
+ $eventSource->send('success', $l->t('Checking updates of apps'));
});
$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app]));
+ $eventSource->send('success', $l->t('Checking for update of app "%s" in appstore', [$app]));
});
$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app]));
+ $eventSource->send('success', $l->t('Update app "%s" from appstore', [$app]));
});
$updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app]));
+ $eventSource->send('success', $l->t('Checked for update of app "%s" in appstore', [$app]));
});
$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
+ $eventSource->send('success', $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
});
$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Checked database schema update for apps'));
+ $eventSource->send('success', $l->t('Checked database schema update for apps'));
});
$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Updated "%1$s" to %2$s', [$app, $version]));
+ $eventSource->send('success', $l->t('Updated "%1$s" to %2$s', [$app, $version]));
});
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
$incompatibleApps[] = $app;
@@ -198,16 +198,16 @@ if (\OCP\Util::needUpgrade()) {
$config->setSystemValue('maintenance', false);
});
$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Set log level to debug'));
+ $eventSource->send('success', $l->t('Set log level to debug'));
});
$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Reset log level'));
+ $eventSource->send('success', $l->t('Reset log level'));
});
$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Starting code integrity check'));
+ $eventSource->send('success', $l->t('Starting code integrity check'));
});
$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($eventSource, $l) {
- $eventSource->send('success', (string)$l->t('Finished code integrity check'));
+ $eventSource->send('success', $l->t('Finished code integrity check'));
});
try {
@@ -224,15 +224,14 @@ if (\OCP\Util::needUpgrade()) {
$disabledApps = [];
foreach ($incompatibleApps as $app) {
- $disabledApps[$app] = (string) $l->t('%s (incompatible)', [$app]);
+ $disabledApps[$app] = $l->t('%s (incompatible)', [$app]);
}
if (!empty($disabledApps)) {
- $eventSource->send('notice',
- (string)$l->t('The following apps have been disabled: %s', [implode(', ', $disabledApps)]));
+ $eventSource->send('notice', $l->t('The following apps have been disabled: %s', [implode(', ', $disabledApps)]));
}
} else {
- $eventSource->send('notice', (string)$l->t('Already up to date'));
+ $eventSource->send('notice', $l->t('Already up to date'));
}
$eventSource->send('done', '');
diff --git a/lib/private/App/AppStore/Bundles/EducationBundle.php b/lib/private/App/AppStore/Bundles/EducationBundle.php
index 05d6fbbd9d7..f59e8a115e2 100644
--- a/lib/private/App/AppStore/Bundles/EducationBundle.php
+++ b/lib/private/App/AppStore/Bundles/EducationBundle.php
@@ -29,7 +29,7 @@ class EducationBundle extends Bundle {
* {@inheritDoc}
*/
public function getName() {
- return (string)$this->l10n->t('Education Edition');
+ return $this->l10n->t('Education Edition');
}
/**
diff --git a/lib/private/App/AppStore/Bundles/GroupwareBundle.php b/lib/private/App/AppStore/Bundles/GroupwareBundle.php
index 49ae1068b10..604ed44aa08 100644
--- a/lib/private/App/AppStore/Bundles/GroupwareBundle.php
+++ b/lib/private/App/AppStore/Bundles/GroupwareBundle.php
@@ -30,7 +30,7 @@ class GroupwareBundle extends Bundle {
* {@inheritDoc}
*/
public function getName() {
- return (string)$this->l10n->t('Groupware bundle');
+ return $this->l10n->t('Groupware bundle');
}
/**
diff --git a/lib/private/App/AppStore/Bundles/SocialSharingBundle.php b/lib/private/App/AppStore/Bundles/SocialSharingBundle.php
index 8ce4d1080ff..cd063f6fa88 100644
--- a/lib/private/App/AppStore/Bundles/SocialSharingBundle.php
+++ b/lib/private/App/AppStore/Bundles/SocialSharingBundle.php
@@ -29,7 +29,7 @@ class SocialSharingBundle extends Bundle {
* {@inheritDoc}
*/
public function getName() {
- return (string)$this->l10n->t('Social sharing bundle');
+ return $this->l10n->t('Social sharing bundle');
}
/**
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
index eb114adbb48..8476f9bc145 100644
--- a/lib/private/App/DependencyAnalyzer.php
+++ b/lib/private/App/DependencyAnalyzer.php
@@ -158,19 +158,19 @@ class DependencyAnalyzer {
if (isset($dependencies['php']['@attributes']['min-version'])) {
$minVersion = $dependencies['php']['@attributes']['min-version'];
if ($this->compareSmaller($this->platform->getPhpVersion(), $minVersion)) {
- $missing[] = (string)$this->l->t('PHP %s or higher is required.', [$minVersion]);
+ $missing[] = $this->l->t('PHP %s or higher is required.', [$minVersion]);
}
}
if (isset($dependencies['php']['@attributes']['max-version'])) {
$maxVersion = $dependencies['php']['@attributes']['max-version'];
if ($this->compareBigger($this->platform->getPhpVersion(), $maxVersion)) {
- $missing[] = (string)$this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
+ $missing[] = $this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
}
}
if (isset($dependencies['php']['@attributes']['min-int-size'])) {
$intSize = $dependencies['php']['@attributes']['min-int-size'];
if ($intSize > $this->platform->getIntSize() * 8) {
- $missing[] = (string)$this->l->t('%sbit or higher PHP required.', [$intSize]);
+ $missing[] = $this->l->t('%sbit or higher PHP required.', [$intSize]);
}
}
return $missing;
@@ -194,7 +194,7 @@ class DependencyAnalyzer {
}, $supportedArchitectures);
$currentArchitecture = $this->platform->getArchitecture();
if (!in_array($currentArchitecture, $supportedArchitectures, true)) {
- $missing[] = (string)$this->l->t('The following architectures are supported: %s', [implode(', ', $supportedArchitectures)]);
+ $missing[] = $this->l->t('The following architectures are supported: %s', [implode(', ', $supportedArchitectures)]);
}
return $missing;
}
@@ -221,7 +221,7 @@ class DependencyAnalyzer {
}, $supportedDatabases);
$currentDatabase = $this->platform->getDatabase();
if (!in_array($currentDatabase, $supportedDatabases)) {
- $missing[] = (string)$this->l->t('The following databases are supported: %s', [implode(', ', $supportedDatabases)]);
+ $missing[] = $this->l->t('The following databases are supported: %s', [implode(', ', $supportedDatabases)]);
}
return $missing;
}
@@ -250,7 +250,7 @@ class DependencyAnalyzer {
}
$commandName = $this->getValue($command);
if (!$this->platform->isCommandKnown($commandName)) {
- $missing[] = (string)$this->l->t('The command line tool %s could not be found', [$commandName]);
+ $missing[] = $this->l->t('The command line tool %s could not be found', [$commandName]);
}
}
return $missing;
@@ -324,7 +324,7 @@ class DependencyAnalyzer {
}
$currentOS = $this->platform->getOS();
if (!in_array($currentOS, $oss)) {
- $missing[] = (string)$this->l->t('The following platforms are supported: %s', [implode(', ', $oss)]);
+ $missing[] = $this->l->t('The following platforms are supported: %s', [implode(', ', $oss)]);
}
return $missing;
}
@@ -350,12 +350,12 @@ class DependencyAnalyzer {
if (!is_null($minVersion)) {
if ($this->compareSmaller($this->platform->getOcVersion(), $minVersion)) {
- $missing[] = (string)$this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
+ $missing[] = $this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
}
}
if (!$ignoreMax && !is_null($maxVersion)) {
if ($this->compareBigger($this->platform->getOcVersion(), $maxVersion)) {
- $missing[] = (string)$this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
+ $missing[] = $this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
}
}
return $missing;
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php
index 828864f1e02..9ec69558e88 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -133,7 +133,7 @@ class Dispatcher {
if ($numBuilt > 50) {
$this->logger->debug('Controller {class}::{method} created {count} QueryBuilder objects, please check if they are created inside a loop by accident.' , [
- 'class' => (string) get_class($controller),
+ 'class' => get_class($controller),
'method' => $methodName,
'count' => $numBuilt,
]);
@@ -141,7 +141,7 @@ class Dispatcher {
if ($numExecuted > 100) {
$this->logger->warning('Controller {class}::{method} executed {count} queries.' , [
- 'class' => (string) get_class($controller),
+ 'class' => get_class($controller),
'method' => $methodName,
'count' => $numExecuted,
]);
diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php
index b382e7eb4b0..c522d3436ca 100644
--- a/lib/private/AppFramework/Routing/RouteConfig.php
+++ b/lib/private/AppFramework/Routing/RouteConfig.php
@@ -231,7 +231,7 @@ class RouteConfig {
$controllerName = $this->buildControllerName($controller);
$actionName = $this->buildActionName($method);
- $routeName = $routeNamePrefix . $this->appName . '.' . strtolower($resource) . '.' . strtolower($method);
+ $routeName = $routeNamePrefix . $this->appName . '.' . strtolower($resource) . '.' . $method;
$route = $this->router->create($routeName, $url)
->method($verb);
diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php
index 7b5789640a0..79dfd5e1d82 100644
--- a/lib/private/Collaboration/Collaborators/Search.php
+++ b/lib/private/Collaboration/Collaborators/Search.php
@@ -100,7 +100,7 @@ class Search implements ISearch {
$searchResult->unsetResult($emailType);
}
- return [$searchResult->asArray(), (bool)$hasMoreResults];
+ return [$searchResult->asArray(), $hasMoreResults];
}
public function registerPlugin(array $pluginInfo) {
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index 35e69ae270f..d4cc6ffe4b2 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -243,7 +243,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
if (\OCP\Util::isSharingDisabledForUser() || ($this->isShared() && !\OC\Share\Share::isResharingAllowed())) {
$perms = $perms & ~\OCP\Constants::PERMISSION_SHARE;
}
- return (int) $perms;
+ return $perms;
}
/**
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index d49420471dd..c0587cd0263 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -61,7 +61,7 @@ class Encoding extends Wrapper {
* @return bool true if the string is all ASCII, false otherwise
*/
private function isAscii($str) {
- return (bool) !preg_match('/[\\x80-\\xff]+/', $str);
+ return !preg_match('/[\\x80-\\xff]+/', $str);
}
/**
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 9c9a3cc951e..47191475580 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -123,7 +123,7 @@ class Factory implements IFactory {
return new LazyL10N(function () use ($app, $lang, $locale) {
$app = \OC_App::cleanAppId($app);
if ($lang !== null) {
- $lang = str_replace(['\0', '/', '\\', '..'], '', (string)$lang);
+ $lang = str_replace(['\0', '/', '\\', '..'], '', $lang);
}
$forceLang = $this->config->getSystemValue('force_language', false);
@@ -617,7 +617,7 @@ class Factory implements IFactory {
$forceLanguage = $this->config->getSystemValue('force_language', false);
if ($forceLanguage !== false) {
$l = $this->get('lib', $forceLanguage);
- $potentialName = (string) $l->t('__language_name__');
+ $potentialName = $l->t('__language_name__');
return [
'commonlanguages' => [[
@@ -636,7 +636,7 @@ class Factory implements IFactory {
foreach ($languageCodes as $lang) {
$l = $this->get('lib', $lang);
// TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version
- $potentialName = (string) $l->t('__language_name__');
+ $potentialName = $l->t('__language_name__');
if ($l->getLanguageCode() === $lang && $potentialName[0] !== '_') {//first check if the language name is in the translation file
$ln = [
'code' => $lang,
diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php
index 8ac4e19b7d1..c0848817361 100644
--- a/lib/private/Notification/Notification.php
+++ b/lib/private/Notification/Notification.php
@@ -206,7 +206,7 @@ class Notification implements INotification {
if ($id === '' || isset($id[64])) {
throw new \InvalidArgumentException('The given object id is invalid');
}
- $this->objectId = (string) $id;
+ $this->objectId = $id;
return $this;
}
diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php
index 968a15a5683..9c5b7aa1440 100644
--- a/lib/private/Preview/TXT.php
+++ b/lib/private/Preview/TXT.php
@@ -85,7 +85,7 @@ class TXT extends ProviderV2 {
foreach ($lines as $index => $line) {
$index = $index + 1;
- $x = (int) 1;
+ $x = 1;
$y = (int) ($index * $lineSize);
if ($canUseTTF === true) {
diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php
index a679936e20c..cbfc212e1ce 100644
--- a/lib/private/Security/Normalizer/IpAddress.php
+++ b/lib/private/Security/Normalizer/IpAddress.php
@@ -58,7 +58,7 @@ class IpAddress {
$binary = \inet_pton($ip);
for ($i = 32; $i > $maskBits; $i -= 8) {
$j = \intdiv($i, 8) - 1;
- $k = (int) \min(8, $i - $maskBits);
+ $k = \min(8, $i - $maskBits);
$mask = (0xff - ((2 ** $k) - 1));
$int = \unpack('C', $binary[$j]);
$binary[$j] = \pack('C', $int[1] & $mask);
@@ -84,7 +84,7 @@ class IpAddress {
$binary = \inet_pton($ip);
for ($i = 128; $i > $maskBits; $i -= 8) {
$j = \intdiv($i, 8) - 1;
- $k = (int) \min(8, $i - $maskBits);
+ $k = \min(8, $i - $maskBits);
$mask = (0xff - ((2 ** $k) - 1));
$int = \unpack('C', $binary[$j]);
$binary[$j] = \pack('C', $int[1] & $mask);
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index 69624825ae4..b228cae6ffb 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -207,59 +207,59 @@ class JSConfigHelper {
'nc_lastLogin' => $lastConfirmTimestamp,
'nc_pageLoad' => time(),
"dayNames" => json_encode([
- (string)$this->l->t('Sunday'),
- (string)$this->l->t('Monday'),
- (string)$this->l->t('Tuesday'),
- (string)$this->l->t('Wednesday'),
- (string)$this->l->t('Thursday'),
- (string)$this->l->t('Friday'),
- (string)$this->l->t('Saturday')
+ $this->l->t('Sunday'),
+ $this->l->t('Monday'),
+ $this->l->t('Tuesday'),
+ $this->l->t('Wednesday'),
+ $this->l->t('Thursday'),
+ $this->l->t('Friday'),
+ $this->l->t('Saturday')
]),
"dayNamesShort" => json_encode([
- (string)$this->l->t('Sun.'),
- (string)$this->l->t('Mon.'),
- (string)$this->l->t('Tue.'),
- (string)$this->l->t('Wed.'),
- (string)$this->l->t('Thu.'),
- (string)$this->l->t('Fri.'),
- (string)$this->l->t('Sat.')
+ $this->l->t('Sun.'),
+ $this->l->t('Mon.'),
+ $this->l->t('Tue.'),
+ $this->l->t('Wed.'),
+ $this->l->t('Thu.'),
+ $this->l->t('Fri.'),
+ $this->l->t('Sat.')
]),
"dayNamesMin" => json_encode([
- (string)$this->l->t('Su'),
- (string)$this->l->t('Mo'),
- (string)$this->l->t('Tu'),
- (string)$this->l->t('We'),
- (string)$this->l->t('Th'),
- (string)$this->l->t('Fr'),
- (string)$this->l->t('Sa')
+ $this->l->t('Su'),
+ $this->l->t('Mo'),
+ $this->l->t('Tu'),
+ $this->l->t('We'),
+ $this->l->t('Th'),
+ $this->l->t('Fr'),
+ $this->l->t('Sa')
]),
"monthNames" => json_encode([
- (string)$this->l->t('January'),
- (string)$this->l->t('February'),
- (string)$this->l->t('March'),
- (string)$this->l->t('April'),
- (string)$this->l->t('May'),
- (string)$this->l->t('June'),
- (string)$this->l->t('July'),
- (string)$this->l->t('August'),
- (string)$this->l->t('September'),
- (string)$this->l->t('October'),
- (string)$this->l->t('November'),
- (string)$this->l->t('December')
+ $this->l->t('January'),
+ $this->l->t('February'),
+ $this->l->t('March'),
+ $this->l->t('April'),
+ $this->l->t('May'),
+ $this->l->t('June'),
+ $this->l->t('July'),
+ $this->l->t('August'),
+ $this->l->t('September'),
+ $this->l->t('October'),
+ $this->l->t('November'),
+ $this->l->t('December')
]),
"monthNamesShort" => json_encode([
- (string)$this->l->t('Jan.'),
- (string)$this->l->t('Feb.'),
- (string)$this->l->t('Mar.'),
- (string)$this->l->t('Apr.'),
- (string)$this->l->t('May.'),
- (string)$this->l->t('Jun.'),
- (string)$this->l->t('Jul.'),
- (string)$this->l->t('Aug.'),
- (string)$this->l->t('Sep.'),
- (string)$this->l->t('Oct.'),
- (string)$this->l->t('Nov.'),
- (string)$this->l->t('Dec.')
+ $this->l->t('Jan.'),
+ $this->l->t('Feb.'),
+ $this->l->t('Mar.'),
+ $this->l->t('Apr.'),
+ $this->l->t('May.'),
+ $this->l->t('Jun.'),
+ $this->l->t('Jul.'),
+ $this->l->t('Aug.'),
+ $this->l->t('Sep.'),
+ $this->l->t('Oct.'),
+ $this->l->t('Nov.'),
+ $this->l->t('Dec.')
]),
"firstDay" => json_encode($this->l->l('firstday', null)),
"_oc_config" => json_encode($config),