aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2021-01-12 09:15:48 +0000
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-18 13:31:24 +0100
commiteb502c02ff7693bb36318d857985f79e7bac370c (patch)
tree61a7a10839f0c3a19bf8af869af267c484b51e02 /lib
parentd79cc8ea6ddc6f562ed0eeffc13cdbedf5df81bb (diff)
downloadnextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.tar.gz
nextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.zip
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/autoloader.php2
-rw-r--r--lib/private/Activity/EventMerger.php2
-rw-r--r--lib/private/App/DependencyAnalyzer.php2
-rw-r--r--lib/private/AppFramework/App.php6
-rw-r--r--lib/private/AppFramework/Http/Request.php2
-rw-r--r--lib/private/AppFramework/Routing/RouteConfig.php2
-rw-r--r--lib/private/AppFramework/Routing/RouteParser.php2
-rw-r--r--lib/private/AppFramework/Utility/ControllerMethodReflector.php2
-rw-r--r--lib/private/Avatar/Avatar.php2
-rw-r--r--lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php2
-rw-r--r--lib/private/Collaboration/Collaborators/RemotePlugin.php4
-rw-r--r--lib/private/DB/QueryBuilder/QuoteHelper.php2
-rw-r--r--lib/private/Encryption/File.php2
-rw-r--r--lib/private/Encryption/Keys/Storage.php4
-rw-r--r--lib/private/Encryption/Update.php6
-rw-r--r--lib/private/Files/Cache/HomeCache.php2
-rw-r--r--lib/private/Files/Cache/HomePropagator.php2
-rw-r--r--lib/private/Files/Cache/QuerySearchHelper.php2
-rw-r--r--lib/private/Files/Cache/Wrapper/JailPropagator.php2
-rw-r--r--lib/private/Files/Config/UserMountCache.php2
-rw-r--r--lib/private/Files/Node/Folder.php2
-rw-r--r--lib/private/Files/Node/Node.php4
-rw-r--r--lib/private/Files/ObjectStore/SwiftFactory.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php2
-rw-r--r--lib/private/L10N/Factory.php2
-rw-r--r--lib/private/Mail/Mailer.php2
-rw-r--r--lib/private/Mail/Message.php4
-rw-r--r--lib/private/Preview/Bitmap.php2
-rw-r--r--lib/private/Preview/HEIC.php2
-rw-r--r--lib/private/Preview/MarkDown.php4
-rw-r--r--lib/private/Preview/Office.php2
-rw-r--r--lib/private/Preview/ProviderV1Adapter.php2
-rw-r--r--lib/private/Route/Router.php6
-rw-r--r--lib/private/Security/IdentityProof/Manager.php2
-rw-r--r--lib/private/Setup/AbstractDatabase.php2
-rw-r--r--lib/private/Share20/Manager.php8
-rw-r--r--lib/private/Template/IconsCacher.php6
-rw-r--r--lib/private/legacy/OC_Template.php2
-rw-r--r--lib/public/Files.php2
40 files changed, 56 insertions, 56 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php
index 61ec34e4523..cf25f4498a8 100644
--- a/lib/autoloader.php
+++ b/lib/autoloader.php
@@ -110,7 +110,7 @@ class Autoloader {
} elseif (strpos($class, 'OC_') === 0) {
$paths[] = \OC::$SERVERROOT . '/lib/private/legacy/' . strtolower(str_replace('_', '/', substr($class, 3)) . '.php');
} elseif (strpos($class, 'OCA\\') === 0) {
- list(, $app, $rest) = explode('\\', $class, 3);
+ [, $app, $rest] = explode('\\', $class, 3);
$app = strtolower($app);
$appPath = \OC_App::getAppPath($app);
if ($appPath && stream_resolve_include_path($appPath)) {
diff --git a/lib/private/Activity/EventMerger.php b/lib/private/Activity/EventMerger.php
index d2caad42fa7..9a59551c2ac 100644
--- a/lib/private/Activity/EventMerger.php
+++ b/lib/private/Activity/EventMerger.php
@@ -102,7 +102,7 @@ class EventMerger implements IEventMerger {
// Other parameters are not the same => can not combine
try {
- list($combined, $parameters) = $this->combineParameters($mergeParameter, $event, $previousEvent);
+ [$combined, $parameters] = $this->combineParameters($mergeParameter, $event, $previousEvent);
} catch (\UnexpectedValueException $e) {
return $event;
}
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
index 8476f9bc145..2ca0cdeabf3 100644
--- a/lib/private/App/DependencyAnalyzer.php
+++ b/lib/private/App/DependencyAnalyzer.php
@@ -123,7 +123,7 @@ class DependencyAnalyzer {
// version string but null. In case one parameter is null normalization
// will therefore be skipped
if ($first !== null && $second !== null) {
- list($first, $second) = $this->normalizeVersions($first, $second);
+ [$first, $second] = $this->normalizeVersions($first, $second);
}
return version_compare($first, $second, $operator);
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php
index d6bf7bc81c3..974da87eb6d 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -148,13 +148,13 @@ class App {
/** @var Dispatcher $dispatcher */
$dispatcher = $container['Dispatcher'];
- list(
+ [
$httpHeaders,
$responseHeaders,
$responseCookies,
$output,
$response
- ) = $dispatcher->dispatch($controller, $methodName);
+ ] = $dispatcher->dispatch($controller, $methodName);
$io = $container[IOutput::class];
@@ -228,7 +228,7 @@ class App {
$dispatcher = $container['Dispatcher'];
- list(, , $output) = $dispatcher->dispatch($controller, $methodName);
+ [, , $output] = $dispatcher->dispatch($controller, $methodName);
return $output;
}
}
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 91ae2269b7f..031e2d13ad9 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -776,7 +776,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// strip off the script name's dir and file name
// FIXME: Sabre does not really belong here
- list($path, $name) = \Sabre\Uri\split($scriptName);
+ [$path, $name] = \Sabre\Uri\split($scriptName);
if (!empty($path)) {
if ($path === $pathInfo || strpos($pathInfo, $path.'/') === 0) {
$pathInfo = substr($pathInfo, \strlen($path));
diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php
index c522d3436ca..5aa4db10e22 100644
--- a/lib/private/AppFramework/Routing/RouteConfig.php
+++ b/lib/private/AppFramework/Routing/RouteConfig.php
@@ -133,7 +133,7 @@ class RouteConfig {
if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
}
- list($controller, $action) = $split;
+ [$controller, $action] = $split;
$controllerName = $this->buildControllerName($controller);
$actionName = $this->buildActionName($action);
diff --git a/lib/private/AppFramework/Routing/RouteParser.php b/lib/private/AppFramework/Routing/RouteParser.php
index 8511ff9ee39..b65938d5b63 100644
--- a/lib/private/AppFramework/Routing/RouteParser.php
+++ b/lib/private/AppFramework/Routing/RouteParser.php
@@ -96,7 +96,7 @@ class RouteParser {
if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
}
- list($controller, $action) = $split;
+ [$controller, $action] = $split;
$controllerName = $this->buildControllerName($controller);
$actionName = $this->buildActionName($action);
diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
index 77417974d9a..dbc84ffcb39 100644
--- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php
+++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
@@ -63,7 +63,7 @@ class ControllerMethodReflector implements IControllerMethodReflector {
$cutString = str_replace(' ', '', $cutString);
$splittedArray = explode(',', $cutString);
foreach ($splittedArray as $annotationValues) {
- list($key, $value) = explode('=', $annotationValues);
+ [$key, $value] = explode('=', $annotationValues);
$this->annotations[$annontation][$key] = $value;
}
continue;
diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index 02fc04eae36..09d08f930e6 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -187,7 +187,7 @@ abstract class Avatar implements IAvatar {
$font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
$fontSize = $size * 0.4;
- list($x, $y) = $this->imageTTFCenter(
+ [$x, $y] = $this->imageTTFCenter(
$im, $text, $font, (int)$fontSize
);
diff --git a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php
index 62e0a43b41e..bfc4c682d4f 100644
--- a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php
+++ b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php
@@ -59,7 +59,7 @@ class RemoteGroupPlugin implements ISearchPlugin {
$resultType = new SearchResultType('remote_groups');
if ($this->enabled && $this->cloudIdManager->isValidCloudId($search) && $offset === 0) {
- list($remoteGroup, $serverUrl) = $this->splitGroupRemote($search);
+ [$remoteGroup, $serverUrl] = $this->splitGroupRemote($search);
$result['exact'][] = [
'label' => $remoteGroup . " ($serverUrl)",
'guid' => $remoteGroup,
diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php
index 3d9b1f9847a..1fec2912ca1 100644
--- a/lib/private/Collaboration/Collaborators/RemotePlugin.php
+++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php
@@ -87,7 +87,7 @@ class RemotePlugin implements ISearchPlugin {
$cloudIdType = $cloudIdData['type'];
}
try {
- list($remoteUser, $serverUrl) = $this->splitUserRemote($cloudId);
+ [$remoteUser, $serverUrl] = $this->splitUserRemote($cloudId);
} catch (\InvalidArgumentException $e) {
continue;
}
@@ -151,7 +151,7 @@ class RemotePlugin implements ISearchPlugin {
*/
if (!$searchResult->hasExactIdMatch($resultType) && $this->cloudIdManager->isValidCloudId($search) && $offset === 0) {
try {
- list($remoteUser, $serverUrl) = $this->splitUserRemote($search);
+ [$remoteUser, $serverUrl] = $this->splitUserRemote($search);
$localUser = $this->userManager->get($remoteUser);
if ($localUser === null || $search !== $localUser->getCloudId()) {
$result['exact'][] = [
diff --git a/lib/private/DB/QueryBuilder/QuoteHelper.php b/lib/private/DB/QueryBuilder/QuoteHelper.php
index 9f31e69fa7e..b50ff554a68 100644
--- a/lib/private/DB/QueryBuilder/QuoteHelper.php
+++ b/lib/private/DB/QueryBuilder/QuoteHelper.php
@@ -68,7 +68,7 @@ class QuoteHelper {
}
if (substr_count($string, '.')) {
- list($alias, $columnName) = explode('.', $string, 2);
+ [$alias, $columnName] = explode('.', $string, 2);
if ($columnName === '*') {
return '`' . $alias . '`.*';
diff --git a/lib/private/Encryption/File.php b/lib/private/Encryption/File.php
index c0a58d1256e..d4832d7caa2 100644
--- a/lib/private/Encryption/File.php
+++ b/lib/private/Encryption/File.php
@@ -70,7 +70,7 @@ class File implements \OCP\Encryption\IFile {
public function getAccessList($path) {
// Make sure that a share key is generated for the owner too
- list($owner, $ownerPath) = $this->util->getUidAndFilename($path);
+ [$owner, $ownerPath] = $this->util->getUidAndFilename($path);
// always add owner to the list of users with access to the file
$userIds = [$owner];
diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php
index c70ebc15ec2..6d43813b0f1 100644
--- a/lib/private/Encryption/Keys/Storage.php
+++ b/lib/private/Encryption/Keys/Storage.php
@@ -365,7 +365,7 @@ class Storage implements IStorage {
* @return string
*/
private function getFileKeyDir($encryptionModuleId, $path) {
- list($owner, $filename) = $this->util->getUidAndFilename($path);
+ [$owner, $filename] = $this->util->getUidAndFilename($path);
// in case of system wide mount points the keys are stored directly in the data directory
if ($this->util->isSystemWideMountPoint($filename, $owner)) {
@@ -457,7 +457,7 @@ class Storage implements IStorage {
* @return string
*/
protected function getPathToKeys($path) {
- list($owner, $relativePath) = $this->util->getUidAndFilename($path);
+ [$owner, $relativePath] = $this->util->getUidAndFilename($path);
$systemWideMountPoint = $this->util->isSystemWideMountPoint($relativePath, $owner);
if ($systemWideMountPoint) {
diff --git a/lib/private/Encryption/Update.php b/lib/private/Encryption/Update.php
index beb76a223b7..cf370910b88 100644
--- a/lib/private/Encryption/Update.php
+++ b/lib/private/Encryption/Update.php
@@ -87,7 +87,7 @@ class Update {
if ($this->encryptionManager->isEnabled()) {
if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
$path = Filesystem::getPath($params['fileSource']);
- list($owner, $ownerPath) = $this->getOwnerPath($path);
+ [$owner, $ownerPath] = $this->getOwnerPath($path);
$absPath = '/' . $owner . '/files/' . $ownerPath;
$this->update($absPath);
}
@@ -103,7 +103,7 @@ class Update {
if ($this->encryptionManager->isEnabled()) {
if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
$path = Filesystem::getPath($params['fileSource']);
- list($owner, $ownerPath) = $this->getOwnerPath($path);
+ [$owner, $ownerPath] = $this->getOwnerPath($path);
$absPath = '/' . $owner . '/files/' . $ownerPath;
$this->update($absPath);
}
@@ -136,7 +136,7 @@ class Update {
$this->encryptionManager->isEnabled() &&
dirname($source) !== dirname($target)
) {
- list($owner, $ownerPath) = $this->getOwnerPath($target);
+ [$owner, $ownerPath] = $this->getOwnerPath($target);
$absPath = '/' . $owner . '/files/' . $ownerPath;
$this->update($absPath);
}
diff --git a/lib/private/Files/Cache/HomeCache.php b/lib/private/Files/Cache/HomeCache.php
index 93906bfc93f..d2e8a1f301f 100644
--- a/lib/private/Files/Cache/HomeCache.php
+++ b/lib/private/Files/Cache/HomeCache.php
@@ -66,7 +66,7 @@ class HomeCache extends Cache {
$result->closeCursor();
if ($row) {
- list($sum) = array_values($row);
+ [$sum] = array_values($row);
$totalSize = 0 + $sum;
$entry['size'] += 0;
if ($entry['size'] !== $totalSize) {
diff --git a/lib/private/Files/Cache/HomePropagator.php b/lib/private/Files/Cache/HomePropagator.php
index ab78b1d3a5a..87e5018f9ab 100644
--- a/lib/private/Files/Cache/HomePropagator.php
+++ b/lib/private/Files/Cache/HomePropagator.php
@@ -42,7 +42,7 @@ class HomePropagator extends Propagator {
* @param int $sizeDifference number of bytes the file has grown
*/
public function propagateChange($internalPath, $time, $sizeDifference = 0) {
- list($baseFolder) = explode('/', $internalPath, 2);
+ [$baseFolder] = explode('/', $internalPath, 2);
if (in_array($baseFolder, $this->ignoredBaseFolders)) {
return [];
} else {
diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php
index 574b4c18d5d..da1f5729d3c 100644
--- a/lib/private/Files/Cache/QuerySearchHelper.php
+++ b/lib/private/Files/Cache/QuerySearchHelper.php
@@ -129,7 +129,7 @@ class QuerySearchHelper {
private function searchComparisonToDBExpr(IQueryBuilder $builder, ISearchComparison $comparison, array $operatorMap) {
$this->validateComparison($comparison);
- list($field, $value, $type) = $this->getOperatorFieldAndValue($comparison);
+ [$field, $value, $type] = $this->getOperatorFieldAndValue($comparison);
if (isset($operatorMap[$type])) {
$queryOperator = $operatorMap[$type];
return $builder->expr()->$queryOperator($field, $this->getParameterForValue($builder, $value));
diff --git a/lib/private/Files/Cache/Wrapper/JailPropagator.php b/lib/private/Files/Cache/Wrapper/JailPropagator.php
index 956d187783a..d18de7c2d1d 100644
--- a/lib/private/Files/Cache/Wrapper/JailPropagator.php
+++ b/lib/private/Files/Cache/Wrapper/JailPropagator.php
@@ -40,7 +40,7 @@ class JailPropagator extends Propagator {
*/
public function propagateChange($internalPath, $time, $sizeDifference = 0) {
/** @var \OC\Files\Storage\Storage $storage */
- list($storage, $sourceInternalPath) = $this->storage->resolvePath($internalPath);
+ [$storage, $sourceInternalPath] = $this->storage->resolvePath($internalPath);
$storage->getPropagator()->propagateChange($sourceInternalPath, $time, $sizeDifference);
}
}
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 46ea1394252..fddd2d956a1 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -322,7 +322,7 @@ class UserMountCache implements IUserMountCache {
*/
public function getMountsForFileId($fileId, $user = null) {
try {
- list($storageId, $internalPath) = $this->getCacheInfoFromFileId($fileId);
+ [$storageId, $internalPath] = $this->getCacheInfoFromFileId($fileId);
} catch (NotFoundException $e) {
return [];
}
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index 40499949110..fb0748465da 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -301,7 +301,7 @@ class Folder extends Node implements \OCP\Files\Folder {
public function getById($id) {
$mountCache = $this->root->getUserMountCache();
if (strpos($this->getPath(), '/', 1) > 0) {
- list(, $user) = explode('/', $this->getPath());
+ [, $user] = explode('/', $this->getPath());
} else {
$user = null;
}
diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php
index 92635a55baa..4077a7f4d72 100644
--- a/lib/private/Files/Node/Node.php
+++ b/lib/private/Files/Node/Node.php
@@ -159,7 +159,7 @@ class Node implements \OCP\Files\Node {
* @throws \OCP\Files\NotFoundException
*/
public function getStorage() {
- list($storage,) = $this->view->resolvePath($this->path);
+ [$storage,] = $this->view->resolvePath($this->path);
return $storage;
}
@@ -174,7 +174,7 @@ class Node implements \OCP\Files\Node {
* @return string
*/
public function getInternalPath() {
- list(, $internalPath) = $this->view->resolvePath($this->path);
+ [, $internalPath] = $this->view->resolvePath($this->path);
return $internalPath;
}
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index 54975e8d021..8a4f3fcd905 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -212,7 +212,7 @@ class SwiftFactory {
if (!$hasValidCachedToken) {
unset($this->params['cachedToken']);
try {
- list($token, $serviceUrl) = $authService->authenticate($this->params);
+ [$token, $serviceUrl] = $authService->authenticate($this->params);
$this->cacheToken($token, $serviceUrl, $cacheKey);
} catch (ConnectException $e) {
throw new StorageAuthException('Failed to connect to keystone, verify the keystone url', $e);
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index 1ce0eef65ad..dbbe2890df0 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -532,7 +532,7 @@ class Jail extends Wrapper {
return $storage->writeStream($this->getUnjailedPath($path), $stream, $size);
} else {
$target = $this->fopen($path, 'w');
- list($count, $result) = \OC_Helper::streamCopy($stream, $target);
+ [$count, $result] = \OC_Helper::streamCopy($stream, $target);
fclose($stream);
fclose($target);
return $count;
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php
index ecd3dcf1c39..ef8f7293ccb 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -633,7 +633,7 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
return $storage->writeStream($path, $stream, $size);
} else {
$target = $this->fopen($path, 'w');
- list($count, $result) = \OC_Helper::streamCopy($stream, $target);
+ [$count, $result] = \OC_Helper::streamCopy($stream, $target);
fclose($stream);
fclose($target);
return $count;
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 47191475580..6640e596ab1 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -421,7 +421,7 @@ class Factory implements IFactory {
$preferences = preg_split('/,\s*/', strtolower($header));
foreach ($preferences as $preference) {
- list($preferred_language) = explode(';', $preference);
+ [$preferred_language] = explode(';', $preference);
$preferred_language = str_replace('-', '_', $preferred_language);
foreach ($available as $available_language) {
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 2e996dea502..e31784db587 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -244,7 +244,7 @@ class Mailer implements IMailer {
return $email;
}
- list($name, $domain) = explode('@', $email, 2);
+ [$name, $domain] = explode('@', $email, 2);
$domain = idn_to_ascii($domain, 0,INTL_IDNA_VARIANT_UTS46);
return $name.'@'.$domain;
}
diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php
index bd7c01bd358..a158c573eaf 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -80,11 +80,11 @@ class Message implements IMessage {
foreach ($addresses as $email => $readableName) {
if (!is_numeric($email)) {
- list($name, $domain) = explode('@', $email, 2);
+ [$name, $domain] = explode('@', $email, 2);
$domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46);
$convertedAddresses[$name.'@'.$domain] = $readableName;
} else {
- list($name, $domain) = explode('@', $readableName, 2);
+ [$name, $domain] = explode('@', $readableName, 2);
$domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46);
$convertedAddresses[$email] = $name.'@'.$domain;
}
diff --git a/lib/private/Preview/Bitmap.php b/lib/private/Preview/Bitmap.php
index 7322e07ab34..e8d8c7a3fa5 100644
--- a/lib/private/Preview/Bitmap.php
+++ b/lib/private/Preview/Bitmap.php
@@ -106,7 +106,7 @@ abstract class Bitmap extends ProviderV2 {
* @return \Imagick
*/
private function resize($bp, $maxX, $maxY) {
- list($previewWidth, $previewHeight) = array_values($bp->getImageGeometry());
+ [$previewWidth, $previewHeight] = array_values($bp->getImageGeometry());
// We only need to resize a preview which doesn't fit in the maximum dimensions
if ($previewWidth > $maxX || $previewHeight > $maxY) {
diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php
index f9f85090a80..872db6f2ec9 100644
--- a/lib/private/Preview/HEIC.php
+++ b/lib/private/Preview/HEIC.php
@@ -122,7 +122,7 @@ class HEIC extends ProviderV2 {
* @return \Imagick
*/
private function resize($bp, $maxX, $maxY) {
- list($previewWidth, $previewHeight) = array_values($bp->getImageGeometry());
+ [$previewWidth, $previewHeight] = array_values($bp->getImageGeometry());
// We only need to resize a preview which doesn't fit in the maximum dimensions
if ($previewWidth > $maxX || $previewHeight > $maxY) {
diff --git a/lib/private/Preview/MarkDown.php b/lib/private/Preview/MarkDown.php
index d809c6a9443..d900c2b3ac2 100644
--- a/lib/private/Preview/MarkDown.php
+++ b/lib/private/Preview/MarkDown.php
@@ -75,8 +75,8 @@ class MarkDown extends TXT {
imagecolorallocate($image, 255, 255, 255);
$textColor = imagecolorallocate($image, 0, 0, 0);
- $fontFile = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
- $fontFileBold = __DIR__ . '/../../../core/fonts/NotoSans-Bold.ttf';
+ $fontFile = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
+ $fontFileBold = __DIR__ . '/../../../core/fonts/NotoSans-Bold.ttf';
$canUseTTF = function_exists('imagettftext');
diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php
index 6719aeace8f..d6f9ac3dfd7 100644
--- a/lib/private/Preview/Office.php
+++ b/lib/private/Preview/Office.php
@@ -59,7 +59,7 @@ abstract class Office extends ProviderV2 {
//create imagick object from png
$pngPreview = null;
try {
- list($dirname, , , $filename) = array_values(pathinfo($absPath));
+ [$dirname, , , $filename] = array_values(pathinfo($absPath));
$pngPreview = $tmpDir . '/' . $filename . '.png';
$png = new \imagick($pngPreview . '[0]');
diff --git a/lib/private/Preview/ProviderV1Adapter.php b/lib/private/Preview/ProviderV1Adapter.php
index f09b0f47583..6f5242a5204 100644
--- a/lib/private/Preview/ProviderV1Adapter.php
+++ b/lib/private/Preview/ProviderV1Adapter.php
@@ -50,7 +50,7 @@ class ProviderV1Adapter implements IProviderV2 {
}
public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
- list($view, $path) = $this->getViewAndPath($file);
+ [$view, $path] = $this->getViewAndPath($file);
$thumbnail = $this->providerV1->getThumbnail($path, $maxX, $maxY, false, $view);
return $thumbnail === false ? null: $thumbnail;
}
diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php
index 71bc4a6c4f7..8a7123ffc88 100644
--- a/lib/private/Route/Router.php
+++ b/lib/private/Route/Router.php
@@ -237,14 +237,14 @@ class Router implements IRouter {
public function findMatchingRoute(string $url): array {
if (substr($url, 0, 6) === '/apps/') {
// empty string / 'apps' / $app / rest of the route
- list(, , $app,) = explode('/', $url, 4);
+ [, , $app,] = explode('/', $url, 4);
$app = \OC_App::cleanAppId($app);
\OC::$REQUESTEDAPP = $app;
$this->loadRoutes($app);
} elseif (substr($url, 0, 13) === '/ocsapp/apps/') {
// empty string / 'ocsapp' / 'apps' / $app / rest of the route
- list(, , , $app,) = explode('/', $url, 5);
+ [, , , $app,] = explode('/', $url, 5);
$app = \OC_App::cleanAppId($app);
\OC::$REQUESTEDAPP = $app;
@@ -347,7 +347,7 @@ class Router implements IRouter {
}
$name = $this->fixLegacyRootName($name);
if (strpos($name, '.') !== false) {
- list($appName, $other) = explode('.', $name, 3);
+ [$appName, $other] = explode('.', $name, 3);
// OCS routes are prefixed with "ocs."
if ($appName === 'ocs') {
$appName = $other;
diff --git a/lib/private/Security/IdentityProof/Manager.php b/lib/private/Security/IdentityProof/Manager.php
index 2fa09da3189..6c54f1fa2de 100644
--- a/lib/private/Security/IdentityProof/Manager.php
+++ b/lib/private/Security/IdentityProof/Manager.php
@@ -100,7 +100,7 @@ class Manager {
* @throws \RuntimeException
*/
protected function generateKey(string $id): Key {
- list($publicKey, $privateKey) = $this->generateKeyPair();
+ [$publicKey, $privateKey] = $this->generateKeyPair();
// Write the private and public key to the disk
try {
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index e0761db3070..77f3c02f9f6 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -127,7 +127,7 @@ abstract class AbstractDatabase {
}
} elseif (strpos($this->dbHost, ':')) {
// Host variable may carry a port or socket.
- list($host, $portOrSocket) = explode(':', $this->dbHost, 2);
+ [$host, $portOrSocket] = explode(':', $this->dbHost, 2);
if (ctype_digit($portOrSocket)) {
$connectionParams['port'] = $portOrSocket;
} else {
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 32bc0363b99..1ca9f557e22 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1191,7 +1191,7 @@ class Manager implements IManager {
* @param string $recipientId
*/
public function deleteFromSelf(IShare $share, $recipientId) {
- list($providerId, ) = $this->splitFullId($share->getFullId());
+ [$providerId, ] = $this->splitFullId($share->getFullId());
$provider = $this->factory->getProvider($providerId);
$provider->deleteFromSelf($share, $recipientId);
@@ -1200,7 +1200,7 @@ class Manager implements IManager {
}
public function restoreShare(IShare $share, string $recipientId): IShare {
- list($providerId, ) = $this->splitFullId($share->getFullId());
+ [$providerId, ] = $this->splitFullId($share->getFullId());
$provider = $this->factory->getProvider($providerId);
return $provider->restore($share, $recipientId);
@@ -1229,7 +1229,7 @@ class Manager implements IManager {
}
}
- list($providerId, ) = $this->splitFullId($share->getFullId());
+ [$providerId, ] = $this->splitFullId($share->getFullId());
$provider = $this->factory->getProvider($providerId);
return $provider->move($share, $recipientId);
@@ -1375,7 +1375,7 @@ class Manager implements IManager {
throw new ShareNotFound();
}
- list($providerId, $id) = $this->splitFullId($id);
+ [$providerId, $id] = $this->splitFullId($id);
try {
$provider = $this->factory->getProvider($providerId);
diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php
index 9b80711dd29..25f990beff1 100644
--- a/lib/private/Template/IconsCacher.php
+++ b/lib/private/Template/IconsCacher.php
@@ -127,7 +127,7 @@ class IconsCacher {
$list = '';
foreach ($icons as $icon => $url) {
$list .= "--$icon: url('$url');";
- list($location,$color) = $this->parseUrl($url);
+ [$location,$color] = $this->parseUrl($url);
$svg = false;
if ($location !== '' && \file_exists($location)) {
$svg = \file_get_contents($location);
@@ -165,12 +165,12 @@ class IconsCacher {
if (\strpos($url, $base . 'core') === 0) {
$cleanUrl = \substr($cleanUrl, \strlen('core'));
if (\preg_match('/\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) {
- list(,$cleanUrl,$color) = $matches;
+ [,$cleanUrl,$color] = $matches;
$location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg';
}
} elseif (\strpos($url, $base) === 0) {
if (\preg_match('/([A-z0-9\_\-]+)\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) {
- list(,$app,$cleanUrl, $color) = $matches;
+ [,$app,$cleanUrl, $color] = $matches;
$location = \OC_App::getAppPath($app) . '/img/' . $cleanUrl . '.svg';
if ($app === 'settings') {
$location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg';
diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php
index baf2356b549..468f6acad44 100644
--- a/lib/private/legacy/OC_Template.php
+++ b/lib/private/legacy/OC_Template.php
@@ -86,7 +86,7 @@ class OC_Template extends \OC\Template\Base {
/** @var \OCP\Defaults $themeDefaults */
$themeDefaults = \OC::$server->query(\OCP\Defaults::class);
- list($path, $template) = $this->findTemplate($theme, $app, $name);
+ [$path, $template] = $this->findTemplate($theme, $app, $name);
// Set the private data
$this->renderAs = $renderAs;
diff --git a/lib/public/Files.php b/lib/public/Files.php
index a3787107a56..0adaeaafd2c 100644
--- a/lib/public/Files.php
+++ b/lib/public/Files.php
@@ -91,7 +91,7 @@ class Files {
* @deprecated 14.0.0
*/
public static function streamCopy($source, $target) {
- list($count, ) = \OC_Helper::streamCopy($source, $target);
+ [$count, ] = \OC_Helper::streamCopy($source, $target);
return $count;
}