aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/comments/lib/Activity/Listener.php2
-rw-r--r--apps/dav/l10n/zh_CN.js10
-rw-r--r--apps/dav/l10n/zh_CN.json10
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php2
-rw-r--r--apps/dav/lib/CalDAV/Plugin.php2
-rw-r--r--apps/dav/lib/CardDAV/Converter.php3
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php3
-rw-r--r--apps/encryption/l10n/nl.js2
-rw-r--r--apps/encryption/l10n/nl.json2
-rw-r--r--apps/encryption/lib/Crypto/Crypt.php2
-rw-r--r--apps/encryption/lib/Util.php3
-rw-r--r--apps/federatedfilesharing/lib/AddressHandler.php3
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php3
-rw-r--r--apps/files/l10n/zh_CN.js7
-rw-r--r--apps/files/l10n/zh_CN.json7
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Share.php3
-rw-r--r--apps/files_external/lib/Lib/Storage/AmazonS3.php1
-rw-r--r--apps/files_external/lib/Service/UserStoragesService.php3
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php4
-rw-r--r--apps/files_sharing/lib/Migration/OwncloudGuestShareType.php2
-rw-r--r--apps/files_sharing/lib/ShareBackend/Folder.php4
-rw-r--r--apps/files_trashbin/lib/Storage.php3
-rw-r--r--apps/files_versions/lib/Storage.php4
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php3
-rw-r--r--apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php3
-rw-r--r--apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php2
-rw-r--r--apps/user_ldap/lib/Helper.php3
-rw-r--r--apps/workflowengine/lib/Controller/RequestTime.php2
-rw-r--r--core/Command/Config/Import.php3
-rw-r--r--core/Command/TwoFactorAuth/Base.php2
-rw-r--r--core/l10n/pl.js2
-rw-r--r--core/l10n/pl.json2
-rw-r--r--core/l10n/tr.js1
-rw-r--r--core/l10n/tr.json1
-rw-r--r--lib/l10n/zh_CN.js9
-rw-r--r--lib/l10n/zh_CN.json9
-rw-r--r--lib/private/Activity/Manager.php4
-rw-r--r--lib/private/App/CodeChecker/DeprecationCheck.php2
-rw-r--r--lib/private/App/CodeChecker/PrivateCheck.php2
-rw-r--r--lib/private/App/Platform.php3
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php2
-rw-r--r--lib/private/AppFramework/Middleware/MiddlewareDispatcher.php2
-rw-r--r--lib/private/Collaboration/Collaborators/GroupPlugin.php4
-rw-r--r--lib/private/Collaboration/Collaborators/UserPlugin.php4
-rw-r--r--lib/private/DB/Adapter.php2
-rw-r--r--lib/private/DB/AdapterSqlite.php2
-rw-r--r--lib/private/Files/Cache/Cache.php3
-rw-r--r--lib/private/Files/Cache/FailedCache.php7
-rw-r--r--lib/private/Files/Node/Node.php2
-rw-r--r--lib/private/Files/View.php9
-rw-r--r--lib/private/L10N/Factory.php3
-rw-r--r--lib/private/Security/CertificateManager.php4
-rw-r--r--lib/private/Server.php4
-rw-r--r--lib/private/User/Session.php22
-rw-r--r--lib/private/legacy/db.php3
-rw-r--r--lib/private/legacy/db/statementwrapper.php3
-rw-r--r--lib/private/legacy/template.php2
-rw-r--r--settings/Controller/UsersController.php4
58 files changed, 115 insertions, 105 deletions
diff --git a/apps/comments/lib/Activity/Listener.php b/apps/comments/lib/Activity/Listener.php
index 76af565cf15..1dec28c8250 100644
--- a/apps/comments/lib/Activity/Listener.php
+++ b/apps/comments/lib/Activity/Listener.php
@@ -77,7 +77,7 @@ class Listener {
*/
public function commentEvent(CommentsEvent $event) {
if ($event->getComment()->getObjectType() !== 'files'
- || !in_array($event->getEvent(), [CommentsEvent::EVENT_ADD])
+ || $event->getEvent() !== CommentsEvent::EVENT_ADD
|| !$this->appManager->isInstalled('activity')) {
// Comment not for file, not adding a comment or no activity-app enabled (save the energy)
return;
diff --git a/apps/dav/l10n/zh_CN.js b/apps/dav/l10n/zh_CN.js
index e0ee9015402..2e03a120e60 100644
--- a/apps/dav/l10n/zh_CN.js
+++ b/apps/dav/l10n/zh_CN.js
@@ -41,9 +41,17 @@ OC.L10N.register(
"A calendar <strong>event</strong> was modified" : "日历中<strong>事件</strong>已经修改",
"A calendar <strong>todo</strong> was modified" : "列表中<strong>待办事项</strong>已经修改",
"Contact birthdays" : "联系人生日",
+ "Hello %s," : "%s你好,",
+ "When:" : "时间:",
+ "Where:" : "地点:",
+ "Description:" : "描述:",
+ "Link:" : "链接:",
"Contacts" : "联系人",
"Technical details" : "技术细节",
"Remote Address: %s" : "远程地址: %s",
- "Request ID: %s" : "请求 ID: %s"
+ "Request ID: %s" : "请求 ID: %s",
+ "CalDAV server" : "日历服务",
+ "Automatically generate a birthday calendar" : "自动生成生日日历",
+ "Birthday calendars will be generated by a background job." : "生日日历将由后台作业生成。"
},
"nplurals=1; plural=0;");
diff --git a/apps/dav/l10n/zh_CN.json b/apps/dav/l10n/zh_CN.json
index 30419409556..60ea656ff51 100644
--- a/apps/dav/l10n/zh_CN.json
+++ b/apps/dav/l10n/zh_CN.json
@@ -39,9 +39,17 @@
"A calendar <strong>event</strong> was modified" : "日历中<strong>事件</strong>已经修改",
"A calendar <strong>todo</strong> was modified" : "列表中<strong>待办事项</strong>已经修改",
"Contact birthdays" : "联系人生日",
+ "Hello %s," : "%s你好,",
+ "When:" : "时间:",
+ "Where:" : "地点:",
+ "Description:" : "描述:",
+ "Link:" : "链接:",
"Contacts" : "联系人",
"Technical details" : "技术细节",
"Remote Address: %s" : "远程地址: %s",
- "Request ID: %s" : "请求 ID: %s"
+ "Request ID: %s" : "请求 ID: %s",
+ "CalDAV server" : "日历服务",
+ "Automatically generate a birthday calendar" : "自动生成生日日历",
+ "Birthday calendars will be generated by a background job." : "生日日历将由后台作业生成。"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 169bf6ff6a5..a936cb6aeba 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2261,7 +2261,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$query->execute();
}
- if (in_array($property->name, array_keys(self::$indexParameters))) {
+ if (array_key_exists($property->name, self::$indexParameters)) {
$parameters = $property->parameters();
$indexedParametersForProperty = self::$indexParameters[$property->name];
diff --git a/apps/dav/lib/CalDAV/Plugin.php b/apps/dav/lib/CalDAV/Plugin.php
index 167ea4ffd69..0d793f929b3 100644
--- a/apps/dav/lib/CalDAV/Plugin.php
+++ b/apps/dav/lib/CalDAV/Plugin.php
@@ -36,8 +36,6 @@ class Plugin extends \Sabre\CalDAV\Plugin {
list(, $principalId) = \Sabre\Uri\split($principalUrl);
return self::CALENDAR_ROOT .'/' . $principalId;
}
-
- return;
}
}
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php
index a480f0ea45d..e047ee2a772 100644
--- a/apps/dav/lib/CardDAV/Converter.php
+++ b/apps/dav/lib/CardDAV/Converter.php
@@ -143,8 +143,7 @@ class Converter {
*/
private function getAvatarImage(IUser $user) {
try {
- $image = $user->getAvatarImage(-1);
- return $image;
+ return $user->getAvatarImage(-1);
} catch (\Exception $ex) {
return null;
}
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index a3a0893259b..b5333f48374 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -340,8 +340,7 @@ class FilesPlugin extends ServerPlugin {
});
$propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) {
- $result = $node->getFileInfo()->isEncrypted() ? '1' : '0';
- return $result;
+ return $node->getFileInfo()->isEncrypted() ? '1' : '0';
});
$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
diff --git a/apps/encryption/l10n/nl.js b/apps/encryption/l10n/nl.js
index 1dc6bfad795..2661126492a 100644
--- a/apps/encryption/l10n/nl.js
+++ b/apps/encryption/l10n/nl.js
@@ -38,7 +38,7 @@ OC.L10N.register(
"Default encryption module" : "Standaard cryptomodule",
"Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.",
"Encrypt the home storage" : "Versleutel de eigen serveropslag",
- "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Het inschakelen van deze optie zorgt voor versleutelen van alle bestanden op do hoofdopslag, anders worden alleen bestanden op externe opslag versleuteld",
+ "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Het inschakelen van deze optie zorgt voor versleutelen van alle bestanden op de hoofdopslag, anders worden alleen bestanden op externe opslag versleuteld",
"Enable recovery key" : "Activeer herstelsleutel",
"Disable recovery key" : "Deactiveer herstelsleutel",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "De herstelsleutel is een extra cryptografische sleutel die wordt gebruikt om bestanden te versleutelen. Die maakt het mogelijk bestanden te herstellen als de gebruiker zijn of haar wachtwoord vergeet.",
diff --git a/apps/encryption/l10n/nl.json b/apps/encryption/l10n/nl.json
index abdb5767611..60f7644a485 100644
--- a/apps/encryption/l10n/nl.json
+++ b/apps/encryption/l10n/nl.json
@@ -36,7 +36,7 @@
"Default encryption module" : "Standaard cryptomodule",
"Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.",
"Encrypt the home storage" : "Versleutel de eigen serveropslag",
- "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Het inschakelen van deze optie zorgt voor versleutelen van alle bestanden op do hoofdopslag, anders worden alleen bestanden op externe opslag versleuteld",
+ "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Het inschakelen van deze optie zorgt voor versleutelen van alle bestanden op de hoofdopslag, anders worden alleen bestanden op externe opslag versleuteld",
"Enable recovery key" : "Activeer herstelsleutel",
"Disable recovery key" : "Deactiveer herstelsleutel",
"The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password." : "De herstelsleutel is een extra cryptografische sleutel die wordt gebruikt om bestanden te versleutelen. Die maakt het mogelijk bestanden te herstellen als de gebruiker zijn of haar wachtwoord vergeet.",
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php
index 090ca6184d6..4d5c20ea75f 100644
--- a/apps/encryption/lib/Crypto/Crypt.php
+++ b/apps/encryption/lib/Crypto/Crypt.php
@@ -560,7 +560,7 @@ class Crypt {
$signaturePosition = strpos($meta, '00sig00');
// enforce signature for the new 'CTR' ciphers
- if ($signaturePosition === false && strpos(strtolower($cipher), 'ctr') !== false) {
+ if ($signaturePosition === false && stripos($cipher, 'ctr') !== false) {
throw new GenericEncryptionException('Missing Signature', $this->l->t('Missing Signature'));
}
diff --git a/apps/encryption/lib/Util.php b/apps/encryption/lib/Util.php
index 5926817dc48..eb2357bd10f 100644
--- a/apps/encryption/lib/Util.php
+++ b/apps/encryption/lib/Util.php
@@ -196,8 +196,7 @@ class Util {
* @return \OC\Files\Storage\Storage
*/
public function getStorage($path) {
- $storage = $this->files->getMount($path)->getStorage();
- return $storage;
+ return $this->files->getMount($path)->getStorage();
}
}
diff --git a/apps/federatedfilesharing/lib/AddressHandler.php b/apps/federatedfilesharing/lib/AddressHandler.php
index 78234f17ed7..be3a624e28f 100644
--- a/apps/federatedfilesharing/lib/AddressHandler.php
+++ b/apps/federatedfilesharing/lib/AddressHandler.php
@@ -84,8 +84,7 @@ class AddressHandler {
* @return string url of the current server
*/
public function generateRemoteURL() {
- $url = $this->urlGenerator->getAbsoluteURL('/');
- return $url;
+ return $this->urlGenerator->getAbsoluteURL('/');
}
/**
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 1025c3c4ae7..6857dd48e98 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -592,7 +592,6 @@ class FederatedShareProvider implements IShareProvider {
// shares is a umount of a external storage. This is handled here
// apps/files_sharing/lib/external/manager.php
// TODO move this code over to this app
- return;
}
@@ -934,7 +933,6 @@ class FederatedShareProvider implements IShareProvider {
*/
public function groupDeleted($gid) {
// We don't handle groups here
- return;
}
/**
@@ -945,7 +943,6 @@ class FederatedShareProvider implements IShareProvider {
*/
public function userDeletedFromGroup($uid, $gid) {
// We don't handle groups here
- return;
}
/**
diff --git a/apps/files/l10n/zh_CN.js b/apps/files/l10n/zh_CN.js
index 1aceaa6eaf4..02f55447e76 100644
--- a/apps/files/l10n/zh_CN.js
+++ b/apps/files/l10n/zh_CN.js
@@ -19,6 +19,7 @@ OC.L10N.register(
"Uploading …" : "上传中…",
"…" : "undefined",
"{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} / {totalSize} ({bitrate})",
+ "Target folder does not exist any more" : "目标文件夹不存在",
"Actions" : "操作",
"Download" : "下载",
"Rename" : "重命名",
@@ -60,8 +61,11 @@ OC.L10N.register(
"You don’t have permission to upload or create files here" : "您没有权限在此上传或创建文件",
"_Uploading %n file_::_Uploading %n files_" : ["上传 %n 个文件"],
"New" : "新建",
+ "{used} of {quota} used" : "已使用{used} /{quota}",
+ "{used} used" : "{used} 已使用",
"\"{name}\" is an invalid file name." : "\"{name}\" 是一个无效的文件名",
"File name cannot be empty." : "文件名不能为空.",
+ "\"/\" is not allowed inside a file name." : "文件名不能包含“/”",
"\"{name}\" is not an allowed filetype" : "\"{name}\" 不是允许的文件类型",
"Storage of {owner} is full, files can not be updated or synced anymore!" : "{owner} 的存储空间已满, 文件将无法更新或同步!",
"Your storage is full, files can not be updated or synced anymore!" : "您的存储空间已满, 文件将无法更新或同步!",
@@ -77,6 +81,9 @@ OC.L10N.register(
"Favorite" : "收藏",
"New folder" : "新建文件夹",
"Upload file" : "上传文件",
+ "Not favorited" : "不受欢迎的",
+ "Remove from favorites" : "取消收藏",
+ "Add to favorites" : "收藏",
"An error occurred while trying to update the tags" : "更新标签时出错",
"Added to favorites" : "已添加到收藏",
"Removed from favorites" : "取消收藏",
diff --git a/apps/files/l10n/zh_CN.json b/apps/files/l10n/zh_CN.json
index d326104673b..773909549f2 100644
--- a/apps/files/l10n/zh_CN.json
+++ b/apps/files/l10n/zh_CN.json
@@ -17,6 +17,7 @@
"Uploading …" : "上传中…",
"…" : "undefined",
"{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} / {totalSize} ({bitrate})",
+ "Target folder does not exist any more" : "目标文件夹不存在",
"Actions" : "操作",
"Download" : "下载",
"Rename" : "重命名",
@@ -58,8 +59,11 @@
"You don’t have permission to upload or create files here" : "您没有权限在此上传或创建文件",
"_Uploading %n file_::_Uploading %n files_" : ["上传 %n 个文件"],
"New" : "新建",
+ "{used} of {quota} used" : "已使用{used} /{quota}",
+ "{used} used" : "{used} 已使用",
"\"{name}\" is an invalid file name." : "\"{name}\" 是一个无效的文件名",
"File name cannot be empty." : "文件名不能为空.",
+ "\"/\" is not allowed inside a file name." : "文件名不能包含“/”",
"\"{name}\" is not an allowed filetype" : "\"{name}\" 不是允许的文件类型",
"Storage of {owner} is full, files can not be updated or synced anymore!" : "{owner} 的存储空间已满, 文件将无法更新或同步!",
"Your storage is full, files can not be updated or synced anymore!" : "您的存储空间已满, 文件将无法更新或同步!",
@@ -75,6 +79,9 @@
"Favorite" : "收藏",
"New folder" : "新建文件夹",
"Upload file" : "上传文件",
+ "Not favorited" : "不受欢迎的",
+ "Remove from favorites" : "取消收藏",
+ "Add to favorites" : "收藏",
"An error occurred while trying to update the tags" : "更新标签时出错",
"Added to favorites" : "已添加到收藏",
"Removed from favorites" : "取消收藏",
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Share.php b/apps/files_external/3rdparty/icewind/smb/src/Share.php
index 8f1dace2be2..be1ba025508 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Share.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Share.php
@@ -370,8 +370,7 @@ class Share extends AbstractShare {
protected function execute($command) {
$this->connect();
$this->connection->write($command . PHP_EOL);
- $output = $this->connection->read();
- return $output;
+ return $this->connection->read();
}
/**
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php
index 7c536443a0e..03a24e89765 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -232,7 +232,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
} catch (\Exception $e) {
return $this->batchDelete();
}
- return false;
}
private function batchDelete($path = null) {
diff --git a/apps/files_external/lib/Service/UserStoragesService.php b/apps/files_external/lib/Service/UserStoragesService.php
index b225f1eec8c..db03befa852 100644
--- a/apps/files_external/lib/Service/UserStoragesService.php
+++ b/apps/files_external/lib/Service/UserStoragesService.php
@@ -112,8 +112,7 @@ class UserStoragesService extends StoragesService {
*/
public function addStorage(StorageConfig $newStorage) {
$newStorage->setApplicableUsers([$this->getUser()->getUID()]);
- $config = parent::addStorage($newStorage);
- return $config;
+ return parent::addStorage($newStorage);
}
/**
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index 575bf01fdb0..742962e6490 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -230,9 +230,7 @@ class ShareesAPIController extends OCSController {
$url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees') . '?';
}
$params['page'] = $page + 1;
- $link = '<' . $url . http_build_query($params) . '>; rel="next"';
-
- return $link;
+ return '<' . $url . http_build_query($params) . '>; rel="next"';
}
/**
diff --git a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
index 07f739fb702..33812c5a43e 100644
--- a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
+++ b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
@@ -75,7 +75,7 @@ class OwncloudGuestShareType implements IRepairStep {
protected function shouldRun() {
$appVersion = $this->config->getAppValue('files_sharing', 'installed_version', '0.0.0');
- return in_array($appVersion, ['0.10.0']) ||
+ return $appVersion === '0.10.0' ||
$this->config->getAppValue('core', 'vendor', '') === 'owncloud';
}
diff --git a/apps/files_sharing/lib/ShareBackend/Folder.php b/apps/files_sharing/lib/ShareBackend/Folder.php
index 80b141326d3..c48a26300a2 100644
--- a/apps/files_sharing/lib/ShareBackend/Folder.php
+++ b/apps/files_sharing/lib/ShareBackend/Folder.php
@@ -73,9 +73,7 @@ class Folder extends File implements \OCP\Share_Backend_Collection {
$query = \OCP\DB::prepare('SELECT `parent` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
$result = $query->execute(array($child));
$row = $result->fetchRow();
- $parent = $row ? $row['parent'] : null;
-
- return $parent;
+ return $row ? $row['parent'] : null;
}
public function getChildren($itemSource) {
diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php
index e6609034f91..3025d36a210 100644
--- a/apps/files_trashbin/lib/Storage.php
+++ b/apps/files_trashbin/lib/Storage.php
@@ -254,8 +254,7 @@ class Storage extends Wrapper {
* @return MoveToTrashEvent
*/
protected function createMoveToTrashEvent(Node $node) {
- $event = new MoveToTrashEvent($node);
- return $event;
+ return new MoveToTrashEvent($node);
}
/**
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 4c76c5340fa..d798312fda3 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -167,7 +167,7 @@ class Storage {
// to get the right target
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if ($ext === 'part') {
- $filename = substr($filename, 0, strlen($filename) - 5);
+ $filename = substr($filename, 0, -5);
}
// we only handle existing files
@@ -566,7 +566,7 @@ class Storage {
$fileData = $file->getData();
$filePath = $dir . '/' . $fileData['name'];
if ($file['type'] === 'dir') {
- array_push($dirs, $filePath);
+ $dirs[] = $filePath;
} else {
$versionsBegin = strrpos($filePath, '.v');
$relPathStart = strlen(self::VERSIONS_ROOT);
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 287c6abff59..31df8a18951 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -690,7 +690,6 @@ class ShareByMailProvider implements IShareProvider {
*/
public function deleteFromSelf(IShare $share, $recipient) {
// nothing to do here, mail shares are only outgoing shares
- return;
}
/**
@@ -981,7 +980,6 @@ class ShareByMailProvider implements IShareProvider {
* @param string $gid
*/
public function groupDeleted($gid) {
- return;
}
/**
@@ -991,7 +989,6 @@ class ShareByMailProvider implements IShareProvider {
* @param string $gid
*/
public function userDeletedFromGroup($uid, $gid) {
- return;
}
/**
diff --git a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
index 5c5500862e6..f5b01649bbb 100644
--- a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
+++ b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
@@ -90,8 +90,7 @@ class BackupCodesProvider implements IProvider {
* @return Template
*/
public function getTemplate(IUser $user) {
- $tmpl = new Template('twofactor_backupcodes', 'challenge');
- return $tmpl;
+ return new Template('twofactor_backupcodes', 'challenge');
}
/**
diff --git a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
index 84bf54d3379..2fb5fe8a6c0 100644
--- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
+++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
@@ -86,7 +86,7 @@ class BackupCodeStorage {
$dbCode->setUsed(0);
$this->mapper->insert($dbCode);
- array_push($result, $code);
+ $result[] = $code;
}
$this->publishEvent($user, 'codes_generated');
diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php
index 3157a7ab09d..3d1ae31cfef 100644
--- a/apps/user_ldap/lib/Helper.php
+++ b/apps/user_ldap/lib/Helper.php
@@ -123,8 +123,7 @@ class Helper {
sort($serverConnections);
$lastKey = array_pop($serverConnections);
$lastNumber = intval(str_replace('s', '', $lastKey));
- $nextPrefix = 's' . str_pad($lastNumber + 1, 2, '0', STR_PAD_LEFT);
- return $nextPrefix;
+ return 's' . str_pad($lastNumber + 1, 2, '0', STR_PAD_LEFT);
}
private function getServersConfig($value) {
diff --git a/apps/workflowengine/lib/Controller/RequestTime.php b/apps/workflowengine/lib/Controller/RequestTime.php
index dd0efa89b91..1a07ca20a4d 100644
--- a/apps/workflowengine/lib/Controller/RequestTime.php
+++ b/apps/workflowengine/lib/Controller/RequestTime.php
@@ -37,7 +37,7 @@ class RequestTime extends Controller {
if ($search !== '') {
$timezones = array_filter($timezones, function ($timezone) use ($search) {
- return strpos(strtolower($timezone), strtolower($search)) !== false;
+ return stripos($timezone, $search) !== false;
});
}
diff --git a/core/Command/Config/Import.php b/core/Command/Config/Import.php
index 4a8db1c9656..b6aa6e3411d 100644
--- a/core/Command/Config/Import.php
+++ b/core/Command/Config/Import.php
@@ -113,8 +113,7 @@ class Import extends Command implements CompletionAwareInterface {
* @return string
*/
protected function getArrayFromFile($importFile) {
- $content = file_get_contents($importFile);
- return $content;
+ return file_get_contents($importFile);
}
/**
diff --git a/core/Command/TwoFactorAuth/Base.php b/core/Command/TwoFactorAuth/Base.php
index fe817d214ba..c5340656534 100644
--- a/core/Command/TwoFactorAuth/Base.php
+++ b/core/Command/TwoFactorAuth/Base.php
@@ -28,7 +28,7 @@ use OCP\IUser;
use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareInterface;
use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
-class Base extends \OC\Core\Command\Base implements CompletionAwareInterface {
+class Base extends \OC\Core\Command\Base {
/** @var IUserManager */
protected $userManager;
diff --git a/core/l10n/pl.js b/core/l10n/pl.js
index aafc40e0613..0453ba70e62 100644
--- a/core/l10n/pl.js
+++ b/core/l10n/pl.js
@@ -56,6 +56,7 @@ OC.L10N.register(
"Search contacts …" : "Wyszukuję kontakty...",
"No contacts found" : "Nie znaleziono żadnych kontaktów",
"Show all contacts …" : "Pokazuję wszystkie kontakty...",
+ "Could not load your contacts" : "Nie można było załadować Twoich kontaktów",
"Loading your contacts …" : "Ładuję twoje kontakty...",
"Looking for {term} …" : "Szukam {term}...",
"<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\">Wystąpiły problemy przy sprawdzaniu integralności kodu Więcej informacji…</a>",
@@ -114,6 +115,7 @@ OC.L10N.register(
"No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Nie skonfigurowano pamięci cache. Jeśli to możliwe skonfiguruj pamięć cache, aby zwiększyć wydajność. Więcej informacji można znaleźć w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>.",
"/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "PHP nie może czytać z /dev/urandom co jest wymagane ze względów bezpieczeństwa. Więcej informacji można znaleźć w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>.",
"You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it." : "Posiadasz aktualnie PHP w wersji {version}. Aby skorzystać z <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">aktualizacji dotyczących wydajności i bezpieczeństwa otrzymanych z PHP Group</a> zachęcamy do podniesienia wersji PHP, kiedy tylko Twoja dystrybucja będzie je wspierała.",
+ "You are currently running PHP 5.6. The current major version of Nextcloud is the last that is supported on PHP 5.6. It is recommended to upgrade the PHP version to 7.0+ to be able to upgrade to Nextcloud 14." : "Używasz aktualnie PHP w wersji 5.6. Aktualna, główna wersja Nextcloud jest ostatnią wspierającą PHP 5.6. Zalecamy upgrade PHP do wersji 7.0+ aby można było w przyszłości korzystać z Nextcloud 14.",
"The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Konfiguracja nagłówków reverse proxy jest niepoprawna albo łączysz się do Nextclouda przez zaufane proxy. Jeśli nie łączysz się z zaufanego proxy, to jest to problem bezpieczeństwa i atakujący może podszyć się pod adres IP jako widoczny dla Nextclouda. Więcej informacji można znaleźć w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>.",
"Memcached is configured as distributed cache, but the wrong PHP module \"memcache\" is installed. \\OC\\Memcache\\Memcached only supports \"memcached\" and not \"memcache\". See the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki about both modules</a>." : "Jako cache jest skonfigurowane \"memcached\", ale błędny moduł PHP \"memcache\" jest zainstalowany. \\OC\\Memcache\\Memcached wspiera tylko \"memcached\", a nie \"memcache\". Sprawdź <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki o obu tych modułach</a>.",
"Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">List of invalid files…</a> / <a href=\"{rescanEndpoint}\">Rescan…</a>)" : "Niektóre pliki nie przeszły sprawdzania spójności. Dalsze informacje jak to naprawić mogą być znalezione w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">Lista niepoprawnych plików...</a> / <a href=\"{rescanEndpoint}\">Skanowanie ponowne…</a>)",
diff --git a/core/l10n/pl.json b/core/l10n/pl.json
index f3689127395..b2f7cd3c674 100644
--- a/core/l10n/pl.json
+++ b/core/l10n/pl.json
@@ -54,6 +54,7 @@
"Search contacts …" : "Wyszukuję kontakty...",
"No contacts found" : "Nie znaleziono żadnych kontaktów",
"Show all contacts …" : "Pokazuję wszystkie kontakty...",
+ "Could not load your contacts" : "Nie można było załadować Twoich kontaktów",
"Loading your contacts …" : "Ładuję twoje kontakty...",
"Looking for {term} …" : "Szukam {term}...",
"<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\">Wystąpiły problemy przy sprawdzaniu integralności kodu Więcej informacji…</a>",
@@ -112,6 +113,7 @@
"No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Nie skonfigurowano pamięci cache. Jeśli to możliwe skonfiguruj pamięć cache, aby zwiększyć wydajność. Więcej informacji można znaleźć w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>.",
"/dev/urandom is not readable by PHP which is highly discouraged for security reasons. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "PHP nie może czytać z /dev/urandom co jest wymagane ze względów bezpieczeństwa. Więcej informacji można znaleźć w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>.",
"You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it." : "Posiadasz aktualnie PHP w wersji {version}. Aby skorzystać z <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{phpLink}\">aktualizacji dotyczących wydajności i bezpieczeństwa otrzymanych z PHP Group</a> zachęcamy do podniesienia wersji PHP, kiedy tylko Twoja dystrybucja będzie je wspierała.",
+ "You are currently running PHP 5.6. The current major version of Nextcloud is the last that is supported on PHP 5.6. It is recommended to upgrade the PHP version to 7.0+ to be able to upgrade to Nextcloud 14." : "Używasz aktualnie PHP w wersji 5.6. Aktualna, główna wersja Nextcloud jest ostatnią wspierającą PHP 5.6. Zalecamy upgrade PHP do wersji 7.0+ aby można było w przyszłości korzystać z Nextcloud 14.",
"The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>." : "Konfiguracja nagłówków reverse proxy jest niepoprawna albo łączysz się do Nextclouda przez zaufane proxy. Jeśli nie łączysz się z zaufanego proxy, to jest to problem bezpieczeństwa i atakujący może podszyć się pod adres IP jako widoczny dla Nextclouda. Więcej informacji można znaleźć w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>.",
"Memcached is configured as distributed cache, but the wrong PHP module \"memcache\" is installed. \\OC\\Memcache\\Memcached only supports \"memcached\" and not \"memcache\". See the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki about both modules</a>." : "Jako cache jest skonfigurowane \"memcached\", ale błędny moduł PHP \"memcache\" jest zainstalowany. \\OC\\Memcache\\Memcached wspiera tylko \"memcached\", a nie \"memcache\". Sprawdź <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{wikiLink}\">memcached wiki o obu tych modułach</a>.",
"Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">documentation</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">List of invalid files…</a> / <a href=\"{rescanEndpoint}\">Rescan…</a>)" : "Niektóre pliki nie przeszły sprawdzania spójności. Dalsze informacje jak to naprawić mogą być znalezione w naszej <a target=\"_blank\" rel=\"noreferrer noopener\" href=\"{docLink}\">dokumentacji</a>. (<a href=\"{codeIntegrityDownloadEndpoint}\">Lista niepoprawnych plików...</a> / <a href=\"{rescanEndpoint}\">Skanowanie ponowne…</a>)",
diff --git a/core/l10n/tr.js b/core/l10n/tr.js
index 4c5ae4b2d3f..8ef1b2adf6d 100644
--- a/core/l10n/tr.js
+++ b/core/l10n/tr.js
@@ -56,6 +56,7 @@ OC.L10N.register(
"Search contacts …" : "Kişi arama...",
"No contacts found" : "Herhangi bir kişi bulunamadı",
"Show all contacts …" : "Tüm kişileri görüntüle...",
+ "Could not load your contacts" : "Kişileriniz yüklenemedi",
"Loading your contacts …" : "Kişileriniz yükleniyor...",
"Looking for {term} …" : "{term} ifadesi aranıyor...",
"<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\">Kod bütünlük sınamasında sorunlar çıktı. Ayrıntılı bilgi…</a>",
diff --git a/core/l10n/tr.json b/core/l10n/tr.json
index 2a670c5e246..9453db10fef 100644
--- a/core/l10n/tr.json
+++ b/core/l10n/tr.json
@@ -54,6 +54,7 @@
"Search contacts …" : "Kişi arama...",
"No contacts found" : "Herhangi bir kişi bulunamadı",
"Show all contacts …" : "Tüm kişileri görüntüle...",
+ "Could not load your contacts" : "Kişileriniz yüklenemedi",
"Loading your contacts …" : "Kişileriniz yükleniyor...",
"Looking for {term} …" : "{term} ifadesi aranıyor...",
"<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\">Kod bütünlük sınamasında sorunlar çıktı. Ayrıntılı bilgi…</a>",
diff --git a/lib/l10n/zh_CN.js b/lib/l10n/zh_CN.js
index 9fb446e472e..421a31bc1cb 100644
--- a/lib/l10n/zh_CN.js
+++ b/lib/l10n/zh_CN.js
@@ -31,14 +31,23 @@ OC.L10N.register(
"Invalid image" : "无效的图像",
"Avatar image is not square" : "头像图像不是正方形",
"today" : "今天",
+ "tomorrow" : "明天",
"yesterday" : "昨天",
+ "_in %n day_::_in %n days_" : ["%n天内"],
"_%n day ago_::_%n days ago_" : ["%n 天前"],
+ "next month" : "下月",
"last month" : "上月",
+ "_in %n month_::_in %n months_" : ["%n月内"],
"_%n month ago_::_%n months ago_" : ["%n 月前"],
+ "next year" : "明年",
"last year" : "去年",
+ "_in %n year_::_in %n years_" : ["%n年内"],
"_%n year ago_::_%n years ago_" : ["%n 年前"],
+ "_in %n hour_::_in %n hours_" : ["%n小时内"],
"_%n hour ago_::_%n hours ago_" : ["%n 小时前"],
+ "_in %n minute_::_in %n minutes_" : ["%n分钟内"],
"_%n minute ago_::_%n minutes ago_" : ["%n 分钟前"],
+ "in a few seconds" : "几秒钟内",
"seconds ago" : "几秒前",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "模块:%s不存在。请在 App 设置中开启或联系管理员。",
"File name is a reserved word" : "文件名包含敏感字符",
diff --git a/lib/l10n/zh_CN.json b/lib/l10n/zh_CN.json
index 77b53a5b409..3734f2630a3 100644
--- a/lib/l10n/zh_CN.json
+++ b/lib/l10n/zh_CN.json
@@ -29,14 +29,23 @@
"Invalid image" : "无效的图像",
"Avatar image is not square" : "头像图像不是正方形",
"today" : "今天",
+ "tomorrow" : "明天",
"yesterday" : "昨天",
+ "_in %n day_::_in %n days_" : ["%n天内"],
"_%n day ago_::_%n days ago_" : ["%n 天前"],
+ "next month" : "下月",
"last month" : "上月",
+ "_in %n month_::_in %n months_" : ["%n月内"],
"_%n month ago_::_%n months ago_" : ["%n 月前"],
+ "next year" : "明年",
"last year" : "去年",
+ "_in %n year_::_in %n years_" : ["%n年内"],
"_%n year ago_::_%n years ago_" : ["%n 年前"],
+ "_in %n hour_::_in %n hours_" : ["%n小时内"],
"_%n hour ago_::_%n hours ago_" : ["%n 小时前"],
+ "_in %n minute_::_in %n minutes_" : ["%n分钟内"],
"_%n minute ago_::_%n minutes ago_" : ["%n 分钟前"],
+ "in a few seconds" : "几秒钟内",
"seconds ago" : "几秒前",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "模块:%s不存在。请在 App 设置中开启或联系管理员。",
"File name is a reserved word" : "文件名包含敏感字符",
diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php
index 792dea4cff5..1b64fa59a91 100644
--- a/lib/private/Activity/Manager.php
+++ b/lib/private/Activity/Manager.php
@@ -231,7 +231,7 @@ class Manager implements IManager {
* @param \Closure $callable
*/
public function registerConsumer(\Closure $callable) {
- array_push($this->consumersClosures, $callable);
+ $this->consumersClosures[] = $callable;
$this->consumers = [];
}
@@ -244,7 +244,7 @@ class Manager implements IManager {
* @param \Closure $callable
*/
public function registerExtension(\Closure $callable) {
- array_push($this->extensionsClosures, $callable);
+ $this->extensionsClosures[] = $callable;
$this->extensions = [];
}
diff --git a/lib/private/App/CodeChecker/DeprecationCheck.php b/lib/private/App/CodeChecker/DeprecationCheck.php
index 0224fc6d2b1..a7cba692cf8 100644
--- a/lib/private/App/CodeChecker/DeprecationCheck.php
+++ b/lib/private/App/CodeChecker/DeprecationCheck.php
@@ -23,7 +23,7 @@
namespace OC\App\CodeChecker;
-class DeprecationCheck extends AbstractCheck implements ICheck {
+class DeprecationCheck extends AbstractCheck {
/**
* @return string
*/
diff --git a/lib/private/App/CodeChecker/PrivateCheck.php b/lib/private/App/CodeChecker/PrivateCheck.php
index 5d160b8f32a..f6b5fb4fb16 100644
--- a/lib/private/App/CodeChecker/PrivateCheck.php
+++ b/lib/private/App/CodeChecker/PrivateCheck.php
@@ -22,7 +22,7 @@
namespace OC\App\CodeChecker;
-class PrivateCheck extends AbstractCheck implements ICheck {
+class PrivateCheck extends AbstractCheck {
/**
* @return string
*/
diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php
index 344e420b7d3..fe4d7ff48f7 100644
--- a/lib/private/App/Platform.php
+++ b/lib/private/App/Platform.php
@@ -94,7 +94,6 @@ class Platform {
public function getLibraryVersion($name) {
$repo = new PlatformRepository();
- $lib = $repo->findLibrary($name);
- return $lib;
+ return $repo->findLibrary($name);
}
}
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 94c725f3fbc..d9e82819d14 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -335,7 +335,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* @return boolean|null
*/
public function registerMiddleWare($middleWare) {
- array_push($this->middleWares, $middleWare);
+ $this->middleWares[] = $middleWare;
}
/**
diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
index 306b8095a97..60d2ae8b5c9 100644
--- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
+++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
@@ -63,7 +63,7 @@ class MiddlewareDispatcher {
* @param Middleware $middleWare the middleware which will be added
*/
public function registerMiddleware(Middleware $middleWare){
- array_push($this->middlewares, $middleWare);
+ $this->middlewares[] = $middleWare;
}
diff --git a/lib/private/Collaboration/Collaborators/GroupPlugin.php b/lib/private/Collaboration/Collaborators/GroupPlugin.php
index 0b2b3d71028..b147d2d7b58 100644
--- a/lib/private/Collaboration/Collaborators/GroupPlugin.php
+++ b/lib/private/Collaboration/Collaborators/GroupPlugin.php
@@ -102,13 +102,13 @@ class GroupPlugin implements ISearchPlugin {
// user id and if so, we add that to the exact match list
$group = $this->groupManager->get($search);
if ($group instanceof IGroup && (!$this->shareWithGroupOnly || in_array($group->getGID(), $userGroups))) {
- array_push($result['exact'], [
+ $result['exact'][] = [
'label' => $group->getDisplayName(),
'value' => [
'shareType' => Share::SHARE_TYPE_GROUP,
'shareWith' => $group->getGID(),
],
- ]);
+ ];
}
}
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php
index ad677703547..d2639249d56 100644
--- a/lib/private/Collaboration/Collaborators/UserPlugin.php
+++ b/lib/private/Collaboration/Collaborators/UserPlugin.php
@@ -128,13 +128,13 @@ class UserPlugin implements ISearchPlugin {
}
if ($addUser) {
- array_push($result['exact'], [
+ $result['exact'][] = [
'label' => $user->getDisplayName(),
'value' => [
'shareType' => Share::SHARE_TYPE_USER,
'shareWith' => $user->getUID(),
],
- ]);
+ ];
}
}
}
diff --git a/lib/private/DB/Adapter.php b/lib/private/DB/Adapter.php
index 3123a1b0d53..e88e3cf09c6 100644
--- a/lib/private/DB/Adapter.php
+++ b/lib/private/DB/Adapter.php
@@ -108,7 +108,7 @@ class Adapter {
$query .= ' = ? AND ';
}
}
- $query = substr($query, 0, strlen($query) - 5);
+ $query = substr($query, 0, -5);
$query .= ' HAVING COUNT(*) = 0';
return $this->conn->executeUpdate($query, $inserts);
diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php
index 5507699c54a..dbeec9ded43 100644
--- a/lib/private/DB/AdapterSqlite.php
+++ b/lib/private/DB/AdapterSqlite.php
@@ -79,7 +79,7 @@ class AdapterSqlite extends Adapter {
$query .= ' = ? AND ';
}
}
- $query = substr($query, 0, strlen($query) - 5);
+ $query = substr($query, 0, -5);
$query .= ')';
return $this->conn->executeUpdate($query, $inserts);
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index cf017c73960..428f52fd9ef 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -208,9 +208,8 @@ class Cache implements ICache {
return array_map(function (array $data) {
return self::cacheEntryFromData($data, $this->mimetypeLoader);;
}, $files);
- } else {
- return array();
}
+ return [];
}
/**
diff --git a/lib/private/Files/Cache/FailedCache.php b/lib/private/Files/Cache/FailedCache.php
index 932a5e5181a..b64d66dc697 100644
--- a/lib/private/Files/Cache/FailedCache.php
+++ b/lib/private/Files/Cache/FailedCache.php
@@ -71,15 +71,12 @@ class FailedCache implements ICache {
}
public function put($file, array $data) {
- return;
}
public function insert($file, array $data) {
- return;
}
public function update($id, array $data) {
- return;
}
public function getId($file) {
@@ -95,19 +92,15 @@ class FailedCache implements ICache {
}
public function remove($file) {
- return;
}
public function move($source, $target) {
- return;
}
public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
- return;
}
public function clear() {
- return;
}
public function getStatus($file) {
diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php
index e00debe6903..304b2ccf464 100644
--- a/lib/private/Files/Node/Node.php
+++ b/lib/private/Files/Node/Node.php
@@ -118,7 +118,6 @@ class Node implements \OCP\Files\Node {
}
public function delete() {
- return;
}
/**
@@ -349,7 +348,6 @@ class Node implements \OCP\Files\Node {
}
public function getChecksum() {
- return;
}
/**
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index fb0b116666e..a6971cb0205 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -426,8 +426,7 @@ class View {
flush();
}
fclose($handle);
- $size = $this->filesize($path);
- return $size;
+ return $this->filesize($path);
}
return false;
}
@@ -476,8 +475,7 @@ class View {
echo fread($handle, $len);
flush();
}
- $size = ftell($handle) - $from;
- return $size;
+ return ftell($handle) - $from;
}
throw new \OCP\Files\UnseekableException('fseek error');
@@ -1083,8 +1081,7 @@ class View {
}
list($storage, $internalPath) = Filesystem::resolvePath($absolutePath . $postFix);
if ($storage) {
- $result = $storage->hash($type, $internalPath, $raw);
- return $result;
+ return $storage->hash($type, $internalPath, $raw);
}
}
return null;
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 8268be05d4b..a7ffb401b7b 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -407,7 +407,8 @@ class Factory implements IFactory {
$body .= ';';
$res = '';
$p = 0;
- for($i = 0; $i < strlen($body); $i++) {
+ $length = strlen($body);
+ for($i = 0; $i < $length; $i++) {
$ch = $body[$i];
switch ( $ch ) {
case '?':
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php
index 90ad7de9b59..a213a5b3b9b 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -249,9 +249,7 @@ class CertificateManager implements ICertificateManager {
if ($uid === '') {
$uid = $this->uid;
}
- $path = is_null($uid) ? '/files_external/' : '/' . $uid . '/files_external/';
-
- return $path;
+ return is_null($uid) ? '/files_external/' : '/' . $uid . '/files_external/';
}
/**
diff --git a/lib/private/Server.php b/lib/private/Server.php
index c0fb96dce86..1f572280c7c 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -243,9 +243,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService('SystemTagManagerFactory', function (Server $c) {
$config = $c->getConfig();
$factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory');
- /** @var \OC\SystemTag\ManagerFactory $factory */
- $factory = new $factoryClass($this);
- return $factory;
+ return new $factoryClass($this);
});
$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
return $c->query('SystemTagManagerFactory')->getManager();
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 34319760c86..c2b58c37cdb 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -295,15 +295,15 @@ class Session implements IUserSession, Emitter {
public function getLoginName() {
if ($this->activeUser) {
return $this->session->get('loginname');
- } else {
- $uid = $this->session->get('user_id');
- if ($uid) {
- $this->activeUser = $this->manager->get($uid);
- return $this->session->get('loginname');
- } else {
- return null;
- }
}
+
+ $uid = $this->session->get('user_id');
+ if ($uid) {
+ $this->activeUser = $this->manager->get($uid);
+ return $this->session->get('loginname');
+ }
+
+ return null;
}
/**
@@ -369,10 +369,10 @@ class Session implements IUserSession, Emitter {
if($this->isLoggedIn()) {
$this->prepareUserLogin($firstTimeLogin, $regenerateSessionId);
return true;
- } else {
- $message = \OC::$server->getL10N('lib')->t('Login canceled by app');
- throw new LoginException($message);
}
+
+ $message = \OC::$server->getL10N('lib')->t('Login canceled by app');
+ throw new LoginException($message);
}
/**
diff --git a/lib/private/legacy/db.php b/lib/private/legacy/db.php
index 6e487e25ad5..7c556baeaeb 100644
--- a/lib/private/legacy/db.php
+++ b/lib/private/legacy/db.php
@@ -170,8 +170,7 @@ class OC_DB {
*/
public static function createDbFromStructure( $file ) {
$schemaManager = self::getMDB2SchemaManager();
- $result = $schemaManager->createDbFromStructure($file);
- return $result;
+ return $schemaManager->createDbFromStructure($file);
}
/**
diff --git a/lib/private/legacy/db/statementwrapper.php b/lib/private/legacy/db/statementwrapper.php
index 7c3c4776aa7..12774c894e8 100644
--- a/lib/private/legacy/db/statementwrapper.php
+++ b/lib/private/legacy/db/statementwrapper.php
@@ -77,8 +77,7 @@ class OC_DB_StatementWrapper {
return false;
}
if ($this->isManipulation) {
- $count = $this->statement->rowCount();
- return $count;
+ return $this->statement->rowCount();
} else {
return $this;
}
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index e3365ca455f..c5279bff6b8 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -132,7 +132,7 @@ class OC_Template extends \OC\Template\Base {
foreach(array_reverse($coreDependencies['vendor']) as $vendorLibrary) {
//remove trailing ".js" as addVendorScript will append it
OC_Util::addVendorScript(
- substr($vendorLibrary, 0, strlen($vendorLibrary) - 3),null,true);
+ substr($vendorLibrary, 0, -3),null,true);
}
} else {
throw new \Exception('Cannot read core/js/core.json');
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index af5aff8371d..c373cb0d521 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -723,9 +723,7 @@ class UsersController extends Controller {
protected function signMessage(IUser $user, $message) {
$privateKey = $this->keyManager->getKey($user)->getPrivate();
openssl_sign(json_encode($message), $signature, $privateKey, OPENSSL_ALGO_SHA512);
- $signatureBase64 = base64_encode($signature);
-
- return $signatureBase64;
+ return base64_encode($signature);
}
/**