diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2021-02-18 16:05:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 16:05:54 +0300 |
commit | 5026d2cca10fa65be68367002eff147d7dc71077 (patch) | |
tree | d4d7119b0b8f547aebcc857c5297fc52ccc5a4b3 | |
parent | bbb39cf3deb350738a28b5f5bdf40572f1406897 (diff) | |
parent | eb502c02ff7693bb36318d857985f79e7bac370c (diff) |
Merge pull request #25086 from nextcloud/dependabot/composer/nextcloud/coding-standard-0.5.0
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
135 files changed, 480 insertions, 538 deletions
diff --git a/.php_cs.dist b/.php_cs.dist index 59781f0f835..ca79254e94a 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -9,12 +9,12 @@ use Nextcloud\CodingStandard\Config; $config = new Config(); $config ->getFinder() - ->ignoreVCSIgnored(true) ->exclude('config') ->exclude('data') ->notPath('3rdparty') ->notPath('build/stubs') ->notPath('composer') + ->notPath('node_modules') ->notPath('vendor') ->in(__DIR__); return $config; diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php index 20e0667d143..9dd88f0d888 100644 --- a/apps/comments/lib/Notification/Notifier.php +++ b/apps/comments/lib/Notification/Notifier.php @@ -133,7 +133,7 @@ class Notifier implements INotifier { if (strpos($path, '/' . $notification->getUser() . '/files/') === 0) { // Remove /user/files/... $fullPath = $path; - list(,,, $path) = explode('/', $fullPath, 4); + [,,, $path] = explode('/', $fullPath, 4); } $subjectParameters = [ 'file' => [ @@ -155,7 +155,7 @@ class Notifier implements INotifier { 'name' => $displayName, ]; } - list($message, $messageParameters) = $this->commentToRichMessage($comment); + [$message, $messageParameters] = $this->commentToRichMessage($comment); $notification->setRichSubject($subject, $subjectParameters) ->setParsedSubject($this->richToParsed($subject, $subjectParameters)) ->setRichMessage($message, $messageParameters) diff --git a/apps/contactsinteraction/lib/AddressBook.php b/apps/contactsinteraction/lib/AddressBook.php index 55819380b9a..55a275411dd 100644 --- a/apps/contactsinteraction/lib/AddressBook.php +++ b/apps/contactsinteraction/lib/AddressBook.php @@ -170,7 +170,7 @@ class AddressBook extends ExternalAddressBook implements IACL { } private function getUid(): string { - list(, $uid) = \Sabre\Uri\split($this->principalUri); + [, $uid] = \Sabre\Uri\split($this->principalUri); return $uid; } } diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 9bc95124c22..dcca8324397 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -277,7 +277,7 @@ class Application extends App implements IBootstrap { $config = $serverContainer->getConfig(); $principalUri = $event->getArgument('calendarData')['principaluri']; if (strpos($principalUri, 'principals/users') === 0) { - list(, $UID) = \Sabre\Uri\split($principalUri); + [, $UID] = \Sabre\Uri\split($principalUri); $uri = $event->getArgument('calendarData')['uri']; if ($config->getUserValue($UID, 'dav', 'defaultCalendar') === $uri) { $config->deleteUserValue($UID, 'dav', 'defaultCalendar'); diff --git a/apps/dav/lib/Avatars/AvatarHome.php b/apps/dav/lib/Avatars/AvatarHome.php index fd342676bfd..cbdd2b21b12 100644 --- a/apps/dav/lib/Avatars/AvatarHome.php +++ b/apps/dav/lib/Avatars/AvatarHome.php @@ -101,7 +101,7 @@ class AvatarHome implements ICollection { } public function getName() { - list(,$name) = Uri\split($this->principalInfo['uri']); + [,$name] = Uri\split($this->principalInfo['uri']); return $name; } diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 6b84512fc93..1d82eee5cb5 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -365,7 +365,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ->setParameter('type', 'calendar') ->setParameter('principaluri', $principals, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY); - $result = $query->execute(); + $result = $query->execute(); $readOnlyPropertyName = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only'; while ($row = $result->fetch()) { @@ -387,7 +387,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } } - list(, $name) = Uri\split($row['principaluri']); + [, $name] = Uri\split($row['principaluri']); $uri = $row['uri'] . '_shared_by_' . $name; $row['displayname'] = $row['displayname'] . ' (' . $this->getUserDisplayName($name) . ')'; $components = []; @@ -511,7 +511,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription while ($row = $result->fetch()) { $row['principaluri'] = (string) $row['principaluri']; - list(, $name) = Uri\split($row['principaluri']); + [, $name] = Uri\split($row['principaluri']); $row['displayname'] = $row['displayname'] . "($name)"; $components = []; if ($row['components']) { @@ -578,7 +578,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } $row['principaluri'] = (string) $row['principaluri']; - list(, $name) = Uri\split($row['principaluri']); + [, $name] = Uri\split($row['principaluri']); $row['displayname'] = $row['displayname'] . ' ' . "($name)"; $components = []; if ($row['components']) { @@ -2837,7 +2837,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription */ private function convertPrincipal($principalUri, $toV2) { if ($this->principalBackend->getPrincipalPrefix() === 'principals') { - list(, $name) = Uri\split($principalUri); + [, $name] = Uri\split($principalUri); if ($toV2 === true) { return "principals/users/$name"; } diff --git a/apps/dav/lib/CalDAV/Plugin.php b/apps/dav/lib/CalDAV/Plugin.php index c2b8830b34c..f87907e6c5d 100644 --- a/apps/dav/lib/CalDAV/Plugin.php +++ b/apps/dav/lib/CalDAV/Plugin.php @@ -40,15 +40,15 @@ class Plugin extends \Sabre\CalDAV\Plugin { */ public function getCalendarHomeForPrincipal($principalUrl) { if (strrpos($principalUrl, 'principals/users', -strlen($principalUrl)) !== false) { - list(, $principalId) = \Sabre\Uri\split($principalUrl); + [, $principalId] = \Sabre\Uri\split($principalUrl); return self::CALENDAR_ROOT . '/' . $principalId; } if (strrpos($principalUrl, 'principals/calendar-resources', -strlen($principalUrl)) !== false) { - list(, $principalId) = \Sabre\Uri\split($principalUrl); + [, $principalId] = \Sabre\Uri\split($principalUrl); return self::SYSTEM_CALENDAR_ROOT . '/calendar-resources/' . $principalId; } if (strrpos($principalUrl, 'principals/calendar-rooms', -strlen($principalUrl)) !== false) { - list(, $principalId) = \Sabre\Uri\split($principalUrl); + [, $principalId] = \Sabre\Uri\split($principalUrl); return self::SYSTEM_CALENDAR_ROOT . '/calendar-rooms/' . $principalId; } } diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index bfe4e938a5d..8eb47511d48 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -163,9 +163,9 @@ abstract class AbstractPrincipalBackend implements BackendInterface { if (strpos($path, $this->principalPrefix) !== 0) { return null; } - list(, $name) = \Sabre\Uri\split($path); + [, $name] = \Sabre\Uri\split($path); - list($backendId, $resourceId) = explode('-', $name, 2); + [$backendId, $resourceId] = explode('-', $name, 2); $query = $this->db->getQueryBuilder(); $query->select(['id', 'backend_id', 'resource_id', 'email', 'displayname']) @@ -404,8 +404,8 @@ abstract class AbstractPrincipalBackend implements BackendInterface { return null; } - list(, $name) = \Sabre\Uri\split($path); - list($backendId, $resourceId) = explode('-', $name, 2); + [, $name] = \Sabre\Uri\split($path); + [$backendId, $resourceId] = explode('-', $name, 2); $query = $this->db->getQueryBuilder(); $query->select(['id', 'backend_id', 'resource_id', 'email', 'displayname', 'group_restrictions']) diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 1f9885c0064..7c2f6b71a41 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -590,7 +590,7 @@ class IMipPlugin extends SabreIMipPlugin { /** @var Property\ICalendar\CalAddress $organizer */ $organizer = $vevent->ORGANIZER; $organizerURI = $organizer->getNormalizedValue(); - list($scheme,$organizerEmail) = explode(':',$organizerURI,2); # strip off scheme mailto: + [$scheme,$organizerEmail] = explode(':',$organizerURI,2); # strip off scheme mailto: /** @var string|null $organizerName */ $organizerName = isset($organizer['CN']) ? $organizer['CN'] : null; $organizerHTML = sprintf('<a href="%s">%s</a>', @@ -619,7 +619,7 @@ class IMipPlugin extends SabreIMipPlugin { $attendeesText = []; foreach ($attendees as $attendee) { $attendeeURI = $attendee->getNormalizedValue(); - list($scheme,$attendeeEmail) = explode(':',$attendeeURI,2); # strip off scheme mailto: + [$scheme,$attendeeEmail] = explode(':',$attendeeURI,2); # strip off scheme mailto: $attendeeName = isset($attendee['CN']) ? $attendee['CN'] : null; $attendeeHTML = sprintf('<a href="%s">%s</a>', htmlspecialchars($attendeeURI), diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 9ccabdc86fd..d384968e921 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -291,7 +291,7 @@ EOF; } if (strpos($principalUrl, 'principals/users') === 0) { - list(, $userId) = split($principalUrl); + [, $userId] = split($principalUrl); $uri = $this->config->getUserValue($userId, 'dav', 'defaultCalendar', CalDavBackend::PERSONAL_CALENDAR_URI); $displayName = CalDavBackend::PERSONAL_CALENDAR_NAME; } elseif (strpos($principalUrl, 'principals/calendar-resources') === 0 || diff --git a/apps/dav/lib/CalDAV/Search/SearchPlugin.php b/apps/dav/lib/CalDAV/Search/SearchPlugin.php index 23ce1bf3e8c..a25abac6020 100644 --- a/apps/dav/lib/CalDAV/Search/SearchPlugin.php +++ b/apps/dav/lib/CalDAV/Search/SearchPlugin.php @@ -146,7 +146,7 @@ class SearchPlugin extends ServerPlugin { $nodePaths = $node->calendarSearch($report->filters, $report->limit, $report->offset); foreach ($nodePaths as $path) { - list($properties) = $this->server->getPropertiesForPath( + [$properties] = $this->server->getPropertiesForPath( $this->server->getRequestUri() . '/' . $path, $report->properties); $result[] = $properties; diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index a26c6c24a8e..9246fc68ac9 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -223,7 +223,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { } } - list(, $name) = \Sabre\Uri\split($row['principaluri']); + [, $name] = \Sabre\Uri\split($row['principaluri']); $uri = $row['uri'] . '_shared_by_' . $name; $displayName = $row['displayname'] . ' (' . $this->getUserDisplayName($name) . ')'; @@ -1338,7 +1338,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { private function convertPrincipal($principalUri, $toV2) { if ($this->principalBackend->getPrincipalPrefix() === 'principals') { - list(, $name) = \Sabre\Uri\split($principalUri); + [, $name] = \Sabre\Uri\split($principalUri); if ($toV2 === true) { return "principals/users/$name"; } diff --git a/apps/dav/lib/CardDAV/PhotoCache.php b/apps/dav/lib/CardDAV/PhotoCache.php index 3d88eef5789..9b687658d5f 100644 --- a/apps/dav/lib/CardDAV/PhotoCache.php +++ b/apps/dav/lib/CardDAV/PhotoCache.php @@ -226,7 +226,7 @@ class PhotoCache { return false; } if (substr_count($parsed['path'], ';') === 1) { - list($type) = explode(';', $parsed['path']); + [$type] = explode(';', $parsed['path']); } $val = file_get_contents($val); } else { diff --git a/apps/dav/lib/CardDAV/Plugin.php b/apps/dav/lib/CardDAV/Plugin.php index 5f6ecb9cd8b..6079b1a42a8 100644 --- a/apps/dav/lib/CardDAV/Plugin.php +++ b/apps/dav/lib/CardDAV/Plugin.php @@ -44,15 +44,15 @@ class Plugin extends \Sabre\CardDAV\Plugin { */ protected function getAddressbookHomeForPrincipal($principal) { if (strrpos($principal, 'principals/users', -strlen($principal)) !== false) { - list(, $principalId) = \Sabre\Uri\split($principal); + [, $principalId] = \Sabre\Uri\split($principal); return self::ADDRESSBOOK_ROOT . '/users/' . $principalId; } if (strrpos($principal, 'principals/groups', -strlen($principal)) !== false) { - list(, $principalId) = \Sabre\Uri\split($principal); + [, $principalId] = \Sabre\Uri\split($principal); return self::ADDRESSBOOK_ROOT . '/groups/' . $principalId; } if (strrpos($principal, 'principals/system', -strlen($principal)) !== false) { - list(, $principalId) = \Sabre\Uri\split($principal); + [, $principalId] = \Sabre\Uri\split($principal); return self::ADDRESSBOOK_ROOT . '/system/' . $principalId; } } diff --git a/apps/dav/lib/Command/MoveCalendar.php b/apps/dav/lib/Command/MoveCalendar.php index 8b77eda47a3..e0b0b63ff66 100644 --- a/apps/dav/lib/Command/MoveCalendar.php +++ b/apps/dav/lib/Command/MoveCalendar.php @@ -212,7 +212,7 @@ class MoveCalendar extends Command { private function checkShares(array $calendar, string $userOrigin, string $userDestination, bool $force = false): bool { $shares = $this->calDav->getShares($calendar['id']); foreach ($shares as $share) { - list(, $prefix, $userOrGroup) = explode('/', $share['href'], 3); + [, $prefix, $userOrGroup] = explode('/', $share['href'], 3); /** * Check that user destination is member of the groups which whom the calendar was shared diff --git a/apps/dav/lib/Connector/LegacyDAVACL.php b/apps/dav/lib/Connector/LegacyDAVACL.php index 908c6265bf6..fd74daaeca1 100644 --- a/apps/dav/lib/Connector/LegacyDAVACL.php +++ b/apps/dav/lib/Connector/LegacyDAVACL.php @@ -54,7 +54,7 @@ class LegacyDAVACL extends DavAclPlugin { } private function convertPrincipal($principal, $toV2) { - list(, $name) = \Sabre\Uri\split($principal); + [, $name] = \Sabre\Uri\split($principal); if ($toV2) { return "principals/users/$name"; } diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index a4948a795a1..c6213cdbc81 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -144,7 +144,7 @@ class File extends Node implements IFile { } /** @var Storage $partStorage */ - list($partStorage) = $this->fileView->resolvePath($this->path); + [$partStorage] = $this->fileView->resolvePath($this->path); $needsPartFile = $partStorage->needsPartFile() && (strlen($this->path) > 1); $view = \OC\Files\Filesystem::getView(); @@ -168,9 +168,9 @@ class File extends Node implements IFile { // the part file and target file might be on a different storage in case of a single file storage (e.g. single file share) /** @var \OC\Files\Storage\Storage $partStorage */ - list($partStorage, $internalPartPath) = $this->fileView->resolvePath($partFilePath); + [$partStorage, $internalPartPath] = $this->fileView->resolvePath($partFilePath); /** @var \OC\Files\Storage\Storage $storage */ - list($storage, $internalPath) = $this->fileView->resolvePath($this->path); + [$storage, $internalPath] = $this->fileView->resolvePath($this->path); try { if (!$needsPartFile) { $this->changeLock(ILockingProvider::LOCK_EXCLUSIVE); @@ -223,7 +223,7 @@ class File extends Node implements IFile { // because we have no clue about the cause we can only throw back a 500/Internal Server Error throw new Exception('Could not write file contents'); } - list($count, $result) = \OC_Helper::streamCopy($data, $target); + [$count, $result] = \OC_Helper::streamCopy($data, $target); fclose($target); } @@ -501,7 +501,7 @@ class File extends Node implements IFile { return []; } /** @var \OCP\Files\Storage $storage */ - list($storage, $internalPath) = $this->fileView->resolvePath($this->path); + [$storage, $internalPath] = $this->fileView->resolvePath($this->path); if (is_null($storage)) { return []; } @@ -518,7 +518,7 @@ class File extends Node implements IFile { * @throws ServiceUnavailable */ private function createFileChunked($data) { - list($path, $name) = \Sabre\Uri\split($this->path); + [$path, $name] = \Sabre\Uri\split($this->path); $info = \OC_FileChunking::decodeName($name); if (empty($info)) { @@ -541,13 +541,13 @@ class File extends Node implements IFile { if ($chunk_handler->isComplete()) { /** @var Storage $storage */ - list($storage,) = $this->fileView->resolvePath($path); + [$storage,] = $this->fileView->resolvePath($path); $needsPartFile = $storage->needsPartFile(); $partFile = null; $targetPath = $path . '/' . $info['name']; /** @var \OC\Files\Storage\Storage $targetStorage */ - list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); + [$targetStorage, $targetInternalPath] = $this->fileView->resolvePath($targetPath); $exists = $this->fileView->file_exists($targetPath); @@ -557,13 +557,13 @@ class File extends Node implements IFile { $this->emitPreHooks($exists, $targetPath); $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_EXCLUSIVE); /** @var \OC\Files\Storage\Storage $targetStorage */ - list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); + [$targetStorage, $targetInternalPath] = $this->fileView->resolvePath($targetPath); if ($needsPartFile) { // we first assembly the target file as a part file $partFile = $this->getPartFileBasePath($path . '/' . $info['name']) . '.ocTransferId' . $info['transferid'] . '.part'; /** @var \OC\Files\Storage\Storage $targetStorage */ - list($partStorage, $partInternalPath) = $this->fileView->resolvePath($partFile); + [$partStorage, $partInternalPath] = $this->fileView->resolvePath($partFile); $chunk_handler->file_assemble($partStorage, $partInternalPath); diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 476d049bbc3..fa948f38624 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -202,8 +202,8 @@ class FilesPlugin extends ServerPlugin { if (!$sourceNode instanceof Node) { return; } - list($sourceDir,) = \Sabre\Uri\split($source); - list($destinationDir,) = \Sabre\Uri\split($destination); + [$sourceDir,] = \Sabre\Uri\split($source); + [$destinationDir,] = \Sabre\Uri\split($destination); if ($sourceDir !== $destinationDir) { $sourceNodeFileInfo = $sourceNode->getFileInfo(); @@ -496,7 +496,7 @@ class FilesPlugin extends ServerPlugin { public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) { // chunked upload handling if (isset($_SERVER['HTTP_OC_CHUNKED'])) { - list($path, $name) = \Sabre\Uri\split($filePath); + [$path, $name] = \Sabre\Uri\split($filePath); $info = \OC_FileChunking::decodeName($name); if (!empty($info)) { $filePath = $path . '/' . $info['name']; diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index b83e5cbcbc1..b713d0d485b 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -131,8 +131,8 @@ abstract class Node implements \Sabre\DAV\INode { throw new \Sabre\DAV\Exception\Forbidden(); } - list($parentPath,) = \Sabre\Uri\split($this->path); - list(, $newName) = \Sabre\Uri\split($name); + [$parentPath,] = \Sabre\Uri\split($this->path); + [, $newName] = \Sabre\Uri\split($name); // verify path of the target $this->verifyPath(); diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php index 3a6e355805a..5e4f757492d 100644 --- a/apps/dav/lib/Connector/Sabre/ObjectTree.php +++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php @@ -80,7 +80,7 @@ class ObjectTree extends CachingTree { private function resolveChunkFile($path) { if (isset($_SERVER['HTTP_OC_CHUNKED'])) { // resolve to real file name to find the proper node - list($dir, $name) = \Sabre\Uri\split($path); + [$dir, $name] = \Sabre\Uri\split($path); if ($dir === '/' || $dir === '.') { $dir = ''; } @@ -220,7 +220,7 @@ class ObjectTree extends CachingTree { // this will trigger existence check $this->getNodeForPath($sourcePath); - list($destinationDir, $destinationName) = \Sabre\Uri\split($destinationPath); + [$destinationDir, $destinationName] = \Sabre\Uri\split($destinationPath); try { $this->fileView->verifyPath($destinationDir, $destinationName); } catch (\OCP\Files\InvalidPathException $ex) { @@ -237,7 +237,7 @@ class ObjectTree extends CachingTree { throw new FileLocked($e->getMessage(), $e->getCode(), $e); } - list($destinationDir,) = \Sabre\Uri\split($destinationPath); + [$destinationDir,] = \Sabre\Uri\split($destinationPath); $this->markDirty($destinationDir); } } diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index c1b1dc1b2d1..2351094a917 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -154,11 +154,11 @@ class Principal implements BackendInterface { * @return array */ public function getPrincipalByPath($path) { - list($prefix, $name) = \Sabre\Uri\split($path); + [$prefix, $name] = \Sabre\Uri\split($path); $decodedName = urldecode($name); if ($name === 'calendar-proxy-write' || $name === 'calendar-proxy-read') { - list($prefix2, $name2) = \Sabre\Uri\split($prefix); + [$prefix2, $name2] = \Sabre\Uri\split($prefix); if ($prefix2 === $this->principalPrefix) { $user = $this->userManager->get($name2); @@ -213,7 +213,7 @@ class Principal implements BackendInterface { * @throws Exception */ public function getGroupMembership($principal, $needGroups = false) { - list($prefix, $name) = \Sabre\Uri\split($principal); + [$prefix, $name] = \Sabre\Uri\split($principal); if ($prefix !== $this->principalPrefix) { return []; @@ -532,7 +532,7 @@ class Principal implements BackendInterface { return []; } - list($prefix, $name) = \Sabre\Uri\split($principal); + [$prefix, $name] = \Sabre\Uri\split($principal); if ($this->hasCircles && $prefix === $this->principalPrefix) { $user = $this->userManager->get($name); if (!$user) { diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php index 6d17704b103..b71dcd72918 100644 --- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php +++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php @@ -152,7 +152,7 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin { } if ($length) { - list($parentPath, $newName) = \Sabre\Uri\split($path); + [$parentPath, $newName] = \Sabre\Uri\split($path); if (is_null($parentPath)) { $parentPath = ''; } diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index 98458ff8bfa..121d1c39ff0 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -151,7 +151,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { if (isset($this->cachedShares[$sabreNode->getId()])) { $shares = $this->cachedShares[$sabreNode->getId()]; } else { - list($parentPath,) = \Sabre\Uri\split($sabreNode->getPath()); + [$parentPath,] = \Sabre\Uri\split($sabreNode->getPath()); if ($parentPath === '') { $parentPath = '/'; } diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php index 240010eff48..a2601f5768a 100644 --- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php @@ -245,13 +245,13 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin { $isFav = null; $propFind->handle(self::TAGS_PROPERTYNAME, function () use (&$isFav, $node) { - list($tags, $isFav) = $this->getTagsAndFav($node->getId()); + [$tags, $isFav] = $this->getTagsAndFav($node->getId()); return new TagList($tags); }); $propFind->handle(self::FAVORITE_PROPERTYNAME, function () use ($isFav, $node) { if (is_null($isFav)) { - list(, $isFav) = $this->getTagsAndFav($node->getId()); + [, $isFav] = $this->getTagsAndFav($node->getId()); } if ($isFav) { return 1; diff --git a/apps/dav/lib/DAV/SystemPrincipalBackend.php b/apps/dav/lib/DAV/SystemPrincipalBackend.php index 5ea59f60f9d..48dec96c6f3 100644 --- a/apps/dav/lib/DAV/SystemPrincipalBackend.php +++ b/apps/dav/lib/DAV/SystemPrincipalBackend.php @@ -163,7 +163,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @return array */ public function getGroupMembership($principal) { - list($prefix, ) = \Sabre\Uri\split($principal); + [$prefix, ] = \Sabre\Uri\split($principal); if ($prefix === 'principals/system') { $principal = $this->getPrincipalByPath($principal); diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php index 50ebed541ee..7fe049a7b2d 100644 --- a/apps/dav/lib/Files/FileSearchBackend.php +++ b/apps/dav/lib/Files/FileSearchBackend.php @@ -312,7 +312,7 @@ class FileSearchBackend implements ISearchBackend { * @return ISearchOperator */ private function transformSearchOperation(Operator $operator) { - list(, $trimmedType) = explode('}', $operator->type); + [, $trimmedType] = explode('}', $operator->type); switch ($operator->type) { case Operator::OPERATION_AND: case Operator::OPERATION_OR: diff --git a/apps/dav/lib/Files/FilesHome.php b/apps/dav/lib/Files/FilesHome.php index 246ec0584b9..698431b6b14 100644 --- a/apps/dav/lib/Files/FilesHome.php +++ b/apps/dav/lib/Files/FilesHome.php @@ -55,7 +55,7 @@ class FilesHome extends Directory { } public function getName() { - list(,$name) = \Sabre\Uri\split($this->principalInfo['uri']); + [,$name] = \Sabre\Uri\split($this->principalInfo['uri']); return $name; } diff --git a/apps/dav/lib/Files/RootCollection.php b/apps/dav/lib/Files/RootCollection.php index 507c40108c3..7924299d207 100644 --- a/apps/dav/lib/Files/RootCollection.php +++ b/apps/dav/lib/Files/RootCollection.php @@ -44,7 +44,7 @@ class RootCollection extends AbstractPrincipalCollection { * @return INode */ public function getChildForPrincipal(array $principalInfo) { - list(,$name) = \Sabre\Uri\split($principalInfo['uri']); + [,$name] = \Sabre\Uri\split($principalInfo['uri']); $user = \OC::$server->getUserSession()->getUser(); if (is_null($user) || $name !== $user->getUID()) { // a user is only allowed to see their own home contents, so in case another collection diff --git a/apps/dav/lib/Traits/PrincipalProxyTrait.php b/apps/dav/lib/Traits/PrincipalProxyTrait.php index 5da4e64a6df..480e2abc209 100644 --- a/apps/dav/lib/Traits/PrincipalProxyTrait.php +++ b/apps/dav/lib/Traits/PrincipalProxyTrait.php @@ -77,7 +77,7 @@ trait PrincipalProxyTrait { * @throws Exception */ public function getGroupMembership($principal, $needGroups = false) { - list($prefix, $name) = \Sabre\Uri\split($principal); + [$prefix, $name] = \Sabre\Uri\split($principal); if ($prefix !== $this->principalPrefix) { return []; @@ -113,7 +113,7 @@ trait PrincipalProxyTrait { * @throws Exception */ public function setGroupMemberSet($principal, array $members) { - list($principalUri, $target) = \Sabre\Uri\split($principal); + [$principalUri, $target] = \Sabre\Uri\split($principal); if ($target !== 'calendar-proxy-write' && $target !== 'calendar-proxy-read') { throw new Exception('Setting members of the group is not supported yet'); @@ -129,11 +129,11 @@ trait PrincipalProxyTrait { $permission |= ProxyMapper::PERMISSION_WRITE; } - list($prefix, $owner) = \Sabre\Uri\split($principalUri); + [$prefix, $owner] = \Sabre\Uri\split($principalUri); $proxies = $this->proxyMapper->getProxiesOf($principalUri); foreach ($members as $member) { - list($prefix, $name) = \Sabre\Uri\split($member); + [$prefix, $name] = \Sabre\Uri\split($member); if ($prefix !== $this->principalPrefix) { throw new Exception('Invalid member group prefix: ' . $prefix); @@ -182,8 +182,8 @@ trait PrincipalProxyTrait { * @return bool */ private function isProxyPrincipal(string $principalUri):bool { - list($realPrincipalUri, $proxy) = \Sabre\Uri\split($principalUri); - list($prefix, $userId) = \Sabre\Uri\split($realPrincipalUri); + [$realPrincipalUri, $proxy] = \Sabre\Uri\split($principalUri); + [$prefix, $userId] = \Sabre\Uri\split($realPrincipalUri); if (!isset($prefix) || !isset($userId)) { return false; @@ -201,7 +201,7 @@ trait PrincipalProxyTrait { * @return bool */ private function isReadProxyPrincipal(string $principalUri):bool { - list(, $proxy) = \Sabre\Uri\split($principalUri); + [, $proxy] = \Sabre\Uri\split($principalUri); return $proxy === 'calendar-proxy-read'; } @@ -210,7 +210,7 @@ trait PrincipalProxyTrait { * @return bool */ private function isWriteProxyPrincipal(string $principalUri):bool { - list(, $proxy) = \Sabre\Uri\split($principalUri); + [, $proxy] = \Sabre\Uri\split($principalUri); return $proxy === 'calendar-proxy-write'; } @@ -219,7 +219,7 @@ trait PrincipalProxyTrait { * @return string */ private function getPrincipalUriFromProxyPrincipal(string $principalUri):string { - list($realPrincipalUri, ) = \Sabre\Uri\split($principalUri); + [$realPrincipalUri, ] = \Sabre\Uri\split($principalUri); return $realPrincipalUri; } } diff --git a/apps/dav/lib/Upload/UploadHome.php b/apps/dav/lib/Upload/UploadHome.php index 0843ff930d3..b25a2824d3f 100644 --- a/apps/dav/lib/Upload/UploadHome.php +++ b/apps/dav/lib/Upload/UploadHome.php @@ -74,7 +74,7 @@ class UploadHome implements ICollection { } public function getName() { - list(,$name) = \Sabre\Uri\split($this->principalInfo['uri']); + [,$name] = \Sabre\Uri\split($this->principalInfo['uri']); return $name; } diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php index b31957d4f2d..1b3cbb31f58 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php @@ -81,7 +81,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest { } public function testSendWithoutAttendees():void { - list($user1, $user2, $user3, , $user5) = $users = $this->getUsers(); + [$user1, $user2, $user3, , $user5] = $users = $this->getUsers(); $enL10N = $this->createMock(IL10N::class); $enL10N->method('t') @@ -191,7 +191,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest { } public function testSendWithAttendees(): void { - list($user1, $user2, $user3, , $user5) = $users = $this->getUsers(); + [$user1, $user2, $user3, , $user5] = $users = $this->getUsers(); $enL10N = $this->createMock(IL10N::class); $enL10N->method('t') diff --git a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php index 5b28e6b025b..85be3a4bfb5 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php @@ -201,7 +201,7 @@ class AddressBookImplTest extends TestCase { ->willReturn(['carddata' => 'data']); $addressBookImpl->expects($this->once())->method('readCard') ->with('data')->willReturn($this->vCard); - $this->vCard->expects($this->exactly(count($properties)-1)) + $this->vCard->expects($this->exactly(count($properties) - 1)) ->method('createProperty'); $this->backend->expects($this->never())->method('createCard'); $this->backend->expects($this->once())->method('updateCard'); @@ -237,7 +237,7 @@ class AddressBookImplTest extends TestCase { $addressBookImpl->expects($this->once())->method('readCard') ->with('data')->willReturn($this->vCard); $this->vCard->method('createProperty')->willReturn($textProperty); - $this->vCard->expects($this->exactly(count($properties)-1)) + $this->vCard->expects($this->exactly(count($properties) - 1)) ->method('createProperty'); $this->vCard->expects($this->once())->method('remove') ->with('ADR'); diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 904faa8e8c3..bf3890432ec 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -1087,7 +1087,7 @@ class FileTest extends TestCase { $userView = \OC\Files\Filesystem::getView(); } $files = []; - list($storage, $internalPath) = $userView->resolvePath($path); + [$storage, $internalPath] = $userView->resolvePath($path); if ($storage instanceof Local) { $realPath = $storage->getSourcePath($internalPath); $dh = opendir($realPath); diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php index a74e6bf08d4..135a89c28bb 100644 --- a/apps/encryption/lib/Crypto/EncryptAll.php +++ b/apps/encryption/lib/Crypto/EncryptAll.php @@ -423,7 +423,7 @@ class EncryptAll { } $subject = $this->l->t('one-time password for server-side-encryption'); - list($htmlBody, $textBody) = $this->createMailBody($password); + [$htmlBody, $textBody] = $this->createMailBody($password); // send it out now try { diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php index c4190e0691a..f832fc7e54c 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -138,7 +138,7 @@ class MountPublicLinkController extends Controller { } try { - list(, $server) = $this->addressHandler->splitUserRemote($shareWith); + [, $server] = $this->addressHandler->splitUserRemote($shareWith); $share = $this->shareManager->getShareByToken($token); } catch (HintException $e) { return new JSONResponse(['message' => $e->getHint()], Http::STATUS_BAD_REQUEST); diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php index fe0f1b45e53..ef49ca99ead 100644 --- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php +++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php @@ -219,7 +219,7 @@ class RequestHandlerController extends OCSController { try { $provider = $this->cloudFederationProviderManager->getCloudFederationProvider('file'); - list($newToken, $localId) = $provider->notificationReceived('REQUEST_RESHARE', $id, $notification); + [$newToken, $localId] = $provider->notificationReceived('REQUEST_RESHARE', $id, $notification); return new Http\DataResponse([ 'token' => $newToken, 'remoteId' => $localId diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index d77bea1fb54..fe814284fb6 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -221,7 +221,7 @@ class FederatedShareProvider implements IShareProvider { $ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']); $shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time(), $shareType); $share->setId($shareId); - list($token, $remoteId) = $this->askOwnerToReShare($shareWith, $share, $shareId); + [$token, $remoteId] = $this->askOwnerToReShare($shareWith, $share, $shareId); // remote share was create successfully if we get a valid token as return $send = is_string($token) && $token !== ''; } catch (\Exception $e) { @@ -323,7 +323,7 @@ class FederatedShareProvider implements IShareProvider { $remoteId = $remoteShare['remote_id']; $remote = $remoteShare['remote']; - list($token, $remoteId) = $this->notifications->requestReShare( + [$token, $remoteId] = $this->notifications->requestReShare( $token, $remoteId, $shareId, @@ -435,9 +435,9 @@ class FederatedShareProvider implements IShareProvider { $remoteId = $this->getRemoteId($share); // if the local user is the owner we send the permission change to the initiator if ($this->userManager->userExists($share->getShareOwner())) { - list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); + [, $remote] = $this->addressHandler->splitUserRemote($share->getSharedBy()); } else { // ... if not we send the permission change to the owner - list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); + [, $remote] = $this->addressHandler->splitUserRemote($share->getShareOwner()); } $this->notifications->sendPermissionChange($remote, $remoteId, $share->getToken(), $share->getPermissions()); } @@ -541,7 +541,7 @@ class FederatedShareProvider implements IShareProvider { * @throws \OC\HintException */ public function delete(IShare $share) { - list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedWith()); + [, $remote] = $this->addressHandler->splitUserRemote($share->getSharedWith()); // if the local user is the owner we can send the unShare request directly... if ($this->userManager->userExists($share->getShareOwner())) { @@ -576,9 +576,9 @@ class FederatedShareProvider implements IShareProvider { // also send a unShare request to the initiator, if this is a different user than the owner if ($share->getShareOwner() !== $share->getSharedBy()) { if ($isOwner) { - list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); + [, $remote] = $this->addressHandler->splitUserRemote($share->getSharedBy()); } else { - list(, $remote) = $this->addressHandler->splitUserRemote($share->getShareOwner()); + [, $remote] = $this->addressHandler->splitUserRemote($share->getShareOwner()); } $remoteId = $this->getRemoteId($share); $this->notifications->sendRevokeShare($remote, $remoteId, $share->getToken()); diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php index 410c155b072..4689f048d85 100644 --- a/apps/federatedfilesharing/lib/Notifications.php +++ b/apps/federatedfilesharing/lib/Notifications.php @@ -95,7 +95,7 @@ class Notifications { * @throws \OC\ServerNotAvailableException */ public function sendRemoteShare($token, $shareWith, $name, $remoteId, $owner, $ownerFederatedId, $sharedBy, $sharedByFederatedId, $shareType) { - list($user, $remote) = $this->addressHandler->splitUserRemote($shareWith); + [$user, $remote] = $this->addressHandler->splitUserRemote($shareWith); if ($user && $remote) { $local = $this->addressHandler->generateRemoteURL(); diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php index f5aef1dbd8e..0bd0287f606 100644 --- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php +++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php @@ -183,7 +183,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { throw new ProviderCouldNotAddShareException('Unsupported protocol for data exchange.', '', Http::STATUS_NOT_IMPLEMENTED); } - list($ownerUid, $remote) = $this->addressHandler->splitUserRemote($share->getOwner()); + [$ownerUid, $remote] = $this->addressHandler->splitUserRemote($share->getOwner()); // for backward compatibility make sure that the remote url stored in the // database ends with a trailing slash if (substr($remote, -1) !== '/') { @@ -385,7 +385,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { $this->verifyShare($share, $token); $this->executeAcceptShare($share); if ($share->getShareOwner() !== $share->getSharedBy()) { - list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); + [, $remote] = $this->addressHandler->splitUserRemote($share->getSharedBy()); $remoteId = $this->federatedShareProvider->getRemoteId($share); $notification = $this->cloudFederationFactory->getCloudFederationNotification(); $notification->setMessage( @@ -411,7 +411,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { protected function executeAcceptShare(IShare $share) { try { $fileId = (int)$share->getNode()->getId(); - list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId); + [$file, $link] = $this->getFile($this->getCorrectUid($share), $fileId); } catch (\Exception $e) { throw new ShareNotFound(); } @@ -455,7 +455,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { $this->verifyShare($share, $token); if ($share->getShareOwner() !== $share->getSharedBy()) { - list(, $remote) = $this->addressHandler->splitUserRemote($share->getSharedBy()); + [, $remote] = $this->addressHandler->splitUserRemote($share->getSharedBy()); $remoteId = $this->federatedShareProvider->getRemoteId($share); $notification = $this->cloudFederationFactory->getCloudFederationNotification(); $notification->setMessage( @@ -487,7 +487,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { try { $fileId = (int)$share->getNode()->getId(); - list($file, $link) = $this->getFile($this->getCorrectUid($share), $fileId); + [$file, $link] = $this->getFile($this->getCorrectUid($share), $fileId); } catch (\Exception $e) { throw new ShareNotFound(); } @@ -642,7 +642,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { $share = $this->federatedShareProvider->getShareById($id); // don't allow to share a file back to the owner try { - list($user, $remote) = $this->addressHandler->splitUserRemote($shareWith); + [$user, $remote] = $this->addressHandler->splitUserRemote($shareWith); $owner = $share->getShareOwner(); $currentServer = $this->addressHandler->generateRemoteURL(); if ($this->addressHandler->compareAddresses($user, $remote, $owner, $currentServer)) { diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 9ab3616412b..e2e61783ee7 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -108,7 +108,7 @@ class AddressHandlerTest extends \Test\TestCase { ->method('search') ->willReturn([]); - list($remoteUser, $remoteUrl) = $this->addressHandler->splitUserRemote($remote); + [$remoteUser, $remoteUrl] = $this->addressHandler->splitUserRemote($remote); $this->assertSame($expectedUser, $remoteUser); $this->assertSame($expectedUrl, $remoteUrl); } diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php index 2f6e406978a..e401fdce09c 100644 --- a/apps/files/lib/Activity/Provider.php +++ b/apps/files/lib/Activity/Provider.php @@ -363,7 +363,7 @@ class Provider implements IProvider { try { $fullPath = rtrim($encryptionContainer->getPath(), '/'); // Remove /user/files/... - list(,,, $path) = explode('/', $fullPath, 4); + [,,, $path] = explode('/', $fullPath, 4); if (!$path) { throw new InvalidPathException('Path could not be split correctly'); } diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index d8156da3669..48d55807be4 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -180,7 +180,7 @@ class Scan extends Base { $inputPath = $input->getOption('path'); if ($inputPath) { $inputPath = '/' . trim($inputPath, '/'); - list(, $user,) = explode('/', $inputPath, 3); + [, $user,] = explode('/', $inputPath, 3); $users = [$user]; } elseif ($input->getOption('all')) { $users = $this->userManager->search(''); diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php index 654c7357023..2eb0865b3f7 100644 --- a/apps/files_external/lib/Command/Create.php +++ b/apps/files_external/lib/Command/Create.php @@ -153,7 +153,7 @@ class Create extends Base { $output->writeln('<error>Invalid mount configuration option "' . $configOption . '"</error>'); return 1; } - list($key, $value) = explode('=', $configOption, 2); + [$key, $value] = explode('=', $configOption, 2); if (!$this->validateParam($key, $value, $storageBackend, $authBackend)) { $output->writeln('<error>Unknown configuration for backends "' . $key . '"</error>'); return 1; diff --git a/apps/files_external/lib/Command/Verify.php b/apps/files_external/lib/Command/Verify.php index adedbbd9a9e..40969409812 100644 --- a/apps/files_external/lib/Command/Verify.php +++ b/apps/files_external/lib/Command/Verify.php @@ -111,7 +111,7 @@ class Verify extends Base { $output->writeln('<error>Invalid mount configuration option "' . $configOption . '"</error>'); return; } - list($key, $value) = explode('=', $configOption, 2); + [$key, $value] = explode('=', $configOption, 2); $storage->setBackendOption($key, $value); } diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 33ac1662a4d..131fe918530 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -223,7 +223,7 @@ class ShareesAPIController extends OCSController { $this->result['lookupEnabled'] = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes'; } - list($result, $hasMoreResults) = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset); + [$result, $hasMoreResults] = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset); // extra treatment for 'exact' subarray, with a single merge expected keys might be lost if (isset($result['exact'])) { @@ -290,7 +290,7 @@ class ShareesAPIController extends OCSController { foreach ($shareTypes as $shareType) { $sharees = $this->getAllShareesByType($user, $shareType); $shareTypeResults = []; - foreach ($sharees as list($sharee, $displayname)) { + foreach ($sharees as [$sharee, $displayname]) { if (!isset($this->searchResultTypeMap[$shareType])) { continue; } diff --git a/apps/files_sharing/lib/External/Cache.php b/apps/files_sharing/lib/External/Cache.php index 8af5ca1d98d..6a816b166ae 100644 --- a/apps/files_sharing/lib/External/Cache.php +++ b/apps/files_sharing/lib/External/Cache.php @@ -40,7 +40,7 @@ class Cache extends \OC\Files\Cache\Cache { public function __construct($storage, ICloudId $cloudId) { $this->cloudId = $cloudId; $this->storage = $storage; - list(, $remote) = explode('://', $cloudId->getRemote(), 2); + [, $remote] = explode('://', $cloudId->getRemote(), 2); $this->remote = $remote; $this->remoteUser = $cloudId->getUser(); parent::__construct($storage); diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php index 339770c8601..f612aadfb32 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -73,9 +73,9 @@ class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage { $this->cloudId = $options['cloudId']; $discoveryService = \OC::$server->query(\OCP\OCS\IDiscoveryService::class); - list($protocol, $remote) = explode('://', $this->cloudId->getRemote()); + [$protocol, $remote] = explode('://', $this->cloudId->getRemote()); if (strpos($remote, '/')) { - list($host, $root) = explode('/', $remote, 2); + [$host, $root] = explode('/', $remote, 2); } else { $host = $remote; $root = ''; diff --git a/apps/files_sharing/lib/Scanner.php b/apps/files_sharing/lib/Scanner.php index 59b5c8a0b2e..450256782e7 100644 --- a/apps/files_sharing/lib/Scanner.php +++ b/apps/files_sharing/lib/Scanner.php @@ -63,7 +63,7 @@ class Scanner extends \OC\Files\Cache\Scanner { } if ($this->storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) { /** @var \OC\Files\Storage\Storage $storage */ - list($storage) = $this->storage->resolvePath(''); + [$storage] = $this->storage->resolvePath(''); $this->sourceScanner = $storage->getScanner(); return $this->sourceScanner; } else { diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index b55fba78d42..5136f0972ea 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -90,7 +90,7 @@ class CacheTest extends TestCase { $this->view->file_put_contents('container/shareddir/subdir/another too.txt', $textData); $this->view->file_put_contents('container/shareddir/subdir/not a text file.xml', '<xml></xml>'); - list($this->ownerStorage,) = $this->view->resolvePath(''); + [$this->ownerStorage,] = $this->view->resolvePath(''); $this->ownerCache = $this->ownerStorage->getCache(); $this->ownerStorage->getScanner()->scan(''); @@ -124,7 +124,7 @@ class CacheTest extends TestCase { // retrieve the shared storage $secondView = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2); - list($this->sharedStorage,) = $secondView->resolvePath('files/shareddir'); + [$this->sharedStorage,] = $secondView->resolvePath('files/shareddir'); $this->sharedCache = $this->sharedStorage->getCache(); } @@ -213,7 +213,7 @@ class CacheTest extends TestCase { */ public function testSearch() { foreach ($this->searchDataProvider() as $data) { - list($pattern, $expectedFiles) = $data; + [$pattern, $expectedFiles] = $data; $results = $this->sharedStorage->getCache()->search($pattern); @@ -410,7 +410,7 @@ class CacheTest extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER2); $this->assertTrue(\OC\Files\Filesystem::file_exists('/test.txt')); - list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test.txt'); + [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test.txt'); /** * @var \OCA\Files_Sharing\SharedStorage $sharedStorage */ @@ -442,7 +442,7 @@ class CacheTest extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER2); $this->assertTrue(\OC\Files\Filesystem::file_exists('/foo')); - list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo'); + [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo'); /** * @var \OCA\Files_Sharing\SharedStorage $sharedStorage */ @@ -469,12 +469,12 @@ class CacheTest extends TestCase { $this->shareManager->updateShare($share); \OC_Util::tearDownFS(); - list($sourceStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/foo'); + [$sourceStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/foo'); self::loginHelper(self::TEST_FILES_SHARING_API_USER2); $this->assertTrue(\OC\Files\Filesystem::file_exists('/foo')); /** @var SharedStorage $sharedStorage */ - list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo'); + [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo'); $this->assertEquals($sourceStorage->getCache()->getNumericStorageId(), $sharedStorage->getCache()->getNumericStorageId()); } @@ -511,7 +511,7 @@ class CacheTest extends TestCase { \OC\Files\Filesystem::file_put_contents('/sub/bar.txt', 'bar'); /** @var SharedStorage $sharedStorage */ - list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/sub'); + [$sharedStorage] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/sub'); $this->assertTrue($sharedStorage->getCache()->inCache('bar.txt')); diff --git a/apps/files_sharing/tests/PermissionsTest.php b/apps/files_sharing/tests/PermissionsTest.php index 6d3dabd609f..462a73f09d2 100644 --- a/apps/files_sharing/tests/PermissionsTest.php +++ b/apps/files_sharing/tests/PermissionsTest.php @@ -76,7 +76,7 @@ class PermissionsTest extends TestCase { $this->view->file_put_contents('container/shareddir/textfile.txt', $textData); $this->view->file_put_contents('container/shareddirrestricted/textfile1.txt', $textData); - list($this->ownerStorage, $internalPath) = $this->view->resolvePath(''); + [$this->ownerStorage, $internalPath] = $this->view->resolvePath(''); $this->ownerCache = $this->ownerStorage->getCache(); $this->ownerStorage->getScanner()->scan(''); @@ -110,8 +110,8 @@ class PermissionsTest extends TestCase { // retrieve the shared storage $this->secondView = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2); - list($this->sharedStorage, $internalPath) = $this->secondView->resolvePath('files/shareddir'); - list($this->sharedStorageRestrictedShare, $internalPath) = $this->secondView->resolvePath('files/shareddirrestricted'); + [$this->sharedStorage, $internalPath] = $this->secondView->resolvePath('files/shareddir'); + [$this->sharedStorageRestrictedShare, $internalPath] = $this->secondView->resolvePath('files/shareddirrestricted'); $this->sharedCache = $this->sharedStorage->getCache(); $this->sharedCacheRestrictedShare = $this->sharedStorageRestrictedShare->getCache(); } diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index 815d1620f06..6b51c471586 100644 --- a/apps/files_sharing/tests/SharedStorageTest.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -107,7 +107,7 @@ class SharedStorageTest extends TestCase { // delete the local folder /** @var \OC\Files\Storage\Storage $storage */ - list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder'); + [$storage, $internalPath] = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder'); $storage->rmdir($internalPath); //enforce reload of the mount points @@ -442,7 +442,7 @@ class SharedStorageTest extends TestCase { /** * @var \OCP\Files\Storage $sharedStorage */ - list($sharedStorage,) = $view->resolvePath($this->folder); + [$sharedStorage,] = $view->resolvePath($this->folder); $this->assertTrue($sharedStorage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')); $sourceStorage = new \OC\Files\Storage\Temporary([]); @@ -475,7 +475,7 @@ class SharedStorageTest extends TestCase { /** * @var \OCP\Files\Storage $sharedStorage */ - list($sharedStorage,) = $view->resolvePath($this->folder); + [$sharedStorage,] = $view->resolvePath($this->folder); $this->assertTrue($sharedStorage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')); $sourceStorage = new \OC\Files\Storage\Temporary([]); diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php index 75d873f6e97..2a7367a230b 100644 --- a/apps/files_sharing/tests/WatcherTest.php +++ b/apps/files_sharing/tests/WatcherTest.php @@ -64,7 +64,7 @@ class WatcherTest extends TestCase { $this->view->mkdir('container/shareddir'); $this->view->mkdir('container/shareddir/subdir'); - list($this->ownerStorage, $internalPath) = $this->view->resolvePath(''); + [$this->ownerStorage, $internalPath] = $this->view->resolvePath(''); $this->ownerCache = $this->ownerStorage->getCache(); $this->ownerStorage->getScanner()->scan(''); @@ -85,7 +85,7 @@ class WatcherTest extends TestCase { // retrieve the shared storage $secondView = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2); - list($this->sharedStorage, $internalPath) = $secondView->resolvePath('files/shareddir'); + [$this->sharedStorage, $internalPath] = $secondView->resolvePath('files/shareddir'); $this->sharedCache = $this->sharedStorage->getCache(); } diff --git a/apps/files_trashbin/lib/Sabre/RootCollection.php b/apps/files_trashbin/lib/Sabre/RootCollection.php index 55fd0bc7d5b..0f3c5ef810c 100644 --- a/apps/files_trashbin/lib/Sabre/RootCollection.php +++ b/apps/files_trashbin/lib/Sabre/RootCollection.php @@ -59,7 +59,7 @@ class RootCollection extends AbstractPrincipalCollection { * @return INode */ public function getChildForPrincipal(array $principalInfo): TrashHome { - list(, $name) = \Sabre\Uri\split($principalInfo['uri']); + [, $name] = \Sabre\Uri\split($principalInfo['uri']); $user = \OC::$server->getUserSession()->getUser(); if (is_null($user) || $name !== $user->getUID()) { throw new \Sabre\DAV\Exception\Forbidden(); diff --git a/apps/files_trashbin/lib/Sabre/TrashHome.php b/apps/files_trashbin/lib/Sabre/TrashHome.php index 8fd4da1752b..b1d5a114934 100644 --- a/apps/files_trashbin/lib/Sabre/TrashHome.php +++ b/apps/files_trashbin/lib/Sabre/TrashHome.php @@ -58,7 +58,7 @@ class TrashHome implements ICollection { } public function getName(): string { - list(, $name) = \Sabre\Uri\split($this->principalInfo['uri']); + [, $name] = \Sabre\Uri\split($this->principalInfo['uri']); return $name; } diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 76da2841e97..e38a147f329 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -198,7 +198,7 @@ class TrashbinTest extends \Test\TestCase { $manipulatedList = $this->manipulateDeleteTime($filesInTrash, $this->trashRoot1, $expiredDate); $testClass = new TrashbinForTesting(); - list($sizeOfDeletedFiles, $count) = $testClass->dummyDeleteExpiredFiles($manipulatedList, $expireAt); + [$sizeOfDeletedFiles, $count] = $testClass->dummyDeleteExpiredFiles($manipulatedList, $expireAt); $this->assertSame(10, $sizeOfDeletedFiles); $this->assertSame(2, $count); @@ -657,7 +657,7 @@ class TrashbinTest extends \Test\TestCase { $trashedFile = $filesInTrash[0]; // delete source folder - list($storage, $internalPath) = $this->rootView->resolvePath('/' . self::TEST_TRASHBIN_USER1 . '/files/folder'); + [$storage, $internalPath] = $this->rootView->resolvePath('/' . self::TEST_TRASHBIN_USER1 . '/files/folder'); if ($storage instanceof \OC\Files\Storage\Local) { $folderAbsPath = $storage->getSourcePath($internalPath); // make folder read-only diff --git a/apps/files_versions/lib/Sabre/RootCollection.php b/apps/files_versions/lib/Sabre/RootCollection.php index fb68e0f0bfc..13a55512602 100644 --- a/apps/files_versions/lib/Sabre/RootCollection.php +++ b/apps/files_versions/lib/Sabre/RootCollection.php @@ -70,7 +70,7 @@ class RootCollection extends AbstractPrincipalCollection { * @return INode */ public function getChildForPrincipal(array $principalInfo) { - list(, $name) = \Sabre\Uri\split($principalInfo['uri']); + [, $name] = \Sabre\Uri\split($principalInfo['uri']); $user = \OC::$server->getUserSession()->getUser(); if (is_null($user) || $name !== $user->getUID()) { throw new \Sabre\DAV\Exception\Forbidden(); diff --git a/apps/files_versions/lib/Sabre/VersionHome.php b/apps/files_versions/lib/Sabre/VersionHome.php index e854d07b37f..d425ea41369 100644 --- a/apps/files_versions/lib/Sabre/VersionHome.php +++ b/apps/files_versions/lib/Sabre/VersionHome.php @@ -53,7 +53,7 @@ class VersionHome implements ICollection { } private function getUser() { - list(, $name) = \Sabre\Uri\split($this->principalInfo['uri']); + [, $name] = \Sabre\Uri\split($this->principalInfo['uri']); $user = $this->userManager->get($name); if (!$user) { throw new NoUserException(); diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index 60a75fd484f..231faaaac04 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -129,7 +129,7 @@ class Storage { * @param string $source source path */ public static function setSourcePathAndUser($source) { - list($uid, $path) = self::getUidAndFilename($source); + [$uid, $path] = self::getUidAndFilename($source); self::$sourcePathAndUser[$source] = ['uid' => $uid, 'path' => $path]; } @@ -179,7 +179,7 @@ class Storage { return false; } - list($uid, $filename) = self::getUidAndFilename($filename); + [$uid, $filename] = self::getUidAndFilename($filename); $files_view = new View('/'.$uid .'/files'); @@ -214,7 +214,7 @@ class Storage { * @param string $path */ public static function markDeletedFile($path) { - list($uid, $filename) = self::getUidAndFilename($path); + [$uid, $filename] = self::getUidAndFilename($path); self::$deletedFiles[$path] = [ 'uid' => $uid, 'filename' => $filename]; @@ -232,7 +232,7 @@ class Storage { * @var \OC\Files\Storage\Storage $storage * @var string $internalPath */ - list($storage, $internalPath) = $view->resolvePath($path); + [$storage, $internalPath] = $view->resolvePath($path); $cache = $storage->getCache($internalPath); $cache->remove($internalPath); } @@ -270,7 +270,7 @@ class Storage { * @param string $operation can be 'copy' or 'rename' */ public static function renameOrCopy($sourcePath, $targetPath, $operation) { - list($sourceOwner, $sourcePath) = self::getSourcePathAndUser($sourcePath); + [$sourceOwner, $sourcePath] = self::getSourcePathAndUser($sourcePath); // it was a upload of a existing file if no old path exists // in this case the pre-hook already called the store method and we can @@ -279,7 +279,7 @@ class Storage { return true; } - list($targetOwner, $targetPath) = self::getUidAndFilename($targetPath); + [$targetOwner, $targetPath] = self::getUidAndFilename($targetPath); $sourcePath = ltrim($sourcePath, '/'); $targetPath = ltrim($targetPath, '/'); @@ -399,9 +399,9 @@ class Storage { */ private static function copyFileContents($view, $path1, $path2) { /** @var \OC\Files\Storage\Storage $storage1 */ - list($storage1, $internalPath1) = $view->resolvePath($path1); + [$storage1, $internalPath1] = $view->resolvePath($path1); /** @var \OC\Files\Storage\Storage $storage2 */ - list($storage2, $internalPath2) = $view->resolvePath($path2); + [$storage2, $internalPath2] = $view->resolvePath($path2); $view->lockFile($path1, ILockingProvider::LOCK_EXCLUSIVE); $view->lockFile($path2, ILockingProvider::LOCK_EXCLUSIVE); @@ -410,7 +410,7 @@ class Storage { if ($storage1->instanceOfStorage('\OC\Files\ObjectStore\ObjectStoreStorage') || $storage2->instanceOfStorage('\OC\Files\ObjectStore\ObjectStoreStorage')) { $source = $storage1->fopen($internalPath1, 'r'); $target = $storage2->fopen($internalPath2, 'w'); - list(, $result) = \OC_Helper::streamCopy($source, $target); + [, $result] = \OC_Helper::streamCopy($source, $target); fclose($source); fclose($target); @@ -611,7 +611,7 @@ class Storage { $expiration = self::getExpiration(); if ($expiration->shouldAutoExpire()) { - list($toDelete, $size) = self::getAutoExpireList($time, $versions); + [$toDelete, $size] = self::getAutoExpireList($time, $versions); } else { $size = 0; $toDelete = []; // versions we want to delete @@ -778,7 +778,7 @@ class Storage { $allVersions = Storage::getVersions($uid, $filename); $time = time(); - list($toDelete, $sizeOfDeletedVersions) = self::getExpireList($time, $allVersions, $availableSpace <= 0); + [$toDelete, $sizeOfDeletedVersions] = self::getExpireList($time, $allVersions, $availableSpace <= 0); $availableSpace = $availableSpace + $sizeOfDeletedVersions; $versionsSize = $versionsSize - $sizeOfDeletedVersions; @@ -789,7 +789,7 @@ class Storage { $allVersions = $result['all']; foreach ($result['by_file'] as $versions) { - list($toDeleteNew, $size) = self::getExpireList($time, $versions, $availableSpace <= 0); + [$toDeleteNew, $size] = self::getExpireList($time, $versions, $availableSpace <= 0); $toDelete = array_merge($toDelete, $toDeleteNew); $sizeOfDeletedVersions += $size; } diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index cd34dd7266f..bdb3236c2df 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -189,7 +189,7 @@ class UsersController extends Controller { ); $groupsInfo->setSorting($sortGroupsBy); - list($adminGroup, $groups) = $groupsInfo->get(); + [$adminGroup, $groups] = $groupsInfo->get(); if (!$isLDAPUsed && $this->appManager->isEnabledForUser('user_ldap')) { $isLDAPUsed = (bool)array_reduce($this->userManager->getBackends(), function ($ldapFound, $backend) { diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php index 2ff88633ed4..a9248a91efd 100644 --- a/apps/systemtags/lib/Activity/Provider.php +++ b/apps/systemtags/lib/Activity/Provider.php @@ -317,7 +317,7 @@ class Provider implements IProvider { protected function getSystemTagParameter($parameter) { $tagData = json_decode($parameter, true); if ($tagData === null) { - list($name, $status) = explode('|||', substr($parameter, 3, -3)); + [$name, $status] = explode('|||', substr($parameter, 3, -3)); $tagData = [ 'id' => 0,// No way to recover the ID 'name' => $name, diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index cc2fd70333c..f2842711f6d 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -102,7 +102,7 @@ class Util { * @return float */ public function calculateLuminance($color) { - list($red, $green, $blue) = $this->hexToRGB($color); + [$red, $green, $blue] = $this->hexToRGB($color); $compiler = new Compiler(); $hsl = $compiler->toHSL($red, $green, $blue); return $hsl[3] / 100; @@ -113,7 +113,7 @@ class Util { * @return float */ public function calculateLuma($color) { - list($red, $green, $blue) = $this->hexToRGB($color); + [$red, $green, $blue] = $this->hexToRGB($color); return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255; } diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index d11ca98ece9..9f317d6c642 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1254,7 +1254,7 @@ class Access extends LDAPUtility { if ($search === false) { return $counter > 0 ? $counter : false; } - list($sr, $pagedSearchOK) = $search; + [$sr, $pagedSearchOK] = $search; /* ++ Fixing RHDS searches with pages with zero results ++ * countEntriesInSearchResults() method signature changed @@ -1321,7 +1321,7 @@ class Access extends LDAPUtility { if ($search === false) { return []; } - list($sr, $pagedSearchOK) = $search; + [$sr, $pagedSearchOK] = $search; $cr = $this->connection->getConnectionResource(); if ($skipHandling) { diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php index 715ca1a170c..94d180df6c8 100644 --- a/apps/user_ldap/lib/Controller/RenewPasswordController.php +++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php @@ -93,7 +93,7 @@ class RenewPasswordController extends Controller { $errors = []; $messages = []; if (is_array($renewPasswordMessages)) { - list($errors, $messages) = $renewPasswordMessages; + [$errors, $messages] = $renewPasswordMessages; } $this->session->remove('renewPasswordMessages'); foreach ($errors as $value) { diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index a532bd6fd7a..ac7cbbe3733 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -238,7 +238,7 @@ class AccessTest extends TestCase { * @param array $case */ public function testStringResemblesDN($case) { - list($lw, $con, $um, $helper) = $this->getConnectorAndLdapMock(); + [$lw, $con, $um, $helper] = $this->getConnectorAndLdapMock(); /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->createMock(IConfig::class); $access = new Access($con, $lw, $um, $helper, $config, $this->ncUserManager); @@ -260,7 +260,7 @@ class AccessTest extends TestCase { * @param $case */ public function testStringResemblesDNLDAPmod($case) { - list(, $con, $um, $helper) = $this->getConnectorAndLdapMock(); + [, $con, $um, $helper] = $this->getConnectorAndLdapMock(); /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->createMock(IConfig::class); $lw = new LDAP(); @@ -430,7 +430,7 @@ class AccessTest extends TestCase { * @param $attribute */ public function testSanitizeDN($attribute) { - list($lw, $con, $um, $helper) = $this->getConnectorAndLdapMock(); + [$lw, $con, $um, $helper] = $this->getConnectorAndLdapMock(); /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->createMock(IConfig::class); @@ -647,7 +647,7 @@ class AccessTest extends TestCase { } public function testFetchListOfGroupsKnown() { - $filter = 'objectClass=nextcloudGroup'; + $filter = 'objectClass=nextcloudGroup'; $attributes = ['cn', 'gidNumber', 'dn']; $base = 'ou=SomeGroups,dc=my,dc=directory'; diff --git a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php index 35259345f25..05059a50a4b 100644 --- a/apps/user_ldap/tests/Mapping/AbstractMappingTest.php +++ b/apps/user_ldap/tests/Mapping/AbstractMappingTest.php @@ -106,7 +106,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * Hint: successful mapping is tested inherently with mapEntries(). */ public function testMap() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); // test that mapping will not happen when it shall not $tooLongDN = 'uid=joann,ou=Secret Small Specialized Department,ou=Some Tremendously Important Department,ou=Another Very Important Department,ou=Pretty Meaningful Derpartment,ou=Quite Broad And General Department,ou=The Topmost Department,dc=hugelysuccessfulcompany,dc=com'; @@ -126,7 +126,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * mapping entries */ public function testUnmap() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); foreach ($data as $entry) { $result = $mapper->unmap($entry['name']); @@ -142,7 +142,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * and unsuccessful requests. */ public function testGetMethods() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); foreach ($data as $entry) { $fdn = $mapper->getDNByName($entry['name']); @@ -170,7 +170,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests getNamesBySearch() for successful and unsuccessful requests. */ public function testSearch() { - list($mapper,) = $this->initTest(); + [$mapper,] = $this->initTest(); $names = $mapper->getNamesBySearch('oo', '%', '%'); $this->assertTrue(is_array($names)); @@ -186,7 +186,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests setDNbyUUID() for successful and unsuccessful update. */ public function testSetDNMethod() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $newDN = 'uid=modified,dc=example,dc=org'; $done = $mapper->setDNbyUUID($newDN, $data[0]['uuid']); @@ -206,7 +206,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { */ public function testSetUUIDMethod() { /** @var AbstractMapping $mapper */ - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $newUUID = 'ABC737-DEF754'; @@ -225,7 +225,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests clear() for successful update. */ public function testClear() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $done = $mapper->clear(); $this->assertTrue($done); @@ -239,7 +239,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests clear() for successful update. */ public function testClearCb() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); $callbackCalls = 0; $test = $this; @@ -262,7 +262,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { * tests getList() method */ public function testList() { - list($mapper, $data) = $this->initTest(); + [$mapper, $data] = $this->initTest(); // get all entries without specifying offset or limit $results = $mapper->getList(); @@ -284,7 +284,7 @@ abstract class AbstractMappingTest extends \Test\TestCase { public function testGetListOfIdsByDn() { /** @var AbstractMapping $mapper */ - list($mapper,) = $this->initTest(); + [$mapper,] = $this->initTest(); $listOfDNs = []; for ($i = 0; $i < 66640; $i++) { diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index 378d549bc27..25aa5d66c8f 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -98,7 +98,7 @@ class WizardTest extends TestCase { } public function testCumulativeSearchOnAttributeLimited() { - list($wizard, $configuration, $ldap) = $this->getWizardAndMocks(); + [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) ->method('__get') @@ -158,7 +158,7 @@ class WizardTest extends TestCase { } public function testCumulativeSearchOnAttributeUnlimited() { - list($wizard, $configuration, $ldap) = $this->getWizardAndMocks(); + [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) ->method('__get') @@ -234,7 +234,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeAlreadySet() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -256,7 +256,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeOverrideSet() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -295,7 +295,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeFind() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -334,7 +334,7 @@ class WizardTest extends TestCase { } public function testDetectEmailAttributeFindNothing() { - list($wizard, $configuration, $ldap, $access) + [$wizard, $configuration, $ldap, $access] = $this->getWizardAndMocks(); $configuration->expects($this->any()) @@ -374,7 +374,7 @@ class WizardTest extends TestCase { public function testCumulativeSearchOnAttributeSkipReadDN() { // tests that there is no infinite loop, when skipping already processed // DNs (they can be returned multiple times for multiple filters ) - list($wizard, $configuration, $ldap) = $this->getWizardAndMocks(); + [$wizard, $configuration, $ldap] = $this->getWizardAndMocks(); $configuration->expects($this->any()) ->method('__get') diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php index df210cdae58..c23b22a0319 100644 --- a/apps/workflowengine/lib/Check/RequestTime.php +++ b/apps/workflowengine/lib/Check/RequestTime.php @@ -79,8 +79,8 @@ class RequestTime implements ICheck { * @return int */ protected function getTimestamp($currentTimestamp, $value) { - list($time1, $timezone1) = explode(' ', $value); - list($hour1, $minute1) = explode(':', $time1); + [$time1, $timezone1] = explode(' ', $value); + [$hour1, $minute1] = explode(':', $time1); $date1 = new \DateTime('now', new \DateTimeZone($timezone1)); $date1->setTimestamp($currentTimestamp); $date1->setTime($hour1, $minute1); diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php index 0ae26627427..9400d7bdecd 100644 --- a/apps/workflowengine/lib/Service/RuleMatcher.php +++ b/apps/workflowengine/lib/Service/RuleMatcher.php @@ -231,7 +231,7 @@ class RuleMatcher implements IRuleMatcher { $checkInstance->setFileInfo($this->fileInfo['storage'], $this->fileInfo['path'], $this->fileInfo['isDir']); } elseif ($checkInstance instanceof IEntityCheck) { foreach ($this->contexts as $entityInfo) { - list($entity, $subject) = $entityInfo; + [$entity, $subject] = $entityInfo; $checkInstance->setEntitySubject($entity, $subject); } } elseif (!$checkInstance instanceof ICheck) { diff --git a/build/integration/features/bootstrap/Avatar.php b/build/integration/features/bootstrap/Avatar.php index 388715340c6..e5d5f32be1b 100644 --- a/build/integration/features/bootstrap/Avatar.php +++ b/build/integration/features/bootstrap/Avatar.php @@ -173,7 +173,7 @@ trait Avatar { * @param string size */ public function lastAvatarIsASquareOfSize(string $size) { - list($width, $height) = getimagesizefromstring($this->lastAvatar); + [$width, $height] = getimagesizefromstring($this->lastAvatar); Assert::assertEquals($width, $height, 'Avatar is not a square'); Assert::assertEquals($size, $width); diff --git a/build/license.php b/build/license.php index e736419e2ac..689d7e5e194 100644 --- a/build/license.php +++ b/build/license.php @@ -356,7 +356,7 @@ With help from many libraries and frameworks including: if (strpos($entry, '> ') === false) { $this->mailMap[$entry] = $entry; } else { - list($use, $actual) = explode('> ', $entry); + [$use, $actual] = explode('> ', $entry); $this->mailMap[$actual] = $use . '>'; } } diff --git a/build/psalm/AppFrameworkTainter.php b/build/psalm/AppFrameworkTainter.php index 9b2f719a447..c12dcfc6ce2 100644 --- a/build/psalm/AppFrameworkTainter.php +++ b/build/psalm/AppFrameworkTainter.php @@ -40,7 +40,7 @@ class AppFrameworkTainter implements AfterFunctionLikeAnalysisInterface { if ($stmt->isPublic() && !$stmt->isMagic()) { foreach ($stmt->params as $i => $param) { $expr_type = new Psalm\Type\Union([new Psalm\Type\Atomic\TString()]); - $expr_identifier = (strtolower($statements_source->getFQCLN()) . '::' . strtolower($classlike_storage->cased_name) . '#' . ($i+1)); + $expr_identifier = (strtolower($statements_source->getFQCLN()) . '::' . strtolower($classlike_storage->cased_name) . '#' . ($i + 1)); if ($expr_type) { $codebase->addTaintSource( diff --git a/composer.json b/composer.json index 1d7195a0b95..405aaca088b 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "ext-xmlreader": "*" }, "require-dev": { - "nextcloud/coding-standard": "^0.3.0", + "nextcloud/coding-standard": "^0.5.0", "vimeo/psalm": "^4.0" }, "scripts": { diff --git a/composer.lock b/composer.lock index 92944f2b4d9..b6ec919a9c7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dad26d14cb2d2c73421ba7ce9567cbff", + "content-hash": "4970547e139d7ea77cd8b6d38c729084", "packages": [], "packages-dev": [ { @@ -228,28 +228,29 @@ }, { "name": "composer/semver", - "version": "1.7.1", + "version": "3.2.4", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "38276325bd896f90dfcfe30029aa5db40df387a7" + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/38276325bd896f90dfcfe30029aa5db40df387a7", - "reference": "38276325bd896f90dfcfe30029aa5db40df387a7", + "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5" + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -299,7 +300,7 @@ "type": "tidelift" } ], - "time": "2020-09-27T13:13:07+00:00" + "time": "2020-11-13T08:59:24+00:00" }, { "name": "composer/xdebug-handler", @@ -394,16 +395,16 @@ }, { "name": "doctrine/annotations", - "version": "1.10.3", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d" + "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5db60a4969eba0e0c197a19c077780aadbc43c5d", - "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad", "shasum": "" }, "require": { @@ -413,12 +414,14 @@ }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -453,13 +456,13 @@ } ], "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", "keywords": [ "annotations", "docblock", "parser" ], - "time": "2020-05-25T17:24:27+00:00" + "time": "2020-10-26T10:28:16+00:00" }, { "name": "doctrine/lexer", @@ -632,27 +635,27 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.16.3", + "version": "v2.18.2", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0" + "reference": "18f8c9d184ba777380794a389fabc179896ba913" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/83baf823a33a1cbd5416c8626935cf3f843c10b0", - "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/18f8c9d184ba777380794a389fabc179896ba913", + "reference": "18f8c9d184ba777380794a389fabc179896ba913", "shasum": "" }, "require": { - "composer/semver": "^1.4", + "composer/semver": "^1.4 || ^2.0 || ^3.0", "composer/xdebug-handler": "^1.2", "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || ^7.0", + "php": "^5.6 || ^7.0 || ^8.0", "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", "symfony/finder": "^3.0 || ^4.0 || ^5.0", @@ -663,22 +666,24 @@ "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.2", + "keradus/cli-executor": "^1.4", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.1", + "php-coveralls/php-coveralls": "^2.4.2", "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1", - "phpunitgoodpractices/traits": "^1.8", - "symfony/phpunit-bridge": "^4.3 || ^5.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", + "symfony/phpunit-bridge": "^5.2.1", "symfony/yaml": "^3.0 || ^4.0 || ^5.0" }, "suggest": { "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "ext-mbstring": "For handling non-UTF8 characters.", "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." @@ -719,13 +724,17 @@ } ], "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.2" + }, "funding": [ { "url": "https://github.com/keradus", "type": "github" } ], - "time": "2020-04-15T18:51:10+00:00" + "time": "2021-01-26T00:22:21+00:00" }, { "name": "netresearch/jsonmapper", @@ -775,21 +784,21 @@ }, { "name": "nextcloud/coding-standard", - "version": "v0.3.0", + "version": "v0.5.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "4f5cd012760f8293e19e602651a0ecaa265e4db9" + "reference": "742ed895ae76c10daf95e08488cfb3f554199f40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/4f5cd012760f8293e19e602651a0ecaa265e4db9", - "reference": "4f5cd012760f8293e19e602651a0ecaa265e4db9", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/742ed895ae76c10daf95e08488cfb3f554199f40", + "reference": "742ed895ae76c10daf95e08488cfb3f554199f40", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^2.16", - "php": "^7.2" + "friendsofphp/php-cs-fixer": "^2.17", + "php": "^7.2|^8.0" }, "type": "library", "autoload": { @@ -808,7 +817,7 @@ } ], "description": "Nextcloud coding standards for the php cs fixer", - "time": "2020-04-10T14:57:18+00:00" + "time": "2021-01-11T14:15:58+00:00" }, { "name": "nikic/php-parser", @@ -912,69 +921,24 @@ "time": "2019-03-29T20:06:56+00:00" }, { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" - }, - { "name": "php-cs-fixer/diff", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", "symfony/process": "^3.3" }, "type": "library", @@ -989,14 +953,14 @@ ], "authors": [ { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { "name": "SpacePossum" } ], @@ -1005,7 +969,7 @@ "keywords": [ "diff" ], - "time": "2018-02-15T16:58:55+00:00" + "time": "2020-10-14T08:39:05+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1359,16 +1323,16 @@ }, { "name": "symfony/console", - "version": "v5.1.8", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e" + "reference": "47c02526c532fb381374dab26df05e7313978976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e", - "reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e", + "url": "https://api.github.com/repos/symfony/console/zipball/47c02526c532fb381374dab26df05e7313978976", + "reference": "47c02526c532fb381374dab26df05e7313978976", "shasum": "" }, "require": { @@ -1429,6 +1393,12 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], "funding": [ { "url": "https://symfony.com/sponsor", @@ -1443,20 +1413,20 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2020-12-18T08:03:05+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.1.2", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337" + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", - "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", "shasum": "" }, "require": { @@ -1465,7 +1435,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1503,20 +1477,20 @@ "type": "tidelift" } ], - "time": "2020-05-27T08:34:37+00:00" + "time": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.1.2", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7" + "reference": "1c93f7a1dff592c252574c79a8635a8a80856042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc0d059e2e997e79ca34125a52f3e33de4424ac7", - "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1c93f7a1dff592c252574c79a8635a8a80856042", + "reference": "1c93f7a1dff592c252574c79a8635a8a80856042", "shasum": "" }, "require": { @@ -1536,6 +1510,7 @@ "psr/log": "~1.0", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", "symfony/expression-language": "^4.4|^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/service-contracts": "^1.1|^2", @@ -1546,11 +1521,6 @@ "symfony/http-kernel": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" @@ -1589,20 +1559,20 @@ "type": "tidelift" } ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-12-18T08:03:05+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.1.2", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "405952c4e90941a17e52ef7489a2bd94870bb290" + "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/405952c4e90941a17e52ef7489a2bd94870bb290", - "reference": "405952c4e90941a17e52ef7489a2bd94870bb290", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ba7d54483095a198fa51781bc608d17e84dffa2", + "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2", "shasum": "" }, "require": { @@ -1615,7 +1585,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1661,20 +1635,20 @@ "type": "tidelift" } ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/filesystem", - "version": "v5.1.2", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "6e4320f06d5f2cce0d96530162491f4465179157" + "reference": "fa8f8cab6b65e2d99a118e082935344c5ba8c60d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6e4320f06d5f2cce0d96530162491f4465179157", - "reference": "6e4320f06d5f2cce0d96530162491f4465179157", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/fa8f8cab6b65e2d99a118e082935344c5ba8c60d", + "reference": "fa8f8cab6b65e2d99a118e082935344c5ba8c60d", "shasum": "" }, "require": { @@ -1682,11 +1656,6 @@ "symfony/polyfill-ctype": "~1.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" @@ -1725,31 +1694,26 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-11-30T17:05:38+00:00" }, { "name": "symfony/finder", - "version": "v5.1.2", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", - "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", + "url": "https://api.github.com/repos/symfony/finder/zipball/0b9231a5922fd7287ba5b411893c0ecd2733e5ba", + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba", "shasum": "" }, "require": { "php": ">=7.2.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -1788,33 +1752,29 @@ "type": "tidelift" } ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-12-08T17:02:38+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.1.2", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "663f5dd5e14057d1954fe721f9709d35837f2447" + "reference": "87a2a4a766244e796dd9cb9d6f58c123358cd986" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/663f5dd5e14057d1954fe721f9709d35837f2447", - "reference": "663f5dd5e14057d1954fe721f9709d35837f2447", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/87a2a4a766244e796dd9cb9d6f58c123358cd986", + "reference": "87a2a4a766244e796dd9cb9d6f58c123358cd986", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", "symfony/polyfill-php80": "^1.15" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" @@ -1858,20 +1818,20 @@ "type": "tidelift" } ], - "time": "2020-05-23T13:08:13+00:00" + "time": "2020-10-24T12:08:07+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -1883,7 +1843,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1934,20 +1894,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c" + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", - "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af", + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af", "shasum": "" }, "require": { @@ -1959,7 +1919,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2012,20 +1972,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "727d1096295d807c309fb01a851577302394c897" + "reference": "6e971c891537eb617a00bb07a43d182a6915faba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", - "reference": "727d1096295d807c309fb01a851577302394c897", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", + "reference": "6e971c891537eb617a00bb07a43d182a6915faba", "shasum": "" }, "require": { @@ -2037,7 +1997,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2093,20 +2053,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T17:09:11+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "shasum": "" }, "require": { @@ -2118,7 +2078,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2170,47 +2130,35 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.17.1", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "471b096aede7025bace8eb356b9ac801aaba7e2d" + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/471b096aede7025bace8eb356b9ac801aaba7e2d", - "reference": "471b096aede7025bace8eb356b9ac801aaba7e2d", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": ">=7.1" }, - "type": "library", + "type": "metapackage", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -2247,29 +2195,33 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.17.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "f048e612a3905f34931127360bdd2def19a5e582" + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", - "reference": "f048e612a3905f34931127360bdd2def19a5e582", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2316,20 +2268,20 @@ "type": "tidelift" } ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { @@ -2338,7 +2290,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2392,20 +2344,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { @@ -2414,7 +2366,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2472,20 +2424,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", - "version": "v5.1.2", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1" + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", - "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", + "url": "https://api.github.com/repos/symfony/process/zipball/bd8815b8b6705298beaa384f04fabd459c10bedd", + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd", "shasum": "" }, "require": { @@ -2493,11 +2445,6 @@ "symfony/polyfill-php80": "^1.15" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -2536,7 +2483,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-12-08T17:03:37+00:00" }, { "name": "symfony/service-contracts", @@ -2616,16 +2563,16 @@ }, { "name": "symfony/stopwatch", - "version": "v5.1.2", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323" + "reference": "2b105c0354f39a63038a1d8bf776ee92852813af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f7c58cf81dbb5dd67d423a89d577524a2ec0323", - "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/2b105c0354f39a63038a1d8bf776ee92852813af", + "reference": "2b105c0354f39a63038a1d8bf776ee92852813af", "shasum": "" }, "require": { @@ -2633,11 +2580,6 @@ "symfony/service-contracts": "^1.0|^2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Stopwatch\\": "" @@ -2676,20 +2618,20 @@ "type": "tidelift" } ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-11-01T16:14:45+00:00" }, { "name": "symfony/string", - "version": "v5.1.8", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "a97573e960303db71be0dd8fda9be3bca5e0feea" + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/a97573e960303db71be0dd8fda9be3bca5e0feea", - "reference": "a97573e960303db71be0dd8fda9be3bca5e0feea", + "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", "shasum": "" }, "require": { @@ -2756,7 +2698,7 @@ "type": "tidelift" } ], - "time": "2020-10-24T12:01:57+00:00" + "time": "2020-12-05T07:33:16+00:00" }, { "name": "vimeo/psalm", @@ -2968,5 +2910,5 @@ "ext-xmlreader": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php index bcb68ced472..82a23e38176 100644 --- a/core/Command/L10n/CreateJs.php +++ b/core/Command/L10n/CreateJs.php @@ -91,7 +91,7 @@ class CreateJs extends Command implements CompletionAwareInterface { } private function writeFiles($app, $path, $lang, OutputInterface $output) { - list($translations, $plurals) = $this->loadTranslations($path, $lang); + [$translations, $plurals] = $this->loadTranslations($path, $lang); $this->writeJsFile($app, $path, $lang, $output, $translations, $plurals); $this->writeJsonFile($path, $lang, $output, $translations, $plurals); } diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php index 0e02e6d24b8..bab47002f8a 100644 --- a/core/Command/TwoFactorAuth/State.php +++ b/core/Command/TwoFactorAuth/State.php @@ -63,7 +63,7 @@ class State extends Base { $providerStates = $this->registry->getProviderStates($user); $filtered = $this->filterEnabledDisabledUnknownProviders($providerStates); - list($enabled, $disabled) = $filtered; + [$enabled, $disabled] = $filtered; if (!empty($enabled)) { $output->writeln("Two-factor authentication is enabled for user $uid"); diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 753631ddf6f..7ec8f4843e8 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -156,7 +156,7 @@ class LoginController extends Controller { $loginMessages = $this->session->get('loginMessages'); if (is_array($loginMessages)) { - list($errors, $messages) = $loginMessages; + [$errors, $messages] = $loginMessages; $this->initialStateService->provideInitialState('core', 'loginMessages', $messages); $this->initialStateService->provideInitialState('core', 'loginErrors', $errors); } diff --git a/core/Controller/OCSController.php b/core/Controller/OCSController.php index f502f038eb8..f3a65420bd7 100644 --- a/core/Controller/OCSController.php +++ b/core/Controller/OCSController.php @@ -93,7 +93,7 @@ class OCSController extends \OCP\AppFramework\OCSController { */ public function getCapabilities() { $result = []; - list($major, $minor, $micro) = \OCP\Util::getVersion(); + [$major, $minor, $micro] = \OCP\Util::getVersion(); $result['version'] = [ 'major' => $major, 'minor' => $minor, diff --git a/core/Controller/TwoFactorChallengeController.php b/core/Controller/TwoFactorChallengeController.php index 251ae85b3f7..a9e1ee35917 100644 --- a/core/Controller/TwoFactorChallengeController.php +++ b/core/Controller/TwoFactorChallengeController.php @@ -108,7 +108,7 @@ class TwoFactorChallengeController extends Controller { $user = $this->userSession->getUser(); $providerSet = $this->twoFactorManager->getProviderSet($user); $allProviders = $providerSet->getProviders(); - list($providers, $backupProvider) = $this->splitProvidersAndBackupCodes($allProviders); + [$providers, $backupProvider] = $this->splitProvidersAndBackupCodes($allProviders); $setupProviders = $this->twoFactorManager->getLoginSetupProviders($user); $data = [ 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; } diff --git a/public.php b/public.php index b8701c0c0f2..332f55e960c 100644 --- a/public.php +++ b/public.php @@ -53,7 +53,7 @@ try { $service = $request->getParam('service', ''); } else { $pathInfo = trim($pathInfo, '/'); - list($service) = explode('/', $pathInfo); + [$service] = explode('/', $pathInfo); } $file = \OC::$server->getConfig()->getAppValue('core', 'public_' . strip_tags($service)); if ($file === '') { diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php index cb1b9379a90..61ed4a50d62 100644 --- a/tests/Core/Controller/OCSControllerTest.php +++ b/tests/Core/Controller/OCSControllerTest.php @@ -88,7 +88,7 @@ class OCSControllerTest extends TestCase { $this->userSession->expects($this->once()) ->method('isLoggedIn') ->willReturn(true); - list($major, $minor, $micro) = \OCP\Util::getVersion(); + [$major, $minor, $micro] = \OCP\Util::getVersion(); $result = []; $result['version'] = [ @@ -121,7 +121,7 @@ class OCSControllerTest extends TestCase { $this->userSession->expects($this->once()) ->method('isLoggedIn') ->willReturn(false); - list($major, $minor, $micro) = \OCP\Util::getVersion(); + [$major, $minor, $micro] = \OCP\Util::getVersion(); $result = []; $result['version'] = [ diff --git a/tests/Core/Service/LoginFlowV2ServiceUnitTest.php b/tests/Core/Service/LoginFlowV2ServiceUnitTest.php index 233960ea97a..18b2f370fb3 100644 --- a/tests/Core/Service/LoginFlowV2ServiceUnitTest.php +++ b/tests/Core/Service/LoginFlowV2ServiceUnitTest.php @@ -181,7 +181,7 @@ class LoginFlowV2ServiceUnitTest extends TestCase { } public function testPollRemoveDataFromDb() { - list($encrypted, $privateKey) = $this->getOpenSSLEncryptedPublicAndPrivateKey('test_pass'); + [$encrypted, $privateKey] = $this->getOpenSSLEncryptedPublicAndPrivateKey('test_pass'); $this->crypto->expects($this->once()) ->method('decrypt') @@ -295,7 +295,7 @@ class LoginFlowV2ServiceUnitTest extends TestCase { */ public function testFlowDone() { - list(,, $publicKey) = $this->getOpenSSLEncryptedPublicAndPrivateKey('test_pass'); + [,, $publicKey] = $this->getOpenSSLEncryptedPublicAndPrivateKey('test_pass'); $loginFlowV2 = new LoginFlowV2(); $loginFlowV2->setPublicKey($publicKey); diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php index 1345df13379..981260a80dd 100644 --- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php +++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php @@ -133,7 +133,7 @@ class RemotePluginTest extends TestCase { ->method('search') ->willReturn([]); - list($remoteUser, $remoteUrl) = $this->plugin->splitUserRemote($remote); + [$remoteUser, $remoteUrl] = $this->plugin->splitUserRemote($remote); $this->assertSame($expectedUser, $remoteUser); $this->assertSame($expectedUrl, $remoteUrl); } diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php index 0aebef72de0..17f5c39aca7 100644 --- a/tests/lib/Collaboration/Collaborators/SearchTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchTest.php @@ -123,7 +123,7 @@ class SearchTest extends TestCase { $this->search->registerPlugin(['shareType' => 'SHARE_TYPE_GROUP', 'class' => $groupPlugin]); $this->search->registerPlugin(['shareType' => 'SHARE_TYPE_REMOTE', 'class' => $remotePlugin]); - list($results, $moreResults) = $this->search->search($searchTerm, $shareTypes, false, $perPage, $perPage * ($page - 1)); + [$results, $moreResults] = $this->search->search($searchTerm, $shareTypes, false, $perPage, $perPage * ($page - 1)); $this->assertEquals($expected, $results); $this->assertSame($expectedMoreResults, $moreResults); diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php index 6f3ebbb2b0c..6b758534897 100644 --- a/tests/lib/DB/MigratorTest.php +++ b/tests/lib/DB/MigratorTest.php @@ -138,7 +138,7 @@ class MigratorTest extends \Test\TestCase { if ($this->isSQLite()) { $this->markTestSkipped('sqlite does not throw errors when creating a new key on existing data'); } - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); @@ -157,7 +157,7 @@ class MigratorTest extends \Test\TestCase { } public function testChangeToString() { - list($startSchema, $endSchema) = $this->getChangedTypeSchema('integer', 'string'); + [$startSchema, $endSchema] = $this->getChangedTypeSchema('integer', 'string'); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); $schema = new SchemaWrapper($this->connection); @@ -184,7 +184,7 @@ class MigratorTest extends \Test\TestCase { } public function testUpgrade() { - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); @@ -202,7 +202,7 @@ class MigratorTest extends \Test\TestCase { $this->config->setSystemValue('dbtableprefix', 'ownc_'); $this->tableName = strtolower($this->getUniqueID($this->config->getSystemValue('dbtableprefix') . 'test_')); - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); @@ -217,7 +217,7 @@ class MigratorTest extends \Test\TestCase { } public function testInsertAfterUpgrade() { - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php index 2a3a4e9a9c1..76d9dab75ee 100644 --- a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php @@ -82,8 +82,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testComparison($comparison, $input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->comparison($doctrineInput1, $comparison, $doctrineInput2), @@ -109,8 +109,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->eq($doctrineInput1, $doctrineInput2), @@ -127,8 +127,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testNotEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->neq($doctrineInput1, $doctrineInput2), @@ -145,8 +145,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testLowerThan($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->lt($doctrineInput1, $doctrineInput2), @@ -163,8 +163,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testLowerThanEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->lte($doctrineInput1, $doctrineInput2), @@ -181,8 +181,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testGreaterThan($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->gt($doctrineInput1, $doctrineInput2), @@ -199,8 +199,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testGreaterThanEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->gte($doctrineInput1, $doctrineInput2), @@ -236,7 +236,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testLike($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->like('`test`', $doctrineInput), @@ -251,7 +251,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testNotLike($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->notLike('`test`', $doctrineInput), @@ -275,7 +275,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testIn($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->in('`test`', $doctrineInput), @@ -290,7 +290,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testNotIn($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->notIn('`test`', $doctrineInput), diff --git a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php index 3b5562b69c9..17e7ac14a02 100644 --- a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php +++ b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php @@ -136,7 +136,7 @@ class QuoteHelperTest extends \Test\TestCase { } if (substr_count($string, '.')) { - list($alias, $columnName) = explode('.', $string); + [$alias, $columnName] = explode('.', $string); return '`' . $alias . '`.`' . $columnName . '`'; } diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php index 8344460f757..7ae0c2b38c2 100644 --- a/tests/lib/Files/Cache/QuerySearchHelperTest.php +++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php @@ -111,7 +111,7 @@ class QuerySearchHelperTest extends TestCase { $data['name'] = basename($data['path']); $data['parent'] = -1; if (isset($data['mimetype'])) { - list($mimepart,) = explode('/', $data['mimetype']); + [$mimepart,] = explode('/', $data['mimetype']); $data['mimepart'] = $this->mimetypeLoader->getId($mimepart); $data['mimetype'] = $this->mimetypeLoader->getId($data['mimetype']); } else { diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index d170049aab5..4ee0f730440 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -107,7 +107,7 @@ class UserMountCacheTest extends TestCase { public function testNewMounts() { $user = $this->userManager->get('u1'); - list($storage) = $this->getStorage(10); + [$storage] = $this->getStorage(10); $mount = new MountPoint($storage, '/asd/'); $this->cache->registerMounts($user, [$mount]); @@ -127,7 +127,7 @@ class UserMountCacheTest extends TestCase { public function testSameMounts() { $user = $this->userManager->get('u1'); - list($storage) = $this->getStorage(10); + [$storage] = $this->getStorage(10); $mount = new MountPoint($storage, '/asd/'); $this->cache->registerMounts($user, [$mount]); @@ -151,7 +151,7 @@ class UserMountCacheTest extends TestCase { public function testRemoveMounts() { $user = $this->userManager->get('u1'); - list($storage) = $this->getStorage(10); + [$storage] = $this->getStorage(10); $mount = new MountPoint($storage, '/asd/'); $this->cache->registerMounts($user, [$mount]); @@ -170,7 +170,7 @@ class UserMountCacheTest extends TestCase { public function testChangeMounts() { $user = $this->userManager->get('u1'); - list($storage) = $this->getStorage(10); + [$storage] = $this->getStorage(10); $mount = new MountPoint($storage, '/bar/'); $this->cache->registerMounts($user, [$mount]); @@ -193,7 +193,7 @@ class UserMountCacheTest extends TestCase { public function testChangeMountId() { $user = $this->userManager->get('u1'); - list($storage) = $this->getStorage(10); + [$storage] = $this->getStorage(10); $mount = new MountPoint($storage, '/foo/', null, null, null, null); $this->cache->registerMounts($user, [$mount]); @@ -218,8 +218,8 @@ class UserMountCacheTest extends TestCase { $user2 = $this->userManager->get('u2'); $user3 = $this->userManager->get('u3'); - list($storage1, $id1) = $this->getStorage(1); - list($storage2, $id2) = $this->getStorage(2); + [$storage1, $id1] = $this->getStorage(1); + [$storage2, $id2] = $this->getStorage(2); $mount1 = new MountPoint($storage1, '/foo/'); $mount2 = new MountPoint($storage2, '/bar/'); @@ -252,8 +252,8 @@ class UserMountCacheTest extends TestCase { $user1 = $this->userManager->get('u1'); $user2 = $this->userManager->get('u2'); - list($storage1, $id1) = $this->getStorage(1); - list($storage2, $id2) = $this->getStorage(2); + [$storage1, $id1] = $this->getStorage(1); + [$storage2, $id2] = $this->getStorage(2); $mount1 = new MountPoint($storage1, '/foo/'); $mount2 = new MountPoint($storage2, '/bar/'); @@ -282,8 +282,8 @@ class UserMountCacheTest extends TestCase { $user1 = $this->userManager->get('u1'); $user2 = $this->userManager->get('u2'); - list($storage1, $id1) = $this->getStorage(1); - list($storage2, $id2) = $this->getStorage(2); + [$storage1, $id1] = $this->getStorage(1); + [$storage2, $id2] = $this->getStorage(2); $mount1 = new MountPoint($storage1, '/foo/'); $mount2 = new MountPoint($storage2, '/bar/'); @@ -346,7 +346,7 @@ class UserMountCacheTest extends TestCase { public function testGetMountsForFileIdRootId() { $user1 = $this->userManager->get('u1'); - list($storage1, $rootId) = $this->getStorage(2); + [$storage1, $rootId] = $this->getStorage(2); $mount1 = new MountPoint($storage1, '/foo/'); $this->cache->registerMounts($user1, [$mount1]); @@ -368,7 +368,7 @@ class UserMountCacheTest extends TestCase { $fileId = $this->createCacheEntry('/foo/bar', 2); - list($storage1, $rootId) = $this->getStorage(2); + [$storage1, $rootId] = $this->getStorage(2); $mount1 = new MountPoint($storage1, '/foo/'); $this->cache->registerMounts($user1, [$mount1]); @@ -390,7 +390,7 @@ class UserMountCacheTest extends TestCase { public function testGetMountsForFileIdSubFolderMount() { $user1 = $this->userManager->get('u1'); - list($storage1, $rootId) = $this->getStorage(2); + [$storage1, $rootId] = $this->getStorage(2); $folderId = $this->createCacheEntry('/foo', 2); $fileId = $this->createCacheEntry('/foo/bar', 2); @@ -424,7 +424,7 @@ class UserMountCacheTest extends TestCase { public function testGetMountsForFileIdSubFolderMountOutside() { $user1 = $this->userManager->get('u1'); - list($storage1, $rootId) = $this->getStorage(2); + [$storage1, $rootId] = $this->getStorage(2); $folderId = $this->createCacheEntry('/foo', 2); $fileId = $this->createCacheEntry('/bar/asd', 2); @@ -452,7 +452,7 @@ class UserMountCacheTest extends TestCase { public function testGetMountsForFileIdDeletedUser() { $user1 = $this->userManager->get('u1'); - list($storage1, $rootId) = $this->getStorage(2); + [$storage1, $rootId] = $this->getStorage(2); $rootId = $this->createCacheEntry('', 2); $mount1 = new MountPoint($storage1, '/foo/'); $this->cache->registerMounts($user1, [$mount1]); @@ -469,7 +469,7 @@ class UserMountCacheTest extends TestCase { $user2 = $this->userManager->get('u2'); /** @var Storage $storage1 */ - list($storage1, $rootId) = $this->getStorage(2); + [$storage1, $rootId] = $this->getStorage(2); $folderId = $this->createCacheEntry('files', 2, 100); $fileId = $this->createCacheEntry('files/foo', 2, 7); $storage1->getCache()->put($folderId, ['size' => 100]); diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index d9e6de898f0..5859bc2c772 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -99,9 +99,9 @@ class FilesystemTest extends \Test\TestCase { \OC\Files\Filesystem::mount('\OC\Files\Storage\Local', self::getStorageData(), '/'); $this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/')); $this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/some/folder')); - list(, $internalPath) = \OC\Files\Filesystem::resolvePath('/'); + [, $internalPath] = \OC\Files\Filesystem::resolvePath('/'); $this->assertEquals('', $internalPath); - list(, $internalPath) = \OC\Files\Filesystem::resolvePath('/some/folder'); + [, $internalPath] = \OC\Files\Filesystem::resolvePath('/some/folder'); $this->assertEquals('some/folder', $internalPath); \OC\Files\Filesystem::mount('\OC\Files\Storage\Local', self::getStorageData(), '/some'); @@ -109,7 +109,7 @@ class FilesystemTest extends \Test\TestCase { $this->assertEquals('/some/', \OC\Files\Filesystem::getMountPoint('/some/folder')); $this->assertEquals('/some/', \OC\Files\Filesystem::getMountPoint('/some/')); $this->assertEquals('/some/', \OC\Files\Filesystem::getMountPoint('/some')); - list(, $internalPath) = \OC\Files\Filesystem::resolvePath('/some/folder'); + [, $internalPath] = \OC\Files\Filesystem::resolvePath('/some/folder'); $this->assertEquals('folder', $internalPath); } @@ -421,7 +421,7 @@ class FilesystemTest extends \Test\TestCase { '/' . $userId . '/', \OC\Files\Filesystem::getMountPoint('/' . $userId . '/cache') ); - list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache'); + [$storage, $internalPath] = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache'); $this->assertTrue($storage->instanceOfStorage('\OCP\Files\IHomeStorage')); $this->assertEquals('cache', $internalPath); $user = \OC::$server->getUserManager()->get($userId); @@ -452,7 +452,7 @@ class FilesystemTest extends \Test\TestCase { '/' . $userId . '/cache/', \OC\Files\Filesystem::getMountPoint('/' . $userId . '/cache') ); - list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache'); + [$storage, $internalPath] = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache'); $this->assertTrue($storage->instanceOfStorage('\OC\Files\Storage\Local')); $this->assertEquals('', $internalPath); $user = \OC::$server->getUserManager()->get($userId); diff --git a/tests/lib/Files/Node/HookConnectorTest.php b/tests/lib/Files/Node/HookConnectorTest.php index a5e73f18365..7990abad231 100644 --- a/tests/lib/Files/Node/HookConnectorTest.php +++ b/tests/lib/Files/Node/HookConnectorTest.php @@ -238,7 +238,7 @@ class HookConnectorTest extends TestCase { $this->legacyDispatcher->addListener($expectedLegacyEvent, function ($event) use (&$dispatcherSourceNode, &$dispatcherTargetNode, &$dispatcherCalled) { /** @var GenericEvent|APIGenericEvent $event */ $dispatcherCalled = true; - list($dispatcherSourceNode, $dispatcherTargetNode) = $event->getSubject(); + [$dispatcherSourceNode, $dispatcherTargetNode] = $event->getSubject(); }); $newDispatcherCalled = false; diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index 199ba5f2e26..82b3e3556cb 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php @@ -113,7 +113,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { $instance = $this->getLimitedStorage(16); $inputStream = fopen('data://text/plain,foobarqwerty', 'r'); $outputStream = $instance->fopen('files/foo', 'w+'); - list($count, $result) = \OC_Helper::streamCopy($inputStream, $outputStream); + [$count, $result] = \OC_Helper::streamCopy($inputStream, $outputStream); $this->assertEquals(12, $count); $this->assertTrue($result); fclose($inputStream); @@ -124,7 +124,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { $instance = $this->getLimitedStorage(9); $inputStream = fopen('data://text/plain,foobarqwerty', 'r'); $outputStream = $instance->fopen('files/foo', 'w+'); - list($count, $result) = \OC_Helper::streamCopy($inputStream, $outputStream); + [$count, $result] = \OC_Helper::streamCopy($inputStream, $outputStream); $this->assertEquals(9, $count); $this->assertFalse($result); fclose($inputStream); diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php index ebd9cd79f23..7ad6d631b4e 100644 --- a/tests/lib/Group/MetaDataTest.php +++ b/tests/lib/Group/MetaDataTest.php @@ -85,7 +85,7 @@ class MetaDataTest extends \Test\TestCase { ->with('') ->willReturn($groups); - list($adminGroups, $ordinaryGroups) = $this->groupMetadata->get(); + [$adminGroups, $ordinaryGroups] = $this->groupMetadata->get(); $this->assertSame(1, count($adminGroups)); $this->assertSame(2, count($ordinaryGroups)); @@ -105,7 +105,7 @@ class MetaDataTest extends \Test\TestCase { ->with('') ->willReturn($groups); - list($adminGroups, $ordinaryGroups) = $this->groupMetadata->get(); + [$adminGroups, $ordinaryGroups] = $this->groupMetadata->get(); $this->assertSame(1, count($adminGroups)); $this->assertSame(2, count($ordinaryGroups)); diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php index 5c640e91284..1dfc3dace6c 100644 --- a/tests/lib/LegacyHelperTest.php +++ b/tests/lib/LegacyHelperTest.php @@ -174,7 +174,7 @@ class LegacyHelperTest extends \Test\TestCase { $target = fopen($target, 'w'); } - list($count, $result) = \OC_Helper::streamCopy($source, $target); + [$count, $result] = \OC_Helper::streamCopy($source, $target); if (is_resource($source)) { fclose($source); diff --git a/tests/lib/Security/IdentityProof/ManagerTest.php b/tests/lib/Security/IdentityProof/ManagerTest.php index 760c4911873..16ceec248ae 100644 --- a/tests/lib/Security/IdentityProof/ManagerTest.php +++ b/tests/lib/Security/IdentityProof/ManagerTest.php @@ -193,7 +193,7 @@ class ManagerTest extends TestCase { $manager = $this->getManager(); $data = 'MyTestData'; - list($resultPublicKey, $resultPrivateKey) = self::invokePrivate($manager, 'generateKeyPair'); + [$resultPublicKey, $resultPrivateKey] = self::invokePrivate($manager, 'generateKeyPair'); openssl_sign($data, $signature, $resultPrivateKey); $details = openssl_pkey_get_details(openssl_pkey_get_public($resultPublicKey)); diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index 6cadf9693c3..08c59633e42 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -408,7 +408,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { // get the user for which the fs is setup $view = Filesystem::getView(); if ($view) { - list(, $user) = explode('/', $view->getRoot()); + [, $user] = explode('/', $view->getRoot()); } else { $user = null; } |