summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-01-26 09:41:31 +0100
committerGitHub <noreply@github.com>2018-01-26 09:41:31 +0100
commitaebb443ca5f7909dc1bea663ac0a707bafca07b2 (patch)
tree8208947b3092d6329a989f0154484d09194289dc /apps
parent469b3724b503a19e00040c910b42dc0b06aad23d (diff)
parent870fe20acc90cbfb89bf710f441d62f8bcf92f9d (diff)
downloadnextcloud-server-aebb443ca5f7909dc1bea663ac0a707bafca07b2.tar.gz
nextcloud-server-aebb443ca5f7909dc1bea663ac0a707bafca07b2.zip
Merge pull request #8056 from nextcloud/array-push
Use $var[] = $a instead of array_push - 2x faster
Diffstat (limited to 'apps')
-rw-r--r--apps/files_versions/lib/Storage.php2
-rw-r--r--apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 4c76c5340fa..6b8a441f7b3 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -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/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');