diff --git a/apps/accessibility/lib/AccessibilityProvider.php b/apps/accessibility/lib/AccessibilityProvider.php index ce9489df5f..c922c7e285 100644 --- a/apps/accessibility/lib/AccessibilityProvider.php +++ b/apps/accessibility/lib/AccessibilityProvider.php @@ -57,7 +57,7 @@ class AccessibilityProvider { } public function getThemes() { - return array( + return [ [ 'id' => 'dark', 'img' => $this->urlGenerator->imagePath($this->appName, 'theme-dark.jpg'), @@ -65,7 +65,7 @@ class AccessibilityProvider { 'enableLabel' => $this->l->t('Enable dark theme'), 'text' => $this->l->t('A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find.') ] - ); + ]; } public function getHighContrast() { @@ -79,7 +79,7 @@ class AccessibilityProvider { } public function getFonts() { - return array( + return [ [ 'id' => 'fontdyslexic', 'img' => $this->urlGenerator->imagePath($this->appName, 'font-opendyslexic.jpg'), @@ -87,7 +87,7 @@ class AccessibilityProvider { 'enableLabel' => $this->l->t('Enable dyslexia font'), 'text' => $this->l->t('OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia.') ] - ); + ]; } } diff --git a/apps/accessibility/lib/Controller/ConfigController.php b/apps/accessibility/lib/Controller/ConfigController.php index a84281501c..d089feda30 100644 --- a/apps/accessibility/lib/Controller/ConfigController.php +++ b/apps/accessibility/lib/Controller/ConfigController.php @@ -113,7 +113,7 @@ class ConfigController extends OCSController { } $themes = $this->accessibilityProvider->getThemes(); - $highcontrast = array($this->accessibilityProvider->getHighContrast()); + $highcontrast = [$this->accessibilityProvider->getHighContrast()]; $fonts = $this->accessibilityProvider->getFonts(); $availableOptions = array_map(function($option) { diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index c31ff10e1d..db5f48adf2 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -290,7 +290,7 @@ class RequestHandlerController extends Controller { \OCP\Util::emitHook( '\OCA\Files_Sharing\API\Server2Server', 'preLoginNameUsedAsUserName', - array('uid' => &$uid) + ['uid' => &$uid] ); $this->logger->debug('shareWith after, ' . $uid, ['app' => $this->appName]); diff --git a/apps/comments/lib/AppInfo/Application.php b/apps/comments/lib/AppInfo/Application.php index bd883071ad..9a9df25edf 100644 --- a/apps/comments/lib/AppInfo/Application.php +++ b/apps/comments/lib/AppInfo/Application.php @@ -44,7 +44,7 @@ class Application extends App { const APP_ID = 'comments'; - public function __construct (array $urlParams = array()) { + public function __construct (array $urlParams = []) { parent::__construct(self::APP_ID, $urlParams); $container = $this->getContainer(); diff --git a/apps/dav/appinfo/v1/caldav.php b/apps/dav/appinfo/v1/caldav.php index 529fa576b4..82fddd152e 100644 --- a/apps/dav/appinfo/v1/caldav.php +++ b/apps/dav/appinfo/v1/caldav.php @@ -69,10 +69,10 @@ $principalCollection->disableListing = !$debugging; // Disable listing $addressBookRoot = new CalendarRoot($principalBackend, $calDavBackend); $addressBookRoot->disableListing = !$debugging; // Disable listing -$nodes = array( +$nodes = [ $principalCollection, $addressBookRoot, -); +]; // Fire up server $server = new \Sabre\DAV\Server($nodes); diff --git a/apps/dav/appinfo/v1/carddav.php b/apps/dav/appinfo/v1/carddav.php index b8886c0d15..b2e812c2c1 100644 --- a/apps/dav/appinfo/v1/carddav.php +++ b/apps/dav/appinfo/v1/carddav.php @@ -69,10 +69,10 @@ $pluginManager = new PluginManager(\OC::$server, \OC::$server->query(IAppManager $addressBookRoot = new AddressBookRoot($principalBackend, $cardDavBackend, $pluginManager); $addressBookRoot->disableListing = !$debugging; // Disable listing -$nodes = array( +$nodes = [ $principalCollection, $addressBookRoot, -); +]; // Fire up server $server = new \Sabre\DAV\Server($nodes); diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php index f0e3cc6438..53f1b0d62b 100644 --- a/apps/dav/appinfo/v1/publicwebdav.php +++ b/apps/dav/appinfo/v1/publicwebdav.php @@ -79,7 +79,7 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct // FIXME: should not add storage wrappers outside of preSetup, need to find a better way $previousLog = \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false); \OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) { - return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE)); + return new \OC\Files\Storage\Wrapper\PermissionsMask(['storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE]); }); \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog); diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 96459566a5..7280288c02 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -1944,7 +1944,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } } - $valuesToInsert = array(); + $valuesToInsert = []; $query = $this->db->getQueryBuilder(); diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 982c579d3b..3b66e84fc2 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -237,13 +237,13 @@ class IMipPlugin extends SabreIMipPlugin { break; } - $data = array( + $data = [ 'attendee_name' => (string)$meetingAttendeeName ?: $defaultVal, 'invitee_name' => (string)$meetingInviteeName ?: $defaultVal, 'meeting_title' => (string)$meetingTitle ?: $defaultVal, 'meeting_description' => (string)$meetingDescription ?: $defaultVal, 'meeting_url' => (string)$meetingUrl ?: $defaultVal, - ); + ]; $fromEMail = \OCP\Util::getDefaultEmailAddress('invitations-noreply'); $fromName = $l10n->t('%1$s via %2$s', [$senderName, $this->defaults->getName()]); diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 24b91f7cec..bd89b233ae 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -74,9 +74,9 @@ class CardDavBackend implements BackendInterface, SyncSupport { private $sharingBackend; /** @var array properties to index */ - public static $indexProperties = array( + public static $indexProperties = [ 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME', - 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD'); + 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD']; /** * @var string[] Map of uid => display name @@ -909,7 +909,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * - 'escape_like_param' - If set to false wildcards _ and % are not escaped, otherwise they are * @return array an array of contacts which are arrays of key-value-pairs */ - public function search($addressBookId, $pattern, $searchProperties, $options = array()) { + public function search($addressBookId, $pattern, $searchProperties, $options = []) { $query = $this->db->getQueryBuilder(); $query2 = $this->db->getQueryBuilder(); diff --git a/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php b/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php index 139044f953..947b2960ea 100644 --- a/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php +++ b/apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php @@ -74,7 +74,7 @@ class AppEnabledPlugin extends ServerPlugin { public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; - $this->server->on('beforeMethod', array($this, 'checkAppEnabled'), 30); + $this->server->on('beforeMethod', [$this, 'checkAppEnabled'], 30); } /** diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php index 1a069e548b..22f0104940 100644 --- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php @@ -67,7 +67,7 @@ class CommentPropertiesPlugin extends ServerPlugin { */ function initialize(\Sabre\DAV\Server $server) { $this->server = $server; - $this->server->on('propFind', array($this, 'handleGetProperties')); + $this->server->on('propFind', [$this, 'handleGetProperties']); } /** diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php index d17cfb8177..9b44997fb6 100644 --- a/apps/dav/lib/Connector/Sabre/Directory.php +++ b/apps/dav/lib/Connector/Sabre/Directory.php @@ -267,7 +267,7 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node throw new Locked(); } - $nodes = array(); + $nodes = []; foreach ($folderContent as $info) { $node = $this->getChild($info->getName(), $info); $nodes[] = $node; @@ -336,13 +336,13 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node } else { $free = $storageInfo['free']; } - $this->quotaInfo = array( + $this->quotaInfo = [ $storageInfo['used'], $free - ); + ]; return $this->quotaInfo; } catch (\OCP\Files\StorageNotAvailableException $e) { - return array(0, 0); + return [0, 0]; } } diff --git a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php index dc59519796..cf617152eb 100644 --- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php @@ -103,7 +103,7 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin { */ public function initialize(\Sabre\DAV\Server $server) { - $server->on('exception', array($this, 'logException'), 10); + $server->on('exception', [$this, 'logException'], 10); } /** diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 098961ce13..0bd01de408 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -359,20 +359,20 @@ class File extends Node implements IFile { $run = true; if (!$exists) { - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create, array( + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create, [ \OC\Files\Filesystem::signal_param_path => $hookPath, \OC\Files\Filesystem::signal_param_run => &$run, - )); + ]); } else { - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_update, array( + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_update, [ \OC\Files\Filesystem::signal_param_path => $hookPath, \OC\Files\Filesystem::signal_param_run => &$run, - )); + ]); } - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_write, array( + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_write, [ \OC\Files\Filesystem::signal_param_path => $hookPath, \OC\Files\Filesystem::signal_param_run => &$run, - )); + ]); return $run; } @@ -385,17 +385,17 @@ class File extends Node implements IFile { } $hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path)); if (!$exists) { - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_create, array( + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_create, [ \OC\Files\Filesystem::signal_param_path => $hookPath - )); + ]); } else { - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_update, array( + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_update, [ \OC\Files\Filesystem::signal_param_path => $hookPath - )); + ]); } - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_write, array( + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_write, [ \OC\Files\Filesystem::signal_param_path => $hookPath - )); + ]); } /** diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 498058f7c0..a35db1e77e 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -173,12 +173,12 @@ class FilesPlugin extends ServerPlugin { $server->protectedProperties = array_diff($server->protectedProperties, $allowedProperties); $this->server = $server; - $this->server->on('propFind', array($this, 'handleGetProperties')); - $this->server->on('propPatch', array($this, 'handleUpdateProperties')); - $this->server->on('afterBind', array($this, 'sendFileIdHeader')); - $this->server->on('afterWriteContent', array($this, 'sendFileIdHeader')); + $this->server->on('propFind', [$this, 'handleGetProperties']); + $this->server->on('propPatch', [$this, 'handleUpdateProperties']); + $this->server->on('afterBind', [$this, 'sendFileIdHeader']); + $this->server->on('afterWriteContent', [$this, 'sendFileIdHeader']); $this->server->on('afterMethod:GET', [$this,'httpGet']); - $this->server->on('afterMethod:GET', array($this, 'handleDownloadToken')); + $this->server->on('afterMethod:GET', [$this, 'handleDownloadToken']); $this->server->on('afterResponse', function($request, ResponseInterface $response) { $body = $response->getBody(); if (is_resource($body)) { diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 41de6ea4ed..a2de82fa9c 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -154,7 +154,7 @@ class FilesReportPlugin extends ServerPlugin { $server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc'; $this->server = $server; - $this->server->on('report', array($this, 'onReport')); + $this->server->on('report', [$this, 'onReport']); } /** diff --git a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php index d015bcbc21..4076abe59f 100644 --- a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php +++ b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php @@ -67,7 +67,7 @@ class MaintenancePlugin extends ServerPlugin { */ public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; - $this->server->on('beforeMethod', array($this, 'checkMaintenanceMode'), 1); + $this->server->on('beforeMethod', [$this, 'checkMaintenanceMode'], 1); } /** diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index f178b2fbfb..5f9ecf8814 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -200,15 +200,15 @@ abstract class Node implements \Sabre\DAV\INode { * @return int file id of updated file or -1 on failure */ public function setETag($etag) { - return $this->fileView->putFileInfo($this->path, array('etag' => $etag)); + return $this->fileView->putFileInfo($this->path, ['etag' => $etag]); } public function setCreationTime(int $time) { - return $this->fileView->putFileInfo($this->path, array('creation_time' => $time)); + return $this->fileView->putFileInfo($this->path, ['creation_time' => $time]); } public function setUploadTime(int $time) { - return $this->fileView->putFileInfo($this->path, array('upload_time' => $time)); + return $this->fileView->putFileInfo($this->path, ['upload_time' => $time]); } /** diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index a4baa65948..9d543e55a4 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -107,7 +107,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { $server->protectedProperties[] = self::SHAREES_PROPERTYNAME; $this->server = $server; - $this->server->on('propFind', array($this, 'handleGetProperties')); + $this->server->on('propFind', [$this, 'handleGetProperties']); } private function getShare(\OCP\Files\Node $node): array { diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php index fe19b43464..2ac7c01f42 100644 --- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php @@ -98,7 +98,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin $this->tree = $tree; $this->tagManager = $tagManager; $this->tagger = null; - $this->cachedTags = array(); + $this->cachedTags = []; } /** @@ -118,8 +118,8 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin $server->xml->elementMap[self::TAGS_PROPERTYNAME] = TagList::class; $this->server = $server; - $this->server->on('propFind', array($this, 'handleGetProperties')); - $this->server->on('propPatch', array($this, 'handleUpdateProperties')); + $this->server->on('propFind', [$this, 'handleGetProperties']); + $this->server->on('propPatch', [$this, 'handleUpdateProperties']); } /** @@ -151,7 +151,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin unset($tags[$favPos]); } } - return array($tags, $isFav); + return [$tags, $isFav]; } /** @@ -164,10 +164,10 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin if (isset($this->cachedTags[$fileId])) { return $this->cachedTags[$fileId]; } else { - $tags = $this->getTagger()->getTagsForObjects(array($fileId)); + $tags = $this->getTagger()->getTagsForObjects([$fileId]); if ($tags !== false) { if (empty($tags)) { - return array(); + return []; } return current($tags); } @@ -232,7 +232,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin $tags = $this->getTagger()->getTagsForObjects($fileIds); if ($tags === false) { // the tags API returns false on error... - $tags = array(); + $tags = []; } $this->cachedTags = $this->cachedTags + $tags; diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php index 9bc169601a..7b0d39f2fb 100644 --- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php +++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php @@ -48,7 +48,7 @@ class BrowserErrorPagePlugin extends ServerPlugin { */ function initialize(Server $server) { $this->server = $server; - $server->on('exception', array($this, 'logException'), 1000); + $server->on('exception', [$this, 'logException'], 1000); } /** diff --git a/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php b/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php index b940fa55b5..f580b7fe47 100644 --- a/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php +++ b/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php @@ -88,7 +88,7 @@ class RemoveOrphanEventsAndContacts implements IRepairStep { $result = $qb->execute(); - $orphanItems = array(); + $orphanItems = []; while ($row = $result->fetch()) { $orphanItems[] = (int) $row['id']; } diff --git a/apps/dav/lib/SystemTag/SystemTagPlugin.php b/apps/dav/lib/SystemTag/SystemTagPlugin.php index c86f621a67..d44b21b24c 100644 --- a/apps/dav/lib/SystemTag/SystemTagPlugin.php +++ b/apps/dav/lib/SystemTag/SystemTagPlugin.php @@ -107,8 +107,8 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin { $server->protectedProperties[] = self::ID_PROPERTYNAME; - $server->on('propFind', array($this, 'handleGetProperties')); - $server->on('propPatch', array($this, 'handleUpdateProperties')); + $server->on('propFind', [$this, 'handleGetProperties']); + $server->on('propPatch', [$this, 'handleUpdateProperties']); $server->on('method:POST', [$this, 'httpPost']); $this->server = $server; diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index 257c6665df..cc942b5662 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -130,7 +130,7 @@ class CalDavBackendTest extends AbstractCalDavBackend { $l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function ($text, $parameters = array()) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index 9a9f36c930..42cbeb1c0b 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -53,7 +53,7 @@ class CalendarTest extends TestCase { $this->l10n ->expects($this->any()) ->method('t') - ->willReturnCallback(function ($text, $parameters = array()) { + ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); }); } diff --git a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php index 5cd4e69b7f..518c0b9402 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php @@ -97,9 +97,9 @@ class CustomPropertiesBackendTest extends \Test\TestCase { ' WHERE `userid` = ?' ); $deleteStatement->execute( - array( + [ $this->user->getUID(), - ) + ] ); $deleteStatement->closeCursor(); } @@ -121,10 +121,10 @@ class CustomPropertiesBackendTest extends \Test\TestCase { private function applyDefaultProps($path = '/dummypath') { // properties to set - $propPatch = new \Sabre\DAV\PropPatch(array( + $propPatch = new \Sabre\DAV\PropPatch([ 'customprop' => 'value1', 'customprop2' => 'value2', - )); + ]); $this->plugin->propPatch( $path, @@ -146,11 +146,11 @@ class CustomPropertiesBackendTest extends \Test\TestCase { public function testPropFindMissingFileSoftFail() { $propFind = new \Sabre\DAV\PropFind( '/dummypath', - array( + [ 'customprop', 'customprop2', 'unsetprop', - ), + ], 0 ); @@ -176,11 +176,11 @@ class CustomPropertiesBackendTest extends \Test\TestCase { $propFind = new \Sabre\DAV\PropFind( '/dummypath', - array( + [ 'customprop', 'customprop2', 'unsetprop', - ), + ], 0 ); @@ -191,7 +191,7 @@ class CustomPropertiesBackendTest extends \Test\TestCase { $this->assertEquals('value1', $propFind->get('customprop')); $this->assertEquals('value2', $propFind->get('customprop2')); - $this->assertEquals(array('unsetprop'), $propFind->get404Properties()); + $this->assertEquals(['unsetprop'], $propFind->get404Properties()); } /** @@ -201,11 +201,11 @@ class CustomPropertiesBackendTest extends \Test\TestCase { $this->applyDefaultProps('/dummypath'); $this->applyDefaultProps('/dummypath/test.txt'); - $propNames = array( + $propNames = [ 'customprop', 'customprop2', 'unsetprop', - ); + ]; $propFindRoot = new \Sabre\DAV\PropFind( '/dummypath', @@ -234,11 +234,11 @@ class CustomPropertiesBackendTest extends \Test\TestCase { $this->assertEquals('value1', $propFindRoot->get('customprop')); $this->assertEquals('value2', $propFindRoot->get('customprop2')); - $this->assertEquals(array('unsetprop'), $propFindRoot->get404Properties()); + $this->assertEquals(['unsetprop'], $propFindRoot->get404Properties()); $this->assertEquals('value1', $propFindSub->get('customprop')); $this->assertEquals('value2', $propFindSub->get('customprop2')); - $this->assertEquals(array('unsetprop'), $propFindSub->get404Properties()); + $this->assertEquals(['unsetprop'], $propFindSub->get404Properties()); } /** @@ -247,9 +247,9 @@ class CustomPropertiesBackendTest extends \Test\TestCase { public function testDeleteProperty() { $this->applyDefaultProps(); - $propPatch = new \Sabre\DAV\PropPatch(array( + $propPatch = new \Sabre\DAV\PropPatch([ 'customprop' => null, - )); + ]); $this->plugin->propPatch( '/dummypath', diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index 1bf0b53396..9ace061fd0 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -201,7 +201,7 @@ class DirectoryTest extends \Test\TestCase { $this->view->expects($this->once()) ->method('getDirectoryContent') ->with('') - ->willReturn(array($info1, $info2)); + ->willReturn([$info1, $info2]); $this->view->expects($this->any()) ->method('getRelativePath') diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 96f5a2c385..a898ba5dee 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -202,9 +202,9 @@ class FileTest extends TestCase { ->method('getRelativePath') ->willReturnArgument(0); - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -631,10 +631,10 @@ class FileTest extends TestCase { } public static function cancellingHook($params) { - self::$hookCalls[] = array( + self::$hookCalls[] = [ 'signal' => Filesystem::signal_post_create, 'params' => $params - ); + ]; } /** @@ -683,9 +683,9 @@ class FileTest extends TestCase { $_SERVER['CONTENT_LENGTH'] = 123456; $_SERVER['REQUEST_METHOD'] = 'PUT'; - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -716,9 +716,9 @@ class FileTest extends TestCase { // simulate situation where the target file is locked $view->lockFile('/test.txt', ILockingProvider::LOCK_EXCLUSIVE); - $info = new \OC\Files\FileInfo('/' . $this->user . '/files/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/' . $this->user . '/files/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -790,9 +790,9 @@ class FileTest extends TestCase { ->method('getRelativePath') ->willReturnArgument(0); - $info = new \OC\Files\FileInfo('/*', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/*', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); // action @@ -829,9 +829,9 @@ class FileTest extends TestCase { ->method('getRelativePath') ->willReturnArgument(0); - $info = new \OC\Files\FileInfo('/*', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/*', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); $file->setName('/super*star.txt'); } @@ -856,9 +856,9 @@ class FileTest extends TestCase { $_SERVER['CONTENT_LENGTH'] = 12345; $_SERVER['REQUEST_METHOD'] = 'PUT'; - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -890,9 +890,9 @@ class FileTest extends TestCase { ->method('unlink') ->willReturn(true); - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -908,9 +908,9 @@ class FileTest extends TestCase { $view = $this->getMockBuilder(View::class) ->getMock(); - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => 0 - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -931,9 +931,9 @@ class FileTest extends TestCase { ->method('unlink') ->willReturn(false); - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -954,9 +954,9 @@ class FileTest extends TestCase { ->method('unlink') ->willThrowException(new ForbiddenException('', true)); - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -1122,9 +1122,9 @@ class FileTest extends TestCase { ->method('fopen') ->willReturn(false); - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); @@ -1142,9 +1142,9 @@ class FileTest extends TestCase { ->method('fopen') ->willThrowException(new ForbiddenException('', true)); - $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, array( + $info = new \OC\Files\FileInfo('/test.txt', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL - ), null); + ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index d1e863b18b..06495ccd5e 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -181,7 +181,7 @@ class FilesPluginTest extends TestCase { $propFind = new PropFind( '/dummyPath', - array( + [ self::GETETAG_PROPERTYNAME, self::FILEID_PROPERTYNAME, self::INTERNAL_FILEID_PROPERTYNAME, @@ -191,7 +191,7 @@ class FilesPluginTest extends TestCase { self::OWNER_ID_PROPERTYNAME, self::OWNER_DISPLAY_NAME_PROPERTYNAME, self::DATA_FINGERPRINT_PROPERTYNAME, - ), + ], 0 ); @@ -208,7 +208,7 @@ class FilesPluginTest extends TestCase { $node->expects($this->once()) ->method('getDirectDownload') - ->willReturn(array('url' => 'http://example.com/')); + ->willReturn(['url' => 'http://example.com/']); $node->expects($this->exactly(2)) ->method('getOwner') ->willReturn($user); @@ -236,9 +236,9 @@ class FilesPluginTest extends TestCase { $propFind = new PropFind( '/dummyPath', - array( + [ self::DOWNLOADURL_PROPERTYNAME, - ), + ], 0 ); @@ -293,14 +293,14 @@ class FilesPluginTest extends TestCase { $propFind = new PropFind( '/dummyPath', - array( + [ self::GETETAG_PROPERTYNAME, self::FILEID_PROPERTYNAME, self::SIZE_PROPERTYNAME, self::PERMISSIONS_PROPERTYNAME, self::DOWNLOADURL_PROPERTYNAME, self::DATA_FINGERPRINT_PROPERTYNAME, - ), + ], 0 ); @@ -405,10 +405,10 @@ class FilesPluginTest extends TestCase { ->willReturn(true); // properties to set - $propPatch = new PropPatch(array( + $propPatch = new PropPatch([ self::GETETAG_PROPERTYNAME => 'newetag', self::LASTMODIFIED_PROPERTYNAME => $testDate - )); + ]); $this->plugin->handleUpdateProperties( '/dummypath', @@ -425,14 +425,14 @@ class FilesPluginTest extends TestCase { } public function testUpdatePropsForbidden() { - $propPatch = new PropPatch(array( + $propPatch = new PropPatch([ self::OWNER_ID_PROPERTYNAME => 'user2', self::OWNER_DISPLAY_NAME_PROPERTYNAME => 'User Two', self::FILEID_PROPERTYNAME => 12345, self::PERMISSIONS_PROPERTYNAME => 'C', self::SIZE_PROPERTYNAME => 123, self::DOWNLOADURL_PROPERTYNAME => 'http://example.com/', - )); + ]); $this->plugin->handleUpdateProperties( '/dummypath', @@ -588,9 +588,9 @@ class FilesPluginTest extends TestCase { $propFind = new PropFind( '/dummyPath', - array( + [ self::HAS_PREVIEW_PROPERTYNAME - ), + ], 0 ); diff --git a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php index 5d71a70536..93542f8036 100644 --- a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php @@ -42,19 +42,19 @@ use OCP\Share\IShare; */ class NodeTest extends \Test\TestCase { public function davPermissionsProvider() { - return array( - array(\OCP\Constants::PERMISSION_ALL, 'file', false, false, 'RGDNVW'), - array(\OCP\Constants::PERMISSION_ALL, 'dir', false, false, 'RGDNVCK'), - array(\OCP\Constants::PERMISSION_ALL, 'file', true, false, 'SRGDNVW'), - array(\OCP\Constants::PERMISSION_ALL, 'file', true, true, 'SRMGDNVW'), - array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_SHARE, 'file', true, false, 'SGDNVW'), - array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_UPDATE, 'file', false, false, 'RGD'), - array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_DELETE, 'file', false, false, 'RGNVW'), - array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'file', false, false, 'RGDNVW'), - array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_READ, 'file', false, false, 'RDNVW'), - array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'dir', false, false, 'RGDNV'), - array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_READ, 'dir', false, false, 'RDNVCK'), - ); + return [ + [\OCP\Constants::PERMISSION_ALL, 'file', false, false, 'RGDNVW'], + [\OCP\Constants::PERMISSION_ALL, 'dir', false, false, 'RGDNVCK'], + [\OCP\Constants::PERMISSION_ALL, 'file', true, false, 'SRGDNVW'], + [\OCP\Constants::PERMISSION_ALL, 'file', true, true, 'SRMGDNVW'], + [\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_SHARE, 'file', true, false, 'SGDNVW'], + [\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_UPDATE, 'file', false, false, 'RGD'], + [\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_DELETE, 'file', false, false, 'RGNVW'], + [\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'file', false, false, 'RGDNVW'], + [\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_READ, 'file', false, false, 'RDNVW'], + [\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'dir', false, false, 'RGDNV'], + [\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_READ, 'dir', false, false, 'RDNVCK'], + ]; } /** @@ -63,7 +63,7 @@ class NodeTest extends \Test\TestCase { public function testDavPermissions($permissions, $type, $shared, $mounted, $expected) { $info = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor() - ->setMethods(array('getPermissions', 'isShared', 'isMounted', 'getType')) + ->setMethods(['getPermissions', 'isShared', 'isMounted', 'getType']) ->getMock(); $info->expects($this->any()) ->method('getPermissions') diff --git a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php index 76ebbe3018..3a2c8d8c43 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php @@ -201,72 +201,72 @@ class ObjectTreeTest extends \Test\TestCase { } function nodeForPathProvider() { - return array( + return [ // regular file - array( + [ 'regularfile.txt', 'regularfile.txt', 'regularfile.txt', 'file', false - ), + ], // regular directory - array( + [ 'regulardir', 'regulardir', 'regulardir', 'dir', false - ), + ], // regular file with chunking - array( + [ 'regularfile.txt', 'regularfile.txt', 'regularfile.txt', 'file', true - ), + ], // regular directory with chunking - array( + [ 'regulardir', 'regulardir', 'regulardir', 'dir', true - ), + ], // file with chunky file name - array( + [ 'regularfile.txt-chunking-123566789-10-1', 'regularfile.txt', 'regularfile.txt', 'file', true - ), + ], // regular file in subdir - array( + [ 'subdir/regularfile.txt', 'subdir/regularfile.txt', 'regularfile.txt', 'file', false - ), + ], // regular directory in subdir - array( + [ 'subdir/regulardir', 'subdir/regulardir', 'regulardir', 'dir', false - ), + ], // file with chunky file name in subdir - array( + [ 'subdir/regularfile.txt-chunking-123566789-10-1', 'subdir/regularfile.txt', 'regularfile.txt', 'file', true - ), - ); + ], + ]; } diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php index 57613c19f6..55528a0f87 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php @@ -410,7 +410,7 @@ class PrincipalTest extends TestCase { } public function testUpdatePrincipal() { - $this->assertSame(0, $this->connector->updatePrincipal('foo', new PropPatch(array()))); + $this->assertSame(0, $this->connector->updatePrincipal('foo', new PropPatch([]))); } public function testSearchPrincipalsWithEmptySearchProperties() { diff --git a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php index 50b3ff1c39..d7554741fc 100644 --- a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php @@ -112,30 +112,30 @@ class QuotaPluginTest extends TestCase { } public function quotaOkayProvider() { - return array( - array(1024, array()), - array(1024, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(1024, array('CONTENT-LENGTH' => '512')), - array(1024, array('OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512')), + return [ + [1024, []], + [1024, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [1024, ['CONTENT-LENGTH' => '512']], + [1024, ['OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512']], - array(FileInfo::SPACE_UNKNOWN, array()), - array(FileInfo::SPACE_UNKNOWN, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(FileInfo::SPACE_UNKNOWN, array('CONTENT-LENGTH' => '512')), - array(FileInfo::SPACE_UNKNOWN, array('OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512')), + [FileInfo::SPACE_UNKNOWN, []], + [FileInfo::SPACE_UNKNOWN, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [FileInfo::SPACE_UNKNOWN, ['CONTENT-LENGTH' => '512']], + [FileInfo::SPACE_UNKNOWN, ['OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512']], - array(FileInfo::SPACE_UNLIMITED, array()), - array(FileInfo::SPACE_UNLIMITED, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(FileInfo::SPACE_UNLIMITED, array('CONTENT-LENGTH' => '512')), - array(FileInfo::SPACE_UNLIMITED, array('OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512')), - ); + [FileInfo::SPACE_UNLIMITED, []], + [FileInfo::SPACE_UNLIMITED, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [FileInfo::SPACE_UNLIMITED, ['CONTENT-LENGTH' => '512']], + [FileInfo::SPACE_UNLIMITED, ['OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512']], + ]; } public function quotaExceededProvider() { - return array( - array(1023, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(511, array('CONTENT-LENGTH' => '512')), - array(2047, array('OC-TOTAL-LENGTH' => '2048', 'CONTENT-LENGTH' => '1024')), - ); + return [ + [1023, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [511, ['CONTENT-LENGTH' => '512']], + [2047, ['OC-TOTAL-LENGTH' => '2048', 'CONTENT-LENGTH' => '1024']], + ]; } public function lengthProvider() { @@ -155,22 +155,22 @@ class QuotaPluginTest extends TestCase { } public function quotaChunkedOkProvider() { - return array( - array(1024, 0, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(1024, 0, array('CONTENT-LENGTH' => '512')), - array(1024, 0, array('OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512')), + return [ + [1024, 0, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [1024, 0, ['CONTENT-LENGTH' => '512']], + [1024, 0, ['OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512']], // with existing chunks (allowed size = total length - chunk total size) - array(400, 128, array('X-EXPECTED-ENTITY-LENGTH' => '512')), - array(400, 128, array('CONTENT-LENGTH' => '512')), - array(400, 128, array('OC-TOTAL-LENGTH' => '512', 'CONTENT-LENGTH' => '500')), + [400, 128, ['X-EXPECTED-ENTITY-LENGTH' => '512']], + [400, 128, ['CONTENT-LENGTH' => '512']], + [400, 128, ['OC-TOTAL-LENGTH' => '512', 'CONTENT-LENGTH' => '500']], // \OCP\Files\FileInfo::SPACE-UNKNOWN = -2 - array(-2, 0, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(-2, 0, array('CONTENT-LENGTH' => '512')), - array(-2, 0, array('OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512')), - array(-2, 128, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(-2, 128, array('CONTENT-LENGTH' => '512')), - array(-2, 128, array('OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512')), - ); + [-2, 0, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [-2, 0, ['CONTENT-LENGTH' => '512']], + [-2, 0, ['OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512']], + [-2, 128, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [-2, 128, ['CONTENT-LENGTH' => '512']], + [-2, 128, ['OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512']], + ]; } /** @@ -197,15 +197,15 @@ class QuotaPluginTest extends TestCase { } public function quotaChunkedFailProvider() { - return array( - array(400, 0, array('X-EXPECTED-ENTITY-LENGTH' => '1024')), - array(400, 0, array('CONTENT-LENGTH' => '512')), - array(400, 0, array('OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512')), + return [ + [400, 0, ['X-EXPECTED-ENTITY-LENGTH' => '1024']], + [400, 0, ['CONTENT-LENGTH' => '512']], + [400, 0, ['OC-TOTAL-LENGTH' => '1024', 'CONTENT-LENGTH' => '512']], // with existing chunks (allowed size = total length - chunk total size) - array(380, 128, array('X-EXPECTED-ENTITY-LENGTH' => '512')), - array(380, 128, array('CONTENT-LENGTH' => '512')), - array(380, 128, array('OC-TOTAL-LENGTH' => '512', 'CONTENT-LENGTH' => '500')), - ); + [380, 128, ['X-EXPECTED-ENTITY-LENGTH' => '512']], + [380, 128, ['CONTENT-LENGTH' => '512']], + [380, 128, ['OC-TOTAL-LENGTH' => '512', 'CONTENT-LENGTH' => '500']], + ]; } /** diff --git a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php index c1eaaae42c..c0450d3bbb 100644 --- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php @@ -108,8 +108,8 @@ class TagsPluginTest extends \Test\TestCase { $this->tagger->expects($this->exactly($expectedCallCount)) ->method('getTagsForObjects') - ->with($this->equalTo(array(123))) - ->willReturn(array(123 => $tags)); + ->with($this->equalTo([123])) + ->willReturn([123 => $tags]); $propFind = new \Sabre\DAV\PropFind( '/dummyPath', @@ -162,16 +162,16 @@ class TagsPluginTest extends \Test\TestCase { ->willReturn(123); $node->expects($this->exactly($expectedCallCount)) ->method('getChildren') - ->willReturn(array($node1, $node2)); + ->willReturn([$node1, $node2]); $this->tagger->expects($this->exactly($expectedCallCount)) ->method('getTagsForObjects') - ->with($this->equalTo(array(123, 111, 222))) + ->with($this->equalTo([123, 111, 222])) ->willReturn( - array( + [ 111 => $tags, 123 => $tags - ) + ] ); // simulate sabre recursive PROPFIND traversal @@ -212,58 +212,58 @@ class TagsPluginTest extends \Test\TestCase { } function tagsGetPropertiesDataProvider() { - return array( + return [ // request both, receive both - array( - array('tag1', 'tag2', self::TAG_FAVORITE), - array(self::TAGS_PROPERTYNAME, self::FAVORITE_PROPERTYNAME), - array( - 200 => array( - self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(array('tag1', 'tag2')), + [ + ['tag1', 'tag2', self::TAG_FAVORITE], + [self::TAGS_PROPERTYNAME, self::FAVORITE_PROPERTYNAME], + [ + 200 => [ + self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(['tag1', 'tag2']), self::FAVORITE_PROPERTYNAME => true, - ) - ) - ), + ] + ] + ], // request tags alone - array( - array('tag1', 'tag2', self::TAG_FAVORITE), - array(self::TAGS_PROPERTYNAME), - array( - 200 => array( - self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(array('tag1', 'tag2')), - ) - ) - ), + [ + ['tag1', 'tag2', self::TAG_FAVORITE], + [self::TAGS_PROPERTYNAME], + [ + 200 => [ + self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(['tag1', 'tag2']), + ] + ] + ], // request fav alone - array( - array('tag1', 'tag2', self::TAG_FAVORITE), - array(self::FAVORITE_PROPERTYNAME), - array( - 200 => array( + [ + ['tag1', 'tag2', self::TAG_FAVORITE], + [self::FAVORITE_PROPERTYNAME], + [ + 200 => [ self::FAVORITE_PROPERTYNAME => true, - ) - ) - ), + ] + ] + ], // request none - array( - array('tag1', 'tag2', self::TAG_FAVORITE), - array(), - array( - 200 => array() - ), - ), + [ + ['tag1', 'tag2', self::TAG_FAVORITE], + [], + [ + 200 => [] + ], + ], // request both with none set, receive both - array( - array(), - array(self::TAGS_PROPERTYNAME, self::FAVORITE_PROPERTYNAME), - array( - 200 => array( - self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(array()), + [ + [], + [self::TAGS_PROPERTYNAME, self::FAVORITE_PROPERTYNAME], + [ + 200 => [ + self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList([]), self::FAVORITE_PROPERTYNAME => false, - ) - ) - ), - ); + ] + ] + ], + ]; } public function testUpdateTags() { @@ -283,8 +283,8 @@ class TagsPluginTest extends \Test\TestCase { $this->tagger->expects($this->at(0)) ->method('getTagsForObjects') - ->with($this->equalTo(array(123))) - ->willReturn(array(123 => array('tagkeep', 'tagremove', self::TAG_FAVORITE))); + ->with($this->equalTo([123])) + ->willReturn([123 => ['tagkeep', 'tagremove', self::TAG_FAVORITE]]); // then tag as tag1 and tag2 $this->tagger->expects($this->at(1)) @@ -300,9 +300,9 @@ class TagsPluginTest extends \Test\TestCase { ->with(123, 'tagremove'); // properties to set - $propPatch = new \Sabre\DAV\PropPatch(array( - self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(array('tag1', 'tag2', 'tagkeep')) - )); + $propPatch = new \Sabre\DAV\PropPatch([ + self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(['tag1', 'tag2', 'tagkeep']) + ]); $this->plugin->handleUpdateProperties( '/dummypath', @@ -334,8 +334,8 @@ class TagsPluginTest extends \Test\TestCase { $this->tagger->expects($this->at(0)) ->method('getTagsForObjects') - ->with($this->equalTo(array(123))) - ->willReturn(array()); + ->with($this->equalTo([123])) + ->willReturn([]); // then tag as tag1 and tag2 $this->tagger->expects($this->at(1)) @@ -346,9 +346,9 @@ class TagsPluginTest extends \Test\TestCase { ->with(123, 'tag2'); // properties to set - $propPatch = new \Sabre\DAV\PropPatch(array( - self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(array('tag1', 'tag2', 'tagkeep')) - )); + $propPatch = new \Sabre\DAV\PropPatch([ + self::TAGS_PROPERTYNAME => new \OCA\DAV\Connector\Sabre\TagList(['tag1', 'tag2', 'tagkeep']) + ]); $this->plugin->handleUpdateProperties( '/dummypath', @@ -386,9 +386,9 @@ class TagsPluginTest extends \Test\TestCase { ->with(123, self::TAG_FAVORITE); // properties to set - $propPatch = new \Sabre\DAV\PropPatch(array( + $propPatch = new \Sabre\DAV\PropPatch([ self::FAVORITE_PROPERTYNAME => true - )); + ]); $this->plugin->handleUpdateProperties( '/dummypath', @@ -411,9 +411,9 @@ class TagsPluginTest extends \Test\TestCase { ->with(123, self::TAG_FAVORITE); // properties to set - $propPatch = new \Sabre\DAV\PropPatch(array( + $propPatch = new \Sabre\DAV\PropPatch([ self::FAVORITE_PROPERTYNAME => false - )); + ]); $this->plugin->handleUpdateProperties( '/dummypath', diff --git a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php index 08239dfd46..6a78c2a086 100644 --- a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php +++ b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php @@ -184,7 +184,7 @@ class GroupPrincipalTest extends \Test\TestCase { } public function testUpdatePrincipal() { - $this->assertSame(0, $this->connector->updatePrincipal('foo', new PropPatch(array()))); + $this->assertSame(0, $this->connector->updatePrincipal('foo', new PropPatch([]))); } public function testSearchPrincipalsWithEmptySearchProperties() { diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php index f634c71709..ecd65e7587 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php @@ -308,12 +308,12 @@ class SystemTagPluginTest extends \Test\TestCase { ->with($systemTag, ['group1', 'group2']); // properties to set - $propPatch = new \Sabre\DAV\PropPatch(array( + $propPatch = new \Sabre\DAV\PropPatch([ self::DISPLAYNAME_PROPERTYNAME => 'Test changed', self::USERVISIBLE_PROPERTYNAME => 'false', self::USERASSIGNABLE_PROPERTYNAME => 'true', self::GROUPS_PROPERTYNAME => 'group1|group2', - )); + ]); $this->plugin->handleUpdateProperties( '/systemtag/1', @@ -364,9 +364,9 @@ class SystemTagPluginTest extends \Test\TestCase { ->method('setTagGroups'); // properties to set - $propPatch = new \Sabre\DAV\PropPatch(array( + $propPatch = new \Sabre\DAV\PropPatch([ self::GROUPS_PROPERTYNAME => 'group1|group2', - )); + ]); $this->plugin->handleUpdateProperties( '/systemtag/1', diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php index 6d7c00687e..745dfe59aa 100644 --- a/apps/encryption/lib/AppInfo/Application.php +++ b/apps/encryption/lib/AppInfo/Application.php @@ -58,7 +58,7 @@ class Application extends \OCP\AppFramework\App { /** * @param array $urlParams */ - public function __construct($urlParams = array()) { + public function __construct($urlParams = []) { parent::__construct('encryption', $urlParams); $this->encryptionManager = \OC::$server->getEncryptionManager(); $this->config = \OC::$server->getConfig(); diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php index 4865f06277..1820140337 100644 --- a/apps/encryption/lib/Crypto/EncryptAll.php +++ b/apps/encryption/lib/Crypto/EncryptAll.php @@ -120,7 +120,7 @@ class EncryptAll { $this->questionHelper = $questionHelper; $this->secureRandom = $secureRandom; // store one time passwords for the users - $this->userPasswords = array(); + $this->userPasswords = []; } /** @@ -265,7 +265,7 @@ class EncryptAll { protected function encryptUsersFiles($uid, ProgressBar $progress, $userCount) { $this->setupUserFS($uid); - $directories = array(); + $directories = []; $directories[] = '/' . $uid . '/files'; while($root = array_pop($directories)) { @@ -322,11 +322,11 @@ class EncryptAll { */ protected function outputPasswords() { $table = new Table($this->output); - $table->setHeaders(array('Username', 'Private key password')); + $table->setHeaders(['Username', 'Private key password']); //create rows - $newPasswords = array(); - $unchangedPasswords = array(); + $newPasswords = []; + $unchangedPasswords = []; foreach ($this->userPasswords as $uid => $password) { if (empty($password)) { $unchangedPasswords[] = $uid; @@ -451,7 +451,7 @@ class EncryptAll { $this->output->writeln("\n\nPassword successfully send to all users"); } else { $table = new Table($this->output); - $table->setHeaders(array('Username', 'Private key password')); + $table->setHeaders(['Username', 'Private key password']); $this->output->writeln("\n\nCould not send password to following users:\n"); $rows = []; foreach ($noMail as $uid) { diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 8b5ec5e1e0..edeb04ce85 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -236,7 +236,7 @@ class Encryption implements IEncryptionModule { $this->cipher = $this->crypt->getLegacyCipher(); } - return array('cipher' => $this->cipher, 'signed' => 'true'); + return ['cipher' => $this->cipher, 'signed' => 'true']; } /** @@ -266,7 +266,7 @@ class Encryption implements IEncryptionModule { $result = $this->crypt->symmetricEncryptFileContent($this->writeCache, $this->fileKey, $this->version + 1, $position); $this->writeCache = ''; } - $publicKeys = array(); + $publicKeys = []; if ($this->useMasterPassword === true) { $publicKeys[$this->keyManager->getMasterKeyId()] = $this->keyManager->getPublicMasterKey(); } else { @@ -402,7 +402,7 @@ class Encryption implements IEncryptionModule { if (!empty($fileKey)) { - $publicKeys = array(); + $publicKeys = []; if ($this->useMasterPassword === true) { $publicKeys[$this->keyManager->getMasterKeyId()] = $this->keyManager->getPublicMasterKey(); } else { @@ -425,7 +425,7 @@ class Encryption implements IEncryptionModule { } else { $this->logger->debug('no file key found, we assume that the file "{file}" is not encrypted', - array('file' => $path, 'app' => 'encryption')); + ['file' => $path, 'app' => 'encryption']); return false; } diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php index d586d33023..335e6c13d7 100644 --- a/apps/encryption/lib/Recovery.php +++ b/apps/encryption/lib/Recovery.php @@ -213,7 +213,7 @@ class Recovery { $fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID()); if (!empty($fileKey)) { $accessList = $this->file->getAccessList($filePath); - $publicKeys = array(); + $publicKeys = []; foreach ($accessList['users'] as $uid) { $publicKeys[$uid] = $this->keyManager->getPublicKey($uid); } @@ -299,7 +299,7 @@ class Recovery { if (!empty($fileKey)) { $accessList = $this->file->getAccessList($path); - $publicKeys = array(); + $publicKeys = []; foreach ($accessList['users'] as $user) { $publicKeys[$user] = $this->keyManager->getPublicKey($user); } diff --git a/apps/encryption/templates/altmail.php b/apps/encryption/templates/altmail.php index a5b1512aad..dde85e0af1 100644 --- a/apps/encryption/templates/altmail.php +++ b/apps/encryption/templates/altmail.php @@ -2,9 +2,9 @@ /** @var OC_Theme $theme */ /** @var array $_ */ -print_unescaped($l->t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", array($_['password']))); +print_unescaped($l->t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", [$_['password']])); if ( isset($_['expiration']) ) { - print_unescaped($l->t("The share will expire on %s.", array($_['expiration']))); + print_unescaped($l->t("The share will expire on %s.", [$_['expiration']])); print_unescaped("\n\n"); } // TRANSLATORS term at the end of a mail diff --git a/apps/encryption/templates/mail.php b/apps/encryption/templates/mail.php index 6e9f9885d3..1241cfd9f6 100644 --- a/apps/encryption/templates/mail.php +++ b/apps/encryption/templates/mail.php @@ -15,7 +15,7 @@
t('The document could not be found on the server. Maybe the share was deleted or has expired?')); ?>
- t('Back to %s', array($theme->getName()))); ?> + t('Back to %s', [$theme->getName()])); ?>
diff --git a/core/templates/installation.php b/core/templates/installation.php index 5a351e9741..25052782e6 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -81,7 +81,7 @@ script('core', [ $label): ?>
- t( 'Only %s is available.', array($label) )); ?>
+ t( 'Only %s is available.', [$label] )); ?>
t( 'Install and activate additional PHP modules to choose other database types.' )); ?>
t( 'For more details check out the documentation.' )); ?> ↗
diff --git a/core/templates/update.admin.php b/core/templates/update.admin.php
index f4a1c72ae8..4a010c025b 100644
--- a/core/templates/update.admin.php
+++ b/core/templates/update.admin.php
@@ -4,7 +4,7 @@
t('This %s instance is currently in maintenance mode, which may take a while.', array($theme->getName()))) ?> t('This page will refresh itself when the instance is available again.')) ?>
+t('This %s instance is currently in maintenance mode, which may take a while.', [$theme->getName()])) ?> t('This page will refresh itself when the instance is available again.')) ?>
t('Contact your system administrator if this message persists or appeared unexpectedly.')) ?>
mbstring.func_overload
to 0
in your php.ini')
- );
+ ];
}
if(function_exists('xml_parser_create') &&
@@ -935,24 +935,24 @@ class OC_Util {
$minor = floor($version/100);
$version -= ($minor * 100);
$patch = $version;
- $errors[] = array(
+ $errors[] = [
'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [$major . '.' . $minor . '.' . $patch]),
'hint' => $l->t('To fix this issue update your libxml2 version and restart your web server.')
- );
+ ];
}
if (!self::isAnnotationsWorking()) {
- $errors[] = array(
+ $errors[] = [
'error' => $l->t('PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible.'),
'hint' => $l->t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.')
- );
+ ];
}
if (!\OC::$CLI && $webServerRestart) {
- $errors[] = array(
+ $errors[] = [
'error' => $l->t('PHP modules have been installed, but they are still listed as missing?'),
'hint' => $l->t('Please ask your server administrator to restart the web server.')
- );
+ ];
}
$errors = array_merge($errors, self::checkDatabaseVersion());
@@ -970,7 +970,7 @@ class OC_Util {
*/
public static function checkDatabaseVersion() {
$l = \OC::$server->getL10N('lib');
- $errors = array();
+ $errors = [];
$dbType = \OC::$server->getSystemConfig()->getValue('dbtype', 'sqlite');
if ($dbType === 'pgsql') {
// check PostgreSQL version
@@ -980,10 +980,10 @@ class OC_Util {
if (isset($data['server_version'])) {
$version = $data['server_version'];
if (version_compare($version, '9.0.0', '<')) {
- $errors[] = array(
+ $errors[] = [
'error' => $l->t('PostgreSQL >= 9 required'),
'hint' => $l->t('Please upgrade your database version')
- );
+ ];
}
}
} catch (\Doctrine\DBAL\DBALException $e) {
diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php
index 6642c332d5..f9d53bf112 100644
--- a/lib/public/AppFramework/Controller.php
+++ b/lib/public/AppFramework/Controller.php
@@ -77,7 +77,7 @@ abstract class Controller {
$this->request = $request;
// default responders
- $this->responders = array(
+ $this->responders = [
'json' => function ($data) {
if ($data instanceof DataResponse) {
$response = new JSONResponse(
@@ -95,7 +95,7 @@ abstract class Controller {
}
return new JSONResponse($data);
}
- );
+ ];
}
diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php
index 287c991b58..7340df55fc 100644
--- a/lib/public/AppFramework/Db/Entity.php
+++ b/lib/public/AppFramework/Db/Entity.php
@@ -38,8 +38,8 @@ abstract class Entity {
public $id;
- private $_updatedFields = array();
- private $_fieldTypes = array('id' => 'integer');
+ private $_updatedFields = [];
+ private $_fieldTypes = ['id' => 'integer'];
/**
@@ -95,7 +95,7 @@ abstract class Entity {
* @since 7.0.0
*/
public function resetUpdatedFields(){
- $this->_updatedFields = array();
+ $this->_updatedFields = [];
}
/**
diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php
index d6068f9c51..29c042def7 100644
--- a/lib/public/AppFramework/Http/DataResponse.php
+++ b/lib/public/AppFramework/Http/DataResponse.php
@@ -51,8 +51,8 @@ class DataResponse extends Response {
* @param array $headers additional key value based headers
* @since 8.0.0
*/
- public function __construct($data=array(), $statusCode=Http::STATUS_OK,
- array $headers=array()) {
+ public function __construct($data=[], $statusCode=Http::STATUS_OK,
+ array $headers=[]) {
parent::__construct();
$this->data = $data;
diff --git a/lib/public/AppFramework/Http/JSONResponse.php b/lib/public/AppFramework/Http/JSONResponse.php
index abe0190488..e84042dbe1 100644
--- a/lib/public/AppFramework/Http/JSONResponse.php
+++ b/lib/public/AppFramework/Http/JSONResponse.php
@@ -53,7 +53,7 @@ class JSONResponse extends Response {
* @param int $statusCode the Http status code, defaults to 200
* @since 6.0.0
*/
- public function __construct($data=array(), $statusCode=Http::STATUS_OK) {
+ public function __construct($data=[], $statusCode=Http::STATUS_OK) {
parent::__construct();
$this->data = $data;
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index 15318f30bb..2fc985aabf 100644
--- a/lib/public/AppFramework/Http/Response.php
+++ b/lib/public/AppFramework/Http/Response.php
@@ -49,16 +49,16 @@ class Response {
* Headers - defaults to ['Cache-Control' => 'no-cache, no-store, must-revalidate']
* @var array
*/
- private $headers = array(
+ private $headers = [
'Cache-Control' => 'no-cache, no-store, must-revalidate'
- );
+ ];
/**
* Cookies that will be need to be constructed as header
* @var array
*/
- private $cookies = array();
+ private $cookies = [];
/**
@@ -138,7 +138,7 @@ class Response {
* @since 8.0.0
*/
public function addCookie($name, $value, \DateTime $expireDate = null) {
- $this->cookies[$name] = array('value' => $value, 'expireDate' => $expireDate);
+ $this->cookies[$name] = ['value' => $value, 'expireDate' => $expireDate];
return $this;
}
diff --git a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php
index d6d1fc1d72..801c0a2347 100644
--- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php
+++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php
@@ -48,7 +48,7 @@ class PublicTemplateResponse extends TemplateResponse {
* @param array $params
* @since 14.0.0
*/
- public function __construct(string $appName, string $templateName, array $params = array()) {
+ public function __construct(string $appName, string $templateName, array $params = []) {
parent::__construct($appName, $templateName, $params, 'public');
\OC_Util::addScript('core', 'public/publicpage');
}
diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php
index 8ceeed5b8a..fb02c9d265 100644
--- a/lib/public/AppFramework/Http/TemplateResponse.php
+++ b/lib/public/AppFramework/Http/TemplateResponse.php
@@ -75,7 +75,7 @@ class TemplateResponse extends Response {
* @param string $renderAs how the page should be rendered, defaults to user
* @since 6.0.0 - parameters $params and $renderAs were added in 7.0.0
*/
- public function __construct($appName, $templateName, array $params=array(),
+ public function __construct($appName, $templateName, array $params=[],
$renderAs='user') {
parent::__construct();
diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php
index 9dd19c4cbf..7fcd59f571 100644
--- a/lib/public/Contacts/IManager.php
+++ b/lib/public/Contacts/IManager.php
@@ -98,7 +98,7 @@ interface IManager {
* @return array an array of contacts which are arrays of key-value-pairs
* @since 6.0.0
*/
- public function search($pattern, $searchProperties = array(), $options = array());
+ public function search($pattern, $searchProperties = [], $options = []);
/**
* This function can be used to delete the contact identified by the given id
diff --git a/lib/public/DB/QueryBuilder/ICompositeExpression.php b/lib/public/DB/QueryBuilder/ICompositeExpression.php
index 2b3cb9388c..4752616d41 100644
--- a/lib/public/DB/QueryBuilder/ICompositeExpression.php
+++ b/lib/public/DB/QueryBuilder/ICompositeExpression.php
@@ -36,7 +36,7 @@ interface ICompositeExpression {
* @return ICompositeExpression
* @since 8.2.0
*/
- public function addMultiple(array $parts = array());
+ public function addMultiple(array $parts = []);
/**
* Adds an expression to composite expression.
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index 6cef23bfb9..3cee49e3aa 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -206,7 +206,7 @@ interface IQueryBuilder {
* @return $this This QueryBuilder instance.
* @since 8.2.0
*/
- public function setParameters(array $params, array $types = array());
+ public function setParameters(array $params, array $types = []);
/**
* Gets all defined query parameters for the query being constructed indexed by parameter index or name.
diff --git a/lib/public/Files/LockNotAcquiredException.php b/lib/public/Files/LockNotAcquiredException.php
index d1e20fd530..23a6b554ce 100644
--- a/lib/public/Files/LockNotAcquiredException.php
+++ b/lib/public/Files/LockNotAcquiredException.php
@@ -48,7 +48,7 @@ class LockNotAcquiredException extends \Exception {
* @since 7.0.0
*/
public function __construct($path, $lockType, $code = 0, \Exception $previous = null) {
- $message = \OC::$server->getL10N('core')->t('Could not obtain lock type %d on "%s".', array($lockType, $path));
+ $message = \OC::$server->getL10N('core')->t('Could not obtain lock type %d on "%s".', [$lockType, $path]);
parent::__construct($message, $code, $previous);
}
diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php
index 5be4935906..30010bb4ce 100644
--- a/lib/public/IDBConnection.php
+++ b/lib/public/IDBConnection.php
@@ -81,7 +81,7 @@ interface IDBConnection {
* @return \Doctrine\DBAL\Driver\Statement The executed statement.
* @since 8.0.0
*/
- public function executeQuery($query, array $params = array(), $types = array());
+ public function executeQuery($query, array $params = [], $types = []);
/**
* Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
@@ -95,7 +95,7 @@ interface IDBConnection {
* @return integer The number of affected rows.
* @since 8.0.0
*/
- public function executeUpdate($query, array $params = array(), array $types = array());
+ public function executeUpdate($query, array $params = [], array $types = []);
/**
* Used to get the id of the just inserted element
diff --git a/lib/public/ISearch.php b/lib/public/ISearch.php
index 7d1940983e..d92beab0b4 100644
--- a/lib/public/ISearch.php
+++ b/lib/public/ISearch.php
@@ -42,7 +42,7 @@ interface ISearch {
* @return array An array of OCP\Search\Result's
* @since 8.0.0
*/
- public function searchPaged($query, array $inApps = array(), $page = 1, $size = 30);
+ public function searchPaged($query, array $inApps = [], $page = 1, $size = 30);
/**
* Register a new search provider to search with
@@ -50,7 +50,7 @@ interface ISearch {
* @param array $options optional
* @since 7.0.0
*/
- public function registerProvider($class, array $options = array());
+ public function registerProvider($class, array $options = []);
/**
* Remove one existing search provider
diff --git a/lib/public/ITagManager.php b/lib/public/ITagManager.php
index 98c3f831a7..f45ac25965 100644
--- a/lib/public/ITagManager.php
+++ b/lib/public/ITagManager.php
@@ -60,5 +60,5 @@ interface ITagManager {
* @return \OCP\ITags
* @since 6.0.0 - parameter $includeShared and $userId were added in 8.0.0
*/
- public function load($type, $defaultTags = array(), $includeShared = false, $userId = null);
+ public function load($type, $defaultTags = [], $includeShared = false, $userId = null);
}
diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php
index ac680654b5..52fde15d03 100644
--- a/lib/public/IURLGenerator.php
+++ b/lib/public/IURLGenerator.php
@@ -42,7 +42,7 @@ interface IURLGenerator {
* @return string the url
* @since 6.0.0
*/
- public function linkToRoute(string $routeName, array $arguments = array()): string;
+ public function linkToRoute(string $routeName, array $arguments = []): string;
/**
* Returns the absolute URL for a route
@@ -51,7 +51,7 @@ interface IURLGenerator {
* @return string the absolute url
* @since 8.0.0
*/
- public function linkToRouteAbsolute(string $routeName, array $arguments = array()): string;
+ public function linkToRouteAbsolute(string $routeName, array $arguments = []): string;
/**
* @param string $routeName
@@ -70,7 +70,7 @@ interface IURLGenerator {
* @return string the url
* @since 6.0.0
*/
- public function linkTo(string $appName, string $file, array $args = array()): string;
+ public function linkTo(string $appName, string $file, array $args = []): string;
/**
* Returns the link to an image, like linkTo but only with prepending img/
diff --git a/lib/public/Route/IRouter.php b/lib/public/Route/IRouter.php
index 4414988c91..f2c43cf8c7 100644
--- a/lib/public/Route/IRouter.php
+++ b/lib/public/Route/IRouter.php
@@ -91,7 +91,7 @@ interface IRouter {
* @since 7.0.0
* @deprecated 9.0.0
*/
- public function create($name, $pattern, array $defaults = array(), array $requirements = array());
+ public function create($name, $pattern, array $defaults = [], array $requirements = []);
/**
* Find the route matching $url.
@@ -122,6 +122,6 @@ interface IRouter {
* @since 7.0.0
* @deprecated 9.0.0
*/
- public function generate($name, $parameters = array(), $absolute = false);
+ public function generate($name, $parameters = [], $absolute = false);
}
diff --git a/lib/public/Search/Provider.php b/lib/public/Search/Provider.php
index c756daa449..3bf8d59ecc 100644
--- a/lib/public/Search/Provider.php
+++ b/lib/public/Search/Provider.php
@@ -49,7 +49,7 @@ abstract class Provider {
* @param array $options as key => value
* @since 7.0.0 - default value for $options was added in 8.0.0
*/
- public function __construct($options = array()) {
+ public function __construct($options = []) {
$this->options = $options;
}
@@ -76,7 +76,7 @@ abstract class Provider {
* @return bool
* @since 8.0.0
*/
- public function providesResultsFor(array $apps = array()) {
+ public function providesResultsFor(array $apps = []) {
$forApps = $this->getOption(self::OPTION_APPS);
return empty($apps) || empty($forApps) || array_intersect($forApps, $apps);
}
diff --git a/lib/public/Template.php b/lib/public/Template.php
index 85ab0ac23b..a19c9fae99 100644
--- a/lib/public/Template.php
+++ b/lib/public/Template.php
@@ -124,7 +124,7 @@ class Template extends \OC_Template {
* @since 8.0.0
* @suppress PhanDeprecatedFunction
*/
- public static function html_select_options($options, $selected, $params=array()) {
+ public static function html_select_options($options, $selected, $params=[]) {
return \html_select_options($options, $selected, $params);
}
}
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 74a4b18f5d..d28eda7201 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -215,7 +215,7 @@ class Util {
* @return string the url
* @since 4.0.0 - parameter $args was added in 4.5.0
*/
- public static function linkToAbsolute( $app, $file, $args = array() ) {
+ public static function linkToAbsolute( $app, $file, $args = [] ) {
$urlGenerator = \OC::$server->getURLGenerator();
return $urlGenerator->getAbsoluteURL(
$urlGenerator->linkTo($app, $file, $args)
@@ -348,7 +348,7 @@ class Util {
* TODO: write example
* @since 4.0.0
*/
- static public function emitHook($signalclass, $signalname, $params = array()) {
+ static public function emitHook($signalclass, $signalname, $params = []) {
return \OC_Hook::emit($signalclass, $signalname, $params);
}
diff --git a/public.php b/public.php
index a63e1c78f2..41753dc8a1 100644
--- a/public.php
+++ b/public.php
@@ -66,8 +66,8 @@ try {
// Load all required applications
\OC::$REQUESTEDAPP = $app;
- OC_App::loadApps(array('authentication'));
- OC_App::loadApps(array('filesystem', 'logging'));
+ OC_App::loadApps(['authentication']);
+ OC_App::loadApps(['filesystem', 'logging']);
if (!\OC::$server->getAppManager()->isInstalled($app)) {
http_response_code(404);
diff --git a/remote.php b/remote.php
index 1a0b2966f1..7d20b4fbdf 100644
--- a/remote.php
+++ b/remote.php
@@ -146,8 +146,8 @@ try {
// Load all required applications
\OC::$REQUESTEDAPP = $app;
- OC_App::loadApps(array('authentication'));
- OC_App::loadApps(array('filesystem', 'logging'));
+ OC_App::loadApps(['authentication']);
+ OC_App::loadApps(['filesystem', 'logging']);
switch ($app) {
case 'core':
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index cd90918144..211f08b929 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -83,7 +83,7 @@ class ClientFlowLoginControllerTest extends TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->willReturnCallback(function($text, $parameters = array()) {
+ ->willReturnCallback(function($text, $parameters = []) {
return vsprintf($text, $parameters);
});
$this->defaults = $this->createMock(Defaults::class);
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index fdbca1ea3b..750547473b 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -110,7 +110,7 @@ class LostControllerTest extends \Test\TestCase {
$this->l10n
->expects($this->any())
->method('t')
- ->willReturnCallback(function($text, $parameters = array()) {
+ ->willReturnCallback(function($text, $parameters = []) {
return vsprintf($text, $parameters);
});
$this->defaults = $this->getMockBuilder('\OCP\Defaults')
@@ -256,7 +256,7 @@ class LostControllerTest extends \Test\TestCase {
$this->urlGenerator
->expects($this->once())
->method('linkToRouteAbsolute')
- ->with('core.lost.setPassword', array('userId' => 'ValidTokenUser', 'token' => 'TheOnlyAndOnlyOneTokenToResetThePassword'))
+ ->with('core.lost.setPassword', ['userId' => 'ValidTokenUser', 'token' => 'TheOnlyAndOnlyOneTokenToResetThePassword'])
->willReturn('https://example.tld/index.php/lostpassword/');
$this->initialStateService->expects($this->at(0))
@@ -280,10 +280,10 @@ class LostControllerTest extends \Test\TestCase {
$this->userManager
->expects($this->any())
->method('userExists')
- ->willReturnMap(array(
- array(true, $existingUser),
- array(false, $nonExistingUser)
- ));
+ ->willReturnMap([
+ [true, $existingUser],
+ [false, $nonExistingUser]
+ ]);
$this->logger->expects($this->exactly(0))
->method('logException');
@@ -338,7 +338,7 @@ class LostControllerTest extends \Test\TestCase {
$this->urlGenerator
->expects($this->once())
->method('linkToRouteAbsolute')
- ->with('core.lost.resetform', array('userId' => 'ExistingUser', 'token' => 'ThisIsMaybeANotSoSecretToken!'))
+ ->with('core.lost.resetform', ['userId' => 'ExistingUser', 'token' => 'ThisIsMaybeANotSoSecretToken!'])
->willReturn('https://example.tld/index.php/lostpassword/');
$message = $this->getMockBuilder('\OC\Mail\Message')
->disableOriginalConstructor()->getMock();
@@ -416,7 +416,7 @@ class LostControllerTest extends \Test\TestCase {
$this->urlGenerator
->expects($this->once())
->method('linkToRouteAbsolute')
- ->with('core.lost.resetform', array('userId' => 'ExistingUser', 'token' => 'ThisIsMaybeANotSoSecretToken!'))
+ ->with('core.lost.resetform', ['userId' => 'ExistingUser', 'token' => 'ThisIsMaybeANotSoSecretToken!'])
->willReturn('https://example.tld/index.php/lostpassword/');
$message = $this->getMockBuilder('\OC\Mail\Message')
->disableOriginalConstructor()->getMock();
@@ -489,7 +489,7 @@ class LostControllerTest extends \Test\TestCase {
$this->urlGenerator
->expects($this->once())
->method('linkToRouteAbsolute')
- ->with('core.lost.resetform', array('userId' => 'ExistingUser', 'token' => 'ThisIsMaybeANotSoSecretToken!'))
+ ->with('core.lost.resetform', ['userId' => 'ExistingUser', 'token' => 'ThisIsMaybeANotSoSecretToken!'])
->willReturn('https://example.tld/index.php/lostpassword/');
$message = $this->createMock(Message::class);
$message
@@ -568,7 +568,7 @@ class LostControllerTest extends \Test\TestCase {
)->willReturn('12345:TheOnlyAndOnlyOneTokenToResetThePassword');
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', true);
- $expectedResponse = array('status' => 'error', 'msg' => '');
+ $expectedResponse = ['status' => 'error', 'msg' => ''];
$this->assertSame($expectedResponse, $response);
}
@@ -598,7 +598,7 @@ class LostControllerTest extends \Test\TestCase {
)->willReturn('12345:TheOnlyAndOnlyOneTokenToResetThePassword');
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', true);
- $expectedResponse = array('user' => 'ValidTokenUser', 'status' => 'success');
+ $expectedResponse = ['user' => 'ValidTokenUser', 'status' => 'success'];
$this->assertSame($expectedResponse, $response);
}
@@ -802,7 +802,7 @@ class LostControllerTest extends \Test\TestCase {
)->willReturn('12345:TheOnlyAndOnlyOneTokenToResetThePassword');
$response = $this->lostController->setPassword('TheOnlyAndOnlyOneTokenToResetThePassword', 'ValidTokenUser', 'NewPassword', false);
- $expectedResponse = array('user' => 'ValidTokenUser', 'status' => 'success');
+ $expectedResponse = ['user' => 'ValidTokenUser', 'status' => 'success'];
$this->assertSame($expectedResponse, $response);
}
diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php
index f0fbce86b8..af776274e5 100644
--- a/tests/Core/Controller/OCSControllerTest.php
+++ b/tests/Core/Controller/OCSControllerTest.php
@@ -92,14 +92,14 @@ class OCSControllerTest extends TestCase {
list($major, $minor, $micro) = \OCP\Util::getVersion();
$result = [];
- $result['version'] = array(
+ $result['version'] = [
'major' => $major,
'minor' => $minor,
'micro' => $micro,
'string' => \OC_Util::getVersionString(),
'edition' => '',
'extendedSupport' => false
- );
+ ];
$capabilities = [
'foo' => 'bar',
@@ -124,14 +124,14 @@ class OCSControllerTest extends TestCase {
list($major, $minor, $micro) = \OCP\Util::getVersion();
$result = [];
- $result['version'] = array(
+ $result['version'] = [
'major' => $major,
'minor' => $minor,
'micro' => $micro,
'string' => \OC_Util::getVersionString(),
'edition' => '',
'extendedSupport' => false
- );
+ ];
$capabilities = [
'foo' => 'bar',
diff --git a/tests/acceptance/features/bootstrap/FileListContext.php b/tests/acceptance/features/bootstrap/FileListContext.php
index cdf2e6acc6..745f522d87 100644
--- a/tests/acceptance/features/bootstrap/FileListContext.php
+++ b/tests/acceptance/features/bootstrap/FileListContext.php
@@ -44,7 +44,7 @@ class FileListContext implements Context, ActorAwareInterface {
* @BeforeScenario
*/
public function initializeFileListAncestors() {
- $this->fileListAncestorsByActor = array();
+ $this->fileListAncestorsByActor = [];
$this->fileListAncestor = null;
}
diff --git a/tests/acceptance/features/core/ActorContext.php b/tests/acceptance/features/core/ActorContext.php
index 81587e4068..9ef34cae29 100644
--- a/tests/acceptance/features/core/ActorContext.php
+++ b/tests/acceptance/features/core/ActorContext.php
@@ -132,8 +132,8 @@ class ActorContext extends RawMinkContext {
* are used in an "I act as XXX" step.
*/
public function initializeActors() {
- $this->actors = array();
- $this->sharedNotebook = array();
+ $this->actors = [];
+ $this->sharedNotebook = [];
$this->actors["default"] = new Actor("default", $this->getSession(), $this->getMinkParameter("base_url"), $this->sharedNotebook);
$this->actors["default"]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier);
diff --git a/tests/acceptance/features/core/Locator.php b/tests/acceptance/features/core/Locator.php
index e670a5b806..e3577f296f 100644
--- a/tests/acceptance/features/core/Locator.php
+++ b/tests/acceptance/features/core/Locator.php
@@ -134,7 +134,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function id($value) {
- return $this->customSelector("named_exact", array("id", $value));
+ return $this->customSelector("named_exact", ["id", $value]);
}
/**
@@ -142,7 +142,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function idOrName($value) {
- return $this->customSelector("named_exact", array("id_or_name", $value));
+ return $this->customSelector("named_exact", ["id_or_name", $value]);
}
/**
@@ -150,7 +150,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function link($value) {
- return $this->customSelector("named_exact", array("link", $value));
+ return $this->customSelector("named_exact", ["link", $value]);
}
/**
@@ -158,7 +158,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function button($value) {
- return $this->customSelector("named_exact", array("button", $value));
+ return $this->customSelector("named_exact", ["button", $value]);
}
/**
@@ -166,7 +166,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function linkOrButton($value) {
- return $this->customSelector("named_exact", array("link_or_button", $value));
+ return $this->customSelector("named_exact", ["link_or_button", $value]);
}
/**
@@ -174,7 +174,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function field($value) {
- return $this->customSelector("named_exact", array("field", $value));
+ return $this->customSelector("named_exact", ["field", $value]);
}
/**
@@ -182,7 +182,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function selectField($value) {
- return $this->customSelector("named_exact", array("select", $value));
+ return $this->customSelector("named_exact", ["select", $value]);
}
/**
@@ -190,7 +190,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function checkbox($value) {
- return $this->customSelector("named_exact", array("checkbox", $value));
+ return $this->customSelector("named_exact", ["checkbox", $value]);
}
/**
@@ -198,7 +198,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function radioButton($value) {
- return $this->customSelector("named_exact", array("radio", $value));
+ return $this->customSelector("named_exact", ["radio", $value]);
}
/**
@@ -206,7 +206,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function fileInput($value) {
- return $this->customSelector("named_exact", array("file", $value));
+ return $this->customSelector("named_exact", ["file", $value]);
}
/**
@@ -214,7 +214,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function optionGroup($value) {
- return $this->customSelector("named_exact", array("optgroup", $value));
+ return $this->customSelector("named_exact", ["optgroup", $value]);
}
/**
@@ -222,7 +222,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function option($value) {
- return $this->customSelector("named_exact", array("option", $value));
+ return $this->customSelector("named_exact", ["option", $value]);
}
/**
@@ -230,7 +230,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function fieldSet($value) {
- return $this->customSelector("named_exact", array("fieldset", $value));
+ return $this->customSelector("named_exact", ["fieldset", $value]);
}
/**
@@ -238,7 +238,7 @@ class LocatorBuilder {
* @return LocatorBuilderSecondStep
*/
public function table($value) {
- return $this->customSelector("named_exact", array("table", $value));
+ return $this->customSelector("named_exact", ["table", $value]);
}
}
diff --git a/tests/acceptance/features/core/NextcloudTestServerContext.php b/tests/acceptance/features/core/NextcloudTestServerContext.php
index ff1296ba18..8540a71a4f 100644
--- a/tests/acceptance/features/core/NextcloudTestServerContext.php
+++ b/tests/acceptance/features/core/NextcloudTestServerContext.php
@@ -78,7 +78,7 @@ class NextcloudTestServerContext implements Context {
$nextcloudTestServerHelperClass = new ReflectionClass($nextcloudTestServerHelper);
if ($nextcloudTestServerHelperParameters === null) {
- $nextcloudTestServerHelperParameters = array();
+ $nextcloudTestServerHelperParameters = [];
}
$this->nextcloudTestServerHelper = $nextcloudTestServerHelperClass->newInstanceArgs($nextcloudTestServerHelperParameters);
diff --git a/tests/apps.php b/tests/apps.php
index 63895cbd56..1ed2a6bdde 100644
--- a/tests/apps.php
+++ b/tests/apps.php
@@ -28,7 +28,7 @@ function loadDirectory($path) {
}
function getSubclasses($parentClassName) {
- $classes = array();
+ $classes = [];
foreach (get_declared_classes() as $className) {
if (is_subclass_of($className, $parentClassName))
$classes[] = $className;
diff --git a/tests/docker/mysqlmb4.config.php b/tests/docker/mysqlmb4.config.php
index 4e78272fab..528673950a 100644
--- a/tests/docker/mysqlmb4.config.php
+++ b/tests/docker/mysqlmb4.config.php
@@ -1,5 +1,5 @@
true,
-);
+];
diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php
index 97af541085..9e30977e29 100644
--- a/tests/lib/AllConfigTest.php
+++ b/tests/lib/AllConfigTest.php
@@ -44,14 +44,14 @@ class AllConfigTest extends \Test\TestCase {
$this->connection->executeUpdate(
'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' .
'`configkey`, `configvalue`) VALUES (?, ?, ?, ?)',
- array('userDelete', 'appDelete', 'keyDelete', 'valueDelete')
+ ['userDelete', 'appDelete', 'keyDelete', 'valueDelete']
);
$config->deleteUserValue('userDelete', 'appDelete', 'keyDelete');
$result = $this->connection->executeQuery(
'SELECT COUNT(*) AS `count` FROM `*PREFIX*preferences` WHERE `userid` = ?',
- array('userDelete')
+ ['userDelete']
)->fetch();
$actualCount = $result['count'];
@@ -64,28 +64,28 @@ class AllConfigTest extends \Test\TestCase {
$config->setUserValue('userSet', 'appSet', 'keySet', 'valueSet');
- $result = $this->connection->executeQuery($selectAllSQL, array('userSet'))->fetchAll();
+ $result = $this->connection->executeQuery($selectAllSQL, ['userSet'])->fetchAll();
$this->assertEquals(1, count($result));
- $this->assertEquals(array(
+ $this->assertEquals([
'userid' => 'userSet',
'appid' => 'appSet',
'configkey' => 'keySet',
'configvalue' => 'valueSet'
- ), $result[0]);
+ ], $result[0]);
// test if the method overwrites existing database entries
$config->setUserValue('userSet', 'appSet', 'keySet', 'valueSet2');
- $result = $this->connection->executeQuery($selectAllSQL, array('userSet'))->fetchAll();
+ $result = $this->connection->executeQuery($selectAllSQL, ['userSet'])->fetchAll();
$this->assertEquals(1, count($result));
- $this->assertEquals(array(
+ $this->assertEquals([
'userid' => 'userSet',
'appid' => 'appSet',
'configkey' => 'keySet',
'configvalue' => 'valueSet2'
- ), $result[0]);
+ ], $result[0]);
// cleanup - it therefore relies on the successful execution of the previous test
$config->deleteUserValue('userSet', 'appSet', 'keySet');
@@ -98,28 +98,28 @@ class AllConfigTest extends \Test\TestCase {
$config->setUserValue('userPreCond', 'appPreCond', 'keyPreCond', 'valuePreCond');
- $result = $this->connection->executeQuery($selectAllSQL, array('userPreCond'))->fetchAll();
+ $result = $this->connection->executeQuery($selectAllSQL, ['userPreCond'])->fetchAll();
$this->assertEquals(1, count($result));
- $this->assertEquals(array(
+ $this->assertEquals([
'userid' => 'userPreCond',
'appid' => 'appPreCond',
'configkey' => 'keyPreCond',
'configvalue' => 'valuePreCond'
- ), $result[0]);
+ ], $result[0]);
// test if the method overwrites existing database entries with valid precond
$config->setUserValue('userPreCond', 'appPreCond', 'keyPreCond', 'valuePreCond2', 'valuePreCond');
- $result = $this->connection->executeQuery($selectAllSQL, array('userPreCond'))->fetchAll();
+ $result = $this->connection->executeQuery($selectAllSQL, ['userPreCond'])->fetchAll();
$this->assertEquals(1, count($result));
- $this->assertEquals(array(
+ $this->assertEquals([
'userid' => 'userPreCond',
'appid' => 'appPreCond',
'configkey' => 'keyPreCond',
'configvalue' => 'valuePreCond2'
- ), $result[0]);
+ ], $result[0]);
// cleanup
$config->deleteUserValue('userPreCond', 'appPreCond', 'keyPreCond');
@@ -155,28 +155,28 @@ class AllConfigTest extends \Test\TestCase {
$config->setUserValue('userPreCond1', 'appPreCond', 'keyPreCond', 'valuePreCond');
- $result = $this->connection->executeQuery($selectAllSQL, array('userPreCond1'))->fetchAll();
+ $result = $this->connection->executeQuery($selectAllSQL, ['userPreCond1'])->fetchAll();
$this->assertEquals(1, count($result));
- $this->assertEquals(array(
+ $this->assertEquals([
'userid' => 'userPreCond1',
'appid' => 'appPreCond',
'configkey' => 'keyPreCond',
'configvalue' => 'valuePreCond'
- ), $result[0]);
+ ], $result[0]);
// test if the method overwrites existing database entries with valid precond
$config->setUserValue('userPreCond1', 'appPreCond', 'keyPreCond', 'valuePreCond2', 'valuePreCond3');
- $result = $this->connection->executeQuery($selectAllSQL, array('userPreCond1'))->fetchAll();
+ $result = $this->connection->executeQuery($selectAllSQL, ['userPreCond1'])->fetchAll();
$this->assertEquals(1, count($result));
- $this->assertEquals(array(
+ $this->assertEquals([
'userid' => 'userPreCond1',
'appid' => 'appPreCond',
'configkey' => 'keyPreCond',
'configvalue' => 'valuePreCond'
- ), $result[0]);
+ ], $result[0]);
// cleanup
$config->deleteUserValue('userPreCond1', 'appPreCond', 'keyPreCond');
@@ -197,7 +197,7 @@ class AllConfigTest extends \Test\TestCase {
->method('executeQuery')
->with($this->equalTo('SELECT `configvalue` FROM `*PREFIX*preferences` '.
'WHERE `userid` = ? AND `appid` = ? AND `configkey` = ?'),
- $this->equalTo(array('userSetUnchanged', 'appSetUnchanged', 'keySetUnchanged')))
+ $this->equalTo(['userSetUnchanged', 'appSetUnchanged', 'keySetUnchanged']))
->willReturn($resultMock);
$connectionMock->expects($this->never())
->method('executeUpdate');
@@ -218,19 +218,19 @@ class AllConfigTest extends \Test\TestCase {
$result = $this->connection->executeQuery(
'SELECT `userid`, `appid`, `configkey`, `configvalue` FROM `*PREFIX*preferences` WHERE `userid` = ?',
- array('userGet')
+ ['userGet']
)->fetchAll();
$this->assertEquals(1, count($result));
- $this->assertEquals(array(
+ $this->assertEquals([
'userid' => 'userGet',
'appid' => 'appGet',
'configkey' => 'keyGet',
'configvalue' => 'valueGet'
- ), $result[0]);
+ ], $result[0]);
// drop data from database - but the config option should be cached in the config object
- $this->connection->executeUpdate('DELETE FROM `*PREFIX*preferences` WHERE `userid` = ?', array('userGet'));
+ $this->connection->executeUpdate('DELETE FROM `*PREFIX*preferences` WHERE `userid` = ?', ['userGet']);
// testing the caching mechanism
$value = $config->getUserValue('userGet', 'appGet', 'keyGet');
@@ -239,7 +239,7 @@ class AllConfigTest extends \Test\TestCase {
$result = $this->connection->executeQuery(
'SELECT `userid`, `appid`, `configkey`, `configvalue` FROM `*PREFIX*preferences` WHERE `userid` = ?',
- array('userGet')
+ ['userGet']
)->fetchAll();
$this->assertEquals(0, count($result));
@@ -249,15 +249,15 @@ class AllConfigTest extends \Test\TestCase {
$config = $this->getConfig();
// preparation - add something to the database
- $data = array(
- array('userFetch', 'appFetch1', 'keyFetch1', 'value1'),
- array('userFetch', 'appFetch1', 'keyFetch2', 'value2'),
- array('userFetch', 'appFetch2', 'keyFetch3', 'value3'),
- array('userFetch', 'appFetch1', 'keyFetch4', 'value4'),
- array('userFetch', 'appFetch4', 'keyFetch1', 'value5'),
- array('userFetch', 'appFetch5', 'keyFetch1', 'value6'),
- array('userFetch2', 'appFetch', 'keyFetch1', 'value7')
- );
+ $data = [
+ ['userFetch', 'appFetch1', 'keyFetch1', 'value1'],
+ ['userFetch', 'appFetch1', 'keyFetch2', 'value2'],
+ ['userFetch', 'appFetch2', 'keyFetch3', 'value3'],
+ ['userFetch', 'appFetch1', 'keyFetch4', 'value4'],
+ ['userFetch', 'appFetch4', 'keyFetch1', 'value5'],
+ ['userFetch', 'appFetch5', 'keyFetch1', 'value6'],
+ ['userFetch2', 'appFetch', 'keyFetch1', 'value7']
+ ];
foreach ($data as $entry) {
$this->connection->executeUpdate(
'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' .
@@ -267,10 +267,10 @@ class AllConfigTest extends \Test\TestCase {
}
$value = $config->getUserKeys('userFetch', 'appFetch1');
- $this->assertEquals(array('keyFetch1', 'keyFetch2', 'keyFetch4'), $value);
+ $this->assertEquals(['keyFetch1', 'keyFetch2', 'keyFetch4'], $value);
$value = $config->getUserKeys('userFetch2', 'appFetch');
- $this->assertEquals(array('keyFetch1'), $value);
+ $this->assertEquals(['keyFetch1'], $value);
// cleanup
$this->connection->executeUpdate('DELETE FROM `*PREFIX*preferences`');
@@ -288,15 +288,15 @@ class AllConfigTest extends \Test\TestCase {
$config = $this->getConfig();
// preparation - add something to the database
- $data = array(
- array('userFetch1', 'appFetch2', 'keyFetch1', 'value1'),
- array('userFetch2', 'appFetch2', 'keyFetch1', 'value2'),
- array('userFetch3', 'appFetch2', 'keyFetch1', 3),
- array('userFetch4', 'appFetch2', 'keyFetch1', 'value4'),
- array('userFetch5', 'appFetch2', 'keyFetch1', 'value5'),
- array('userFetch6', 'appFetch2', 'keyFetch1', 'value6'),
- array('userFetch7', 'appFetch2', 'keyFetch1', 'value7')
- );
+ $data = [
+ ['userFetch1', 'appFetch2', 'keyFetch1', 'value1'],
+ ['userFetch2', 'appFetch2', 'keyFetch1', 'value2'],
+ ['userFetch3', 'appFetch2', 'keyFetch1', 3],
+ ['userFetch4', 'appFetch2', 'keyFetch1', 'value4'],
+ ['userFetch5', 'appFetch2', 'keyFetch1', 'value5'],
+ ['userFetch6', 'appFetch2', 'keyFetch1', 'value6'],
+ ['userFetch7', 'appFetch2', 'keyFetch1', 'value7']
+ ];
foreach ($data as $entry) {
$this->connection->executeUpdate(
'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' .
@@ -306,20 +306,20 @@ class AllConfigTest extends \Test\TestCase {
}
$value = $config->getUserValueForUsers('appFetch2', 'keyFetch1',
- array('userFetch1', 'userFetch2', 'userFetch3', 'userFetch5'));
- $this->assertEquals(array(
+ ['userFetch1', 'userFetch2', 'userFetch3', 'userFetch5']);
+ $this->assertEquals([
'userFetch1' => 'value1',
'userFetch2' => 'value2',
'userFetch3' => 3,
'userFetch5' => 'value5'
- ), $value);
+ ], $value);
$value = $config->getUserValueForUsers('appFetch2', 'keyFetch1',
- array('userFetch1', 'userFetch4', 'userFetch9'));
- $this->assertEquals(array(
+ ['userFetch1', 'userFetch4', 'userFetch9']);
+ $this->assertEquals([
'userFetch1' => 'value1',
'userFetch4' => 'value4'
- ), $value, 'userFetch9 is an non-existent user and should not be shown.');
+ ], $value, 'userFetch9 is an non-existent user and should not be shown.');
// cleanup
$this->connection->executeUpdate('DELETE FROM `*PREFIX*preferences`');
@@ -329,15 +329,15 @@ class AllConfigTest extends \Test\TestCase {
$config = $this->getConfig();
// preparation - add something to the database
- $data = array(
- array('userFetch3', 'appFetch1', 'keyFetch1', 'value1'),
- array('userFetch3', 'appFetch1', 'keyFetch2', 'value2'),
- array('userFetch3', 'appFetch2', 'keyFetch3', 'value3'),
- array('userFetch3', 'appFetch1', 'keyFetch4', 'value4'),
- array('userFetch3', 'appFetch4', 'keyFetch1', 'value5'),
- array('userFetch3', 'appFetch5', 'keyFetch1', 'value6'),
- array('userFetch4', 'appFetch2', 'keyFetch1', 'value7')
- );
+ $data = [
+ ['userFetch3', 'appFetch1', 'keyFetch1', 'value1'],
+ ['userFetch3', 'appFetch1', 'keyFetch2', 'value2'],
+ ['userFetch3', 'appFetch2', 'keyFetch3', 'value3'],
+ ['userFetch3', 'appFetch1', 'keyFetch4', 'value4'],
+ ['userFetch3', 'appFetch4', 'keyFetch1', 'value5'],
+ ['userFetch3', 'appFetch5', 'keyFetch1', 'value6'],
+ ['userFetch4', 'appFetch2', 'keyFetch1', 'value7']
+ ];
foreach ($data as $entry) {
$this->connection->executeUpdate(
'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' .
@@ -363,15 +363,15 @@ class AllConfigTest extends \Test\TestCase {
$config = $this->getConfig();
// preparation - add something to the database
- $data = array(
- array('userFetch5', 'appFetch1', 'keyFetch1', 'value1'),
- array('userFetch5', 'appFetch1', 'keyFetch2', 'value2'),
- array('userFetch5', 'appFetch2', 'keyFetch3', 'value3'),
- array('userFetch5', 'appFetch1', 'keyFetch4', 'value4'),
- array('userFetch5', 'appFetch4', 'keyFetch1', 'value5'),
- array('userFetch5', 'appFetch5', 'keyFetch1', 'value6'),
- array('userFetch6', 'appFetch2', 'keyFetch1', 'value7')
- );
+ $data = [
+ ['userFetch5', 'appFetch1', 'keyFetch1', 'value1'],
+ ['userFetch5', 'appFetch1', 'keyFetch2', 'value2'],
+ ['userFetch5', 'appFetch2', 'keyFetch3', 'value3'],
+ ['userFetch5', 'appFetch1', 'keyFetch4', 'value4'],
+ ['userFetch5', 'appFetch4', 'keyFetch1', 'value5'],
+ ['userFetch5', 'appFetch5', 'keyFetch1', 'value6'],
+ ['userFetch6', 'appFetch2', 'keyFetch1', 'value7']
+ ];
foreach ($data as $entry) {
$this->connection->executeUpdate(
'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' .
@@ -415,14 +415,14 @@ class AllConfigTest extends \Test\TestCase {
$config = $this->getConfig($systemConfig);
// preparation - add something to the database
- $data = array(
- array('user1', 'appFetch9', 'keyFetch9', 'value9'),
- array('user2', 'appFetch9', 'keyFetch9', 'value9'),
- array('user3', 'appFetch9', 'keyFetch9', 'value8'),
- array('user4', 'appFetch9', 'keyFetch8', 'value9'),
- array('user5', 'appFetch8', 'keyFetch9', 'value9'),
- array('user6', 'appFetch9', 'keyFetch9', 'value9'),
- );
+ $data = [
+ ['user1', 'appFetch9', 'keyFetch9', 'value9'],
+ ['user2', 'appFetch9', 'keyFetch9', 'value9'],
+ ['user3', 'appFetch9', 'keyFetch9', 'value8'],
+ ['user4', 'appFetch9', 'keyFetch8', 'value9'],
+ ['user5', 'appFetch8', 'keyFetch9', 'value9'],
+ ['user6', 'appFetch9', 'keyFetch9', 'value9'],
+ ];
foreach ($data as $entry) {
$this->connection->executeUpdate(
'INSERT INTO `*PREFIX*preferences` (`userid`, `appid`, ' .
@@ -432,7 +432,7 @@ class AllConfigTest extends \Test\TestCase {
}
$value = $config->getUsersForUserValue('appFetch9', 'keyFetch9', 'value9');
- $this->assertEquals(array('user1', 'user2', 'user6'), $value);
+ $this->assertEquals(['user1', 'user2', 'user6'], $value);
// cleanup
$this->connection->executeUpdate('DELETE FROM `*PREFIX*preferences`');
diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php
index 50c1e13b3f..68e4a5beaf 100644
--- a/tests/lib/App/AppManagerTest.php
+++ b/tests/lib/App/AppManagerTest.php
@@ -35,7 +35,7 @@ class AppManagerTest extends TestCase {
* @return AppConfig|MockObject
*/
protected function getAppConfig() {
- $appConfig = array();
+ $appConfig = [];
$config = $this->createMock(AppConfig::class);
$config->expects($this->any())
@@ -47,7 +47,7 @@ class AppManagerTest extends TestCase {
->method('setValue')
->willReturnCallback(function ($app, $key, $value) use (&$appConfig) {
if (!isset($appConfig[$app])) {
- $appConfig[$app] = array();
+ $appConfig[$app] = [];
}
$appConfig[$app][$key] = $value;
});
@@ -57,7 +57,7 @@ class AppManagerTest extends TestCase {
if ($app) {
return $appConfig[$app];
} else {
- $values = array();
+ $values = [];
foreach ($appConfig as $appid => $appData) {
if (isset($appData[$key])) {
$values[$appid] = $appData[$key];
@@ -346,7 +346,7 @@ class AppManagerTest extends TestCase {
$this->groupManager->expects($this->once())
->method('getUserGroupIds')
->with($user)
- ->willReturn(array('foo', 'bar'));
+ ->willReturn(['foo', 'bar']);
$this->appConfig->setValue('test', 'enabled', '["foo"]');
$this->assertTrue($this->manager->isEnabledForUser('test', $user));
@@ -357,7 +357,7 @@ class AppManagerTest extends TestCase {
$this->groupManager->expects($this->once())
->method('getUserGroupIds')
->with($user)
- ->willReturn(array('bar'));
+ ->willReturn(['bar']);
$this->appConfig->setValue('test', 'enabled', '["foo"]');
$this->assertFalse($this->manager->isEnabledForUser('test', $user));
@@ -377,7 +377,7 @@ class AppManagerTest extends TestCase {
$this->groupManager->expects($this->once())
->method('getUserGroupIds')
->with($user)
- ->willReturn(array('foo', 'bar'));
+ ->willReturn(['foo', 'bar']);
$this->appConfig->setValue('test', 'enabled', '["foo"]');
$this->assertTrue($this->manager->isEnabledForUser('test'));
@@ -410,7 +410,7 @@ class AppManagerTest extends TestCase {
$this->groupManager->expects($this->any())
->method('getUserGroupIds')
->with($user)
- ->willReturn(array('foo', 'bar'));
+ ->willReturn(['foo', 'bar']);
$this->appConfig->setValue('test1', 'enabled', 'yes');
$this->appConfig->setValue('test2', 'enabled', 'no');
diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
index 30d1fec6c9..f18c24f2f6 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -57,16 +57,16 @@ class AppFetcherTest extends TestCase {
static $responseJson = <<<'EOD'
[{"id":"direct_menu","categories":["customization"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/juliushaertl/direct_menu/issues","website":"","created":"2016-10-01T09:16:06.030994Z","lastModified":"2016-10-06T14:01:05.584192Z","releases":[{"version":"0.9.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/juliushaertl/direct_menu/releases/download/v0.9.2/direct_menu.tar.gz","created":"2016-10-06T14:01:05.578297Z","licenses":["agpl"],"lastModified":"2016-10-06T14:01:05.643813Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"ERBS9G5bZ3vwCizz2Ht5DehsVJmb63bzF3aYcH7xjbDVMPagOFWdUAiLDwTeZR1n\ni4gdZ73J/IjHQQJoOPwtCjgbZgLPFqL5x13CLUO9mb/33dZe/+gqEDc/3AuJ4TlA\nXUdLxHRb1bwIlJOwuSr/E24452VG20WUhLXBoM0Zm7WcMxvJWo2zAWnuqnLX3dy9\ncPB4PX+6JU2lUMINj8OYQmM1QnqvjG8YV0cYHbBbnSicOGwXEnni7mojsC8T0cn7\nYEJ2O2iO9hh3fvFEXUzDcL7tDQ5bZqm63Oa991bsAJxFo/RbzeJRh//DcOrd8Ufn\nu2SqRhwybS8j4YvfjAL9RPdRfPLwf6X2gx/Y6QFrKHH0QMI/9J/ZFyoUQcqKbsHV\n85O+yuWoqVmza71tkp4n9PuMdprCinaVvHbHbNGUf2SIh9BWuEQuVvvnvB+ZW8XY\n+Cl+unzk3WgOgT0iY3uEmsQcrLIo4DSKhcNgD1NS13fR/JTSavvmOqBarUMFZfVC\nbkR1DTBCyDjdpNBidpa3/26675dz5IT5Zedp4BBBREQzX08cIhJx5mgqDdX3CU09\nuWtzoaLi71/1BWTFAN+Y9VyfZ8/Z3Pg3vKedRJ565mztIj0geL3riEsC5YnPS0+C\n+a3B9sDiiOa101EORzX3lrPqL7reEPdCxrIwN+hKFBQ=","translations":{}}],"screenshots":[{"url":"https://bitgrid.net/~jus/direct_menu_nc.png"}],"translations":{"en":{"name":"Direct Menu","summary":"Provide easy access to all apps in the header.","description":"Provide easy access to all apps in the header."}},"isFeatured":false,"authors":[{"name":"Julius Härtl","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEBjCCAu4CAhADMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE0MTI1MDU0WhcNMjYxMjIxMTI1MDU0WjAWMRQwEgYD\r\nVQQDDAtkaXJlY3RfbWVudTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB\r\nAMkzWsAkKP/40ktvJMpnr0IJNVoPOR0hvh24igcDskL1WKiD2eiRUenj5LE0Nvn+\r\nsiGmWsAqRVpdiz+Y8ghQqQMzKi43IrRN0AxlCrHWrSqBZT3wIAUcFz4RzEoFxc1N\r\nUZzWma6ljukGnvt4V1ZyT+H/cjqxUkBhh/y9SS0jUen1a1grND6Rw54X46V2dlCu\r\nFH+pLsfPJJGw+QLeTGHn7dqdv18cYMAlWDCzPixVnNiCXHZcUtKMmstU2xU4R2e6\r\nzimp2rgkE4TNHrafpjH8xGdNi2FG5Dmokob/L5Q2r8jyNaW7UsFfrvLTRj371b3/\r\n2FhhxoGUvDzaG2An02Exwm52LJfdTVMHAMPZub5poHfy5vAEdZGPQ/m02l8ZK/Y2\r\n7yT807GlfPMXfdfjCxR6wNtmv7rvBDdrUZmIRNJfpFSdvlH/+MOTWnabyfQv2K4Q\r\nBIwltX6Elh0lh4ntvt1ZVtvFv+PL1Dc7QLV+w19+/LJA0mnsh7GIFYKFlbA65gA0\r\nc/w+uqDy0+5MxkR9WGPpd79KRA1tKWTis4Ny1lApK5y3zIsVGa3DfBHXcwqkWHbV\r\nwIpyuyyDsFtC1b9LTFONX7iU9cbNk5C5GTM331MdA2kLcD/D5k42GNTBSca7MkPx\r\nFx/ETSn0Ct167el30symf2AxvXjw+mBYPN71rVTMDwe9AgMBAAEwDQYJKoZIhvcN\r\nAQELBQADggEBAC0fJKnbEhXA8M283jA9GxABxLyTBcQyVVNnz2L/bYYNi81Y9iZv\r\n+U0S3qaIfoqNcV9FTKAutbsKvWyolnI7MRRK6feNuFfoP2jKubM1CnawpyT/RF2Q\r\ne/zxnB1EmeI2X5D2xceJDLB7Fy5W0EGrLixRIdFaSUommWFUm9E2hSIaNlziSBdc\r\n1J/mOQeNYO5zg5ouEt1rzQW4Mhh1I2uNQmGe4ip+Jl/2LAv3FZuu4NrSEcoXH3ro\r\nG2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx\r\n2OmWZo7UBREWenjKyFZZ/iKoqH5sdenBtpo=\r\n-----END CERTIFICATE-----"},{"id":"apporder","categories":["customization"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/juliushaertl/apporder/issues","website":"","created":"2016-10-01T09:16:47.111889Z","lastModified":"2016-10-12T19:50:16.038821Z","releases":[{"version":"0.3.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/juliushaertl/apporder/releases/download/0.3.3/apporder.tar.gz","created":"2016-10-12T19:14:10.802359Z","licenses":["agpl"],"lastModified":"2016-10-12T19:50:16.104357Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"nhlT9lhrmBxIsqh/e3RLm2NDw/U8ZvvoMyYQTLMM3H19DQmVcPYPYC9QWVTsowUzXblVaOXVGylbpKma9yOlOAqJtF3qyXecLl4+tA/Awb6BBhKPgHFdcLDAL5yy1K7/uei3SgEojMlJoI9vEK5I1C5YTh43yNH+//Im6MAuNYFUTlMXK426zdOe6ogpCI5GlYdXopqYANxcpT+WXWET6DDSM5Ev+MYwMcSAY4r8+tvARRU4ZAenRgjkBT6R5z6cD76emRax14tbV6vkjjwRcO+dQtM0tFPbd+5fsNInbauv50VzIMgjA6RnKTOI17gRsSdGlsV4vZn2aIxEPWauu6T/UohMvAE9HMn13vtbpPBSFwJAktj6yHASYGzupNQLprA0+OdyALoLZPpQAKNEXA42a4EVISBKu0EmduHJlUPeqhnIGkkGgVNWS8AWqzP2nFoPdXBgUWateiMcBTHxgEKDac5YmNc9lsXpzf1OxBaXHBhGYKuXPwIfyH3jTWb1OdwixJEuRe9dl63T9qOTRre8QWns/bMqKLibGfMtFhVB21ARJayBuX70eVvabG/2N7Y5t1zUlFygIKu51tvo3AVCRDdRrFWDvkAjxzIz5FIdALVZ+DReFYu/r4WF/w3V9rInFuEDSwb/OH4r8sQycs07tSlMyA74Y3FpjKTBxso=","translations":{}},{"version":"0.3.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/juliushaertl/apporder/releases/download/0.3.2/apporder.tar.gz","created":"2016-10-06T14:00:51.532409Z","licenses":["agpl"],"lastModified":"2016-10-06T14:00:51.598455Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"gRVFOtj9414ZNSdRH/qNB2SwVZUQh+gaFnNLFjjXjJ1MdRMCISzvwb+QU1qYuK/y\nuL8K0pn1+fFQf8A3VsC2pb6yaLQ5U9C3Guf886Flf4qtYw1P8UWRA9yOJ+6Md+PH\n6pTEiDIdm4xbmM0KkBhsE5kL8dvLIq4EwwcAh2Qq8fjytzAk1YiP+KrTaYrVwskM\nDmm0lgP4NVnjRBTX9myW6tr6N3w0tq2jJ/+a/vEDJv+5ozKJx8N5gbJNdrtI4k7I\nyaQNWJ7cngtAHmUREeoBggV5uJayDceu83PPQR6N9/WVyNyZjw1Q8/Q6e/NyiXT2\no8mGv5tHl3DBOVuv8v7gBQgDh6ppp12M81aiCZymn2XIgjw50VQ+K15KHnLHuFFw\nwuHZVcoQ7b6oR4K4TURSfPFUeNgGS4R9v6gjg1RUcSm1Pnryc6pYnh10AUY8dk6q\n1CZ6Upt6SScP2ZEGWsFwVjjQhY/ZJmNfnhaGoFOZ5L9CnzyNCkGXFg0rL36i6djb\naqFy/z+Brnklng5ct6XWoP7uDt5BaHznQj1NHSfHn0GUQ0N968zWm9vQvy+dyXyC\nxR7vKeu2ppZ2ydoeQ9CVwfhOEsGs5OvrpapQdh9KbUHcX7b7ql01J7/P6dFuNuHe\n+7/y4ex3sEVg5YBmDtF8iZ6d7zsHd6peL1s1EsLnenQ=","translations":{}}],"screenshots":[{"url":"https://bitgrid.net/~jus/apporder-nc.gif"}],"translations":{"en":{"name":"AppOrder","summary":"Sort apps in the menu with drag and drop","description":"\nEnable sorting for icons inside the app menu. The order will be saved for each\nuser individually. Administrators can define a custom default order.\nAppOrder works with the default owncloud menu as well as with the direct_menu\napp.\n\n## Set a default order for all new users\n\nGo to the Admin settings > Additional settings and drag the icons under App order.\n\n## Use first app as default app\n\nYou can easily let Nextcloud redirect your user to the first app in their\npersonal order by changing the following parameter in your config/config.php:\n\n'defaultapp' => 'apporder',\n\nUsers will now get redirected to the first app of the default order or to the\nfirst app of the user order.\n "}},"isFeatured":false,"authors":[{"name":"Julius Härtl","mail":"jus@bitgrid.net","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhAEMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE0MTI1MjQ4WhcNMjYxMjIxMTI1MjQ4WjATMREwDwYD\r\nVQQDDAhhcHBvcmRlcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKVK\r\nKn5jivCu+eRfe5BECjDOzNaGHlpiegb49Hf4nh0W7DqcoLHip5c1O2BcEYdH6rkw\r\n20WclvjoQpgavG5aFXzXzur6eKTT5TpgY5oZTLoWjbx4e+fKdhyDPTpqNZzs1pxz\r\nsZLDL/ElpbSErE0s+QK/pzP11WNPylAkI9AKSyDMO3Mbllg8I8Bt+bT7LJKYOO/T\r\nLhv9m0anLZ4HrdfimhVIoMiu3RpyRigk8titXZA94+F8Fbf7ZQ9f14Y/v3+rfJFQ\r\nii9cDoox5uUrjplH2LrMr5BodfCfydLu4uVpPWYkdccgvcZ1sugjvNXyCQgdzQDK\r\npOpiwVkkiQFaQJYbGSDblFWPl/cLtA/P/qS7s8tWyTQuc1rYlEpCHG/fG8ZFkSVK\r\n9eCMGxK908VB4IU2DHZHOHi7JvtOz8X/Ak6pIIFdARoW3rfKlrz6DD4T9jEgYq0n\r\nRe7YwCKEIU3liZJ+qG6LCa+rMlp/7sCzAmqBhaaaJyX4nnZCa2Q2cNZpItEAdwVc\r\nqxLYL1FiNFMSeeYhzJJoq5iMC3vp2LScUJJNoXZj9zv+uqTNGHr+bimchR2rHUBo\r\nPzDLFJmat03KdWcMYxcK5mxJNGHpgyqM7gySlbppY/cgAospE8/ygU2FlFWIC9N0\r\neDaY+T8QA1msnzsfMhYuOI8CRYigan1agGOMDgGxAgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBAGsECd+meXHg1rr8Wb6qrkDz/uxkY1J+pa5WxnkVcB6QrF3+HDtLMvYm\r\nTTS02ffLLyATNTOALZFSy4fh4At4SrNzl8dUaapgqk1T8f+y1FhfpZrEBsarrq+2\r\nCSKtBro2jcnxzI3BvHdQcx4RAGo8sUzaqKBmsy+JmAqpCSk8f1zHR94x4Akp7n44\r\n8Ha7u1GcHMPzSeScRMGJX/x06B45cLVGHH5GF2Bu/8JaCSEAsgETCMkc/XFMYrRd\r\nTu+WGOL2Ee5U4k4XFdzeSLODWby08iU+Gx3bXTR6WIvXCYeIVsCPKK/luvfGkiSR\r\nCpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ=\r\n-----END CERTIFICATE-----"},{"id":"twofactor_totp","categories":["tools"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"","website":"","created":"2016-10-08T14:13:54.356716Z","lastModified":"2016-10-12T14:38:56.186269Z","releases":[{"version":"0.4.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0 <7.1.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/ChristophWurst/twofactor_totp/releases/download/0.4.1/twofactor_totp.tar.gz","created":"2016-10-12T14:38:56.174612Z","licenses":["agpl"],"lastModified":"2016-10-12T14:38:56.248223Z","isNightly":false,"rawPhpVersionSpec":">=5.4 <=7.0","rawPlatformVersionSpec":">=10 <=11","signature":"bnwWxmHEn8xkoWbtwhC1kIrJ0dQfAI3PUtU62k+Tru/BHt1G2aVxqO8bCdghojZ7\nzdFMlIJw4kekYFsVfLk8jzjUTZKVbNVKCdkHrVTQ0bUUryMAMLqGQ3PSRI5NX6D5\nFpkvwO1coYwU0XVWF8KAS0meX0ztSkT3Mv96LLrxr8F8SrB/MGmKIE4WTjt1fAIa\nZLAVEUo/3sNFTGLYBtL3wjctrkZvJltP8abeRfls9FkRHu+rN7R3uLFzk42uZn3X\nWpt5BBmlYm5ORbnJ2ApsxEkMNK+rOy8GIePaz5277ozTNrOnO04id1FXnS9mIsKD\n20nRzjekZH+nneQYoCTfnEFg2QXpW+a+zINbqCD5hivEU8utdpDAHFpNjIJdjXcS\n8MiCA/yvtwRnfqJ5Fy9BxJ6Gt05/GPUqT8DS7P1I1N+qxhsvFEdxhrm2yIOhif8o\nh7ro5ls+d3OQ8i3i4vdZm821Ytxdu/DQBHiVoOBarvFWwWAv2zd2VAvpTmk6J5yv\n3y+csRqpEJYd9fcVMPsTu7WBRRrpBsAqdAHJcZEwak2kz1kdOgSf8FIzP1z6Q71d\nMl2RKcPeutMHHSLiGIN/h7fM5aSs49wGgGZmfz28fHVd7/U0HFSMYmkT/GMq5tMP\nIyc+QZAN4qbX8G0k/QSTkK/L4lOT2hQiQqiSqmWItMk=","translations":{}}],"screenshots":[],"translations":{"en":{"name":"Two Factor TOTP Provider","summary":"A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)","description":"A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)"}},"isFeatured":true,"authors":[{"name":"Christoph Wurst","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIECTCCAvECAhASMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYxMDEyMDkzNDMxWhcNMjcwMTE4MDkzNDMxWjAZMRcwFQYD\r\nVQQDDA50d29mYWN0b3JfdG90cDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC\r\nggIBALC1K94104L/nOtmTygx7QNjUcnHs3yrn71mw4pMxTlonXOnMTpwxsfL1Hhu\r\n/5GMSgupTbQPlevSl6J86UMs455/sPShd6ifmAuhb8VFaAsjpizjs0RMaUg1sjmF\r\nuV18PD9FXLourx51V/c4MG5kpavlV+bLUrVMAjbsJY2+k30tCC/XkP5u8jUWmM/T\r\n5REChn7/obPgaeddhuJoILYhKEW3VNrR8Fm9SYiviB3FLhM7URDZ97IBnXYqbvbT\r\nZnvq+E74Zc7HgYwQwrjU/AqQAInhNpAR4ZM6CkWWWWaL96O1q3lCfKJNaxqC0Kg/\r\nkGn/pxYkl9062jtMUz60s9OPDyuisfyl68UyM68Ozyz4SMRLmDVbewOqQAwmAbtz\r\n8p9AQrX3Pr9tXhARR4pDSsQz1z+8ExEd6EKbhMyiTtHtZQ1Vm9qfoR52snpznb5N\r\ne4TcT2qHAkOWV9+a9ESXmQz2bNjgThxEl5edTVY9m4t248lK5aBTGq5ZKGULNHSQ\r\nGGpr/ftMFpII45tSvadexUvzcR/BHt3QwBAlPmA4rWtjmOMuJGDGk+mKw4pUgtT8\r\nKvUMPQpnrbXSjKctxb3V5Ppg0UGntlSG71aVdxY1raLvKSmYeoMxUTnNeS6UYAF6\r\nI3FiuPnrjVFsZa2gwZfG8NmUPVPdv1O/IvLbToXvyieo8MbZAgMBAAEwDQYJKoZI\r\nhvcNAQELBQADggEBAEb6ajdng0bnNRuqL/GbmDC2hyy3exqPoZB/P5u0nZZzDZ18\r\nLFgiWr8DOYvS+9i6kdwWscMwNJsLEUQ2rdrAi+fGr6dlazn3sCCXrskLURKn5qCU\r\nfIFZbr2bGjSg93JGnvNorfsdJkwpFW2Z9gOwMwa9tAzSkR9CsSdOeYrmdtBdodAR\r\ndIu2MkhxAZk9FZfnFkjTaAXcBHafJce7H/IEjHDEoIkFp5KnAQLHsJb4n8JeXmi9\r\nVMgQ6yUWNuzOQMZpMIV7RMOUZHvxiX/ZWUFzXNYX0GYub6p4O2uh3LJE+xXyDf77\r\nRBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI=\r\n-----END CERTIFICATE-----"},{"id":"contacts","categories":["office","organization","social"],"userDocs":"https://docs.nextcloud.com/server/11/user_manual/pim/contacts.html","adminDocs":"https://docs.nextcloud.com/server/11/admin_manual/configuration_server/occ_command.html?highlight=occ%20commands#dav-label","developerDocs":"https://github.com/nextcloud/contacts#building-the-app","issueTracker":"https://github.com/nextcloud/contacts/issues","website":"https://github.com/nextcloud/contacts#readme","created":"2016-10-30T14:00:58.922766Z","lastModified":"2016-11-22T22:08:01.904319Z","releases":[{"version":"1.5.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/contacts/releases/download/v1.5.0/contacts.tar.gz","created":"2016-11-22T22:08:01.861942Z","licenses":["agpl"],"lastModified":"2016-11-22T22:08:02.306939Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"ZqqhqtbHcNB+rzGCQ7FDIjjvHjit+dhAE1UhFgiXApkx3tmPP4nJOBAGNjHe+2Ao\nVcTIX2SrWEfieRrA4Gp+0k7pUPWag1Z0T1OVOwO4cmS1AVFyGIOE1bRvDhMfsWTU\n4CI4oXaKBFAY6mtnf7VJ7EeIdNqhImkohyWDQ88NiPRLM1XNkJJk6AvZBcT0fvCv\no145X4dLpbixSXsN99QFNJ/oXvK+9tBGwTd5i/WnNFY90vcNRLia8aRo7SA0YJRx\nLnxnj2HMqwTTDQEKE+1elYKWsqQ2DeqwScP97UIKe5bZXnrwOi9kH9PDmR4abtzd\nlHL8E1Wgw25ePDeHG7APrx0tVOJy1bP+g8vcarpGynWZoizDkBvYZD+xtxizpBXC\nJsDOSzczApptY6dnOtv0Vat8oh/Z/F99gBUahEu4WZ16ZgR1nj40PDK1Snl18Cgk\nMe1EZcde8SLEpTbCWYIfIw/O9Fkp5cWD/dAqoiO6g+gNxSZ/gGp57qoGfFxn7d/x\nH3aH8GljatAFjrwItw1JzR0THt0ukkOK+bw/pfCslk10sjHMitmz/GXa4qMS91DZ\nBKLUd0dSfQUQzkfwcojImbzJRvca4/DYe3mfG7+RCH0tDL6t72dKL9joB++u5R1u\nVZPgkToexlXcKWpiDB8H2/SEShKr4udAOjR5de9CYWM=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Contacts/contacts.png"}],"translations":{"en":{"name":"Contacts","summary":"The new and improved app for your Contacts.","description":"The new and improved app for your Contacts."}},"isFeatured":true,"authors":[{"name":"Alexander Weidinger","mail":"","homepage":""},{"name":"Jan-Christoph Borchardt","mail":"","homepage":""},{"name":"Hendrik Leppelsack","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhATMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYxMDEyMjAzNzIyWhcNMjcwMTE4MjAzNzIyWjATMREwDwYD\r\nVQQDDAhjb250YWN0czCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANzx\r\n/zJF+5/s4lOJLWIlfKQgTy+UpvIpiUXCgrsHsDZTx+hjQAhIWukH88a+7NVAL7Ys\r\nkQNC0Tlm755FJi/T6EdR7edOwIRdo2ZwakOWLZXd209+6cCd2UloHL0bgnbWepTl\r\nR/4YgbLg/G+FVKCfkEiYc3PuDZ3EVrcwQFcg7h74X9ne6CHH0Z1WQLydxJuVEb2n\r\nX9I+nIRpPHcVostkSiUmzHR7C5TjTIo2PzzgnCU6GC0iBa6z6dDYfz24QEp/b8UA\r\nZaLhjkyKghVGMnoF/s9KPgH4NM8pvvtadQN8pxlOPju4wbmKPUrsXo4ujurDXbbc\r\nYkzNt8ojobGwdTXoyDogAsGZLQd2FQksWpRvY+I3zVPokBfPMdUPLllG5VcV0VA5\r\nDRK+h2ms+XmspdBvGonjF+XdbFm9hEmDoFmoi9aU6C6AdofjmG/e9+pw/20dXUWk\r\nmMorWwXQ5yLmIn5LnpRXrOuK7CS28VRhBYuVNMlsyKhzU0rophbsD9OFXxYLjr6s\r\n7UPNwZ5h+kjXZDBKD89QctBSViT8RhLe8nulRIm0iJn1sb9hca/CF63KmsFzENfK\r\nQeM6MO0H34PB84iNyz5AX1OIy+1wHD4Wrzt9O/i2LkWK6tBhL69aZiBqdLXWKffj\r\nARDCxxIfews51EZFyHzwsw65I97y46aBKxY382q7AgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBACLypX0spxAVAwQIS9dlC9bh1X/XdW2nAvSju2taUTBzbp074SnW6niI\r\nbnY4ihYs4yOuGvzXxnp/OlvWH7qhOIchJUq/XPcEFMa7P03XjVpcNnD3k0zQWlZb\r\ntGonX9EUOeLZKdqI4fkrCkMLScfjgJzoHGYQrm8vlIg0IVuRLCKd5+x4bS7KagbG\r\niuPit2pjkw3nWz0JRHneRXz/BNoAWBnJiV7JMF2xwBAHN4ghTM8NSJzrGTurmpMI\r\nGld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId\r\n52bVrGMxJwOuL1393vKxGH0PHDzcB1M=\r\n-----END CERTIFICATE-----"},{"id":"mail","categories":["tools"],"userDocs":"","adminDocs":"https://github.com/nextcloud/mail#readme","developerDocs":"","issueTracker":"","website":"","created":"2016-10-19T19:41:41.710285Z","lastModified":"2016-10-19T19:57:33.689238Z","releases":[{"version":"0.6.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0 <7.1.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/mail/releases/download/v0.6.0/mail.tar.gz","created":"2016-10-19T19:57:33.676730Z","licenses":["agpl"],"lastModified":"2016-10-19T19:57:33.834580Z","isNightly":false,"rawPhpVersionSpec":">=5.4 <=7.0","rawPlatformVersionSpec":">=10 <=11","signature":"VbMsvDpt+gSPeFM8LrZXEK10rk8kkLlgCcblgqNdCSeGZeVpwDAYv3CccVSLa0+l\nlTSqQ0VIoH+OIU6vIQNBKHmSCzTplk7OrY0+L5FajXx8LnBaOh892GfGSlEt1neN\nKyM0i0uOjO/xpCP/NoUlgkz6hnmYY5XEdN6DTsJtJ/XZhDQ45IYuIkMkHE/eFehS\n0JnOagIz+PSipeBY2Ry+tV8YbRa7bC1JAvZzlod0dyI015AHZESeitRUY+MwMWkt\nN/me7g7/Kev0wggIQQZm9aYcw63GMk/1VHUPB7Y0ESW9tx2nR5+KwTDn/Jy4DGf1\nrg8h0t5I+aPhHOBLrpczH0qaZWY2lsVZWq8KWjJI9aR9P0v2f2aXixXzD/Cuz1cK\nhvhKWkOSla4D+/FxeyHGjQvdXMG8gXm0ZmTimKChCoVuCbncDd8pzkdyNoGXcvuk\nsP8OrkQFooL4E7S4BWfdSiN/a8jUITJQkuXp/OVrVGeCupLWJh7qegUw6DvoqyGy\nD4c6b+qYn68kx3CLaPPiz+tFAZQZQdj7+Kx/lohso8yTnVSiGYrMj4IvvCbpsQjg\nWF3WSqF/K/tTnPYTWb9NUPSihTbVNv6AXOfTsPEp/ba2YSS5DjvjVjkr5vhR9eg1\nikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=","translations":{"en":{"changelog":"### Added\n- Alias support\n [#1523](https://github.com/owncloud/mail/pull/1523) @tahaalibra\n- New incoming messages are prefetched\n [#1631](https://github.com/owncloud/mail/pull/1631) @ChristophWurst\n- Custom app folder support\n [#1627](https://github.com/owncloud/mail/pull/1627) @juliushaertl\n- Improved search\n [#1609](https://github.com/owncloud/mail/pull/1609) @ChristophWurst\n- Scroll to refresh\n [#1595](https://github.com/owncloud/mail/pull/1593) @ChristophWurst\n- Shortcuts to star and mark messages as unread\n [#1590](https://github.com/owncloud/mail/pull/1590) @ChristophWurst\n- Shortcuts to select previous/next messsage\n [#1557](https://github.com/owncloud/mail/pull/1557) @ChristophWurst\n\n## Changed\n- Minimum server is Nextcloud 10/ownCloud 9.1\n [#84](https://github.com/nextcloud/mail/pull/84) @ChristophWurst\n- Use session storage instead of local storage for client-side cache\n [#1612](https://github.com/owncloud/mail/pull/1612) @ChristophWurst\n- When deleting the current message, the next one is selected immediatelly\n [#1585](https://github.com/owncloud/mail/pull/1585) @ChristophWurst\n\n## Fixed\n- Client error while composing a new message\n [#1609](https://github.com/owncloud/mail/pull/1609) @ChristophWurst\n- Delay app start until page has finished loading\n [#1634](https://github.com/owncloud/mail/pull/1634) @ChristophWurst\n- Auto-redirection of HTML mail links\n [#1603](https://github.com/owncloud/mail/pull/1603) @ChristophWurst\n- Update folder counters when reading/deleting messages\n [#1585](https://github.com/owncloud/mail/pull/1585)"}}}],"screenshots":[],"translations":{"en":{"name":"Mail","summary":"Easy to use email client which connects to your mail server via IMAP and SMTP.","description":"Easy to use email client which connects to your mail server via IMAP and SMTP."}},"isFeatured":false,"authors":[{"name":"Christoph Wurst, Thomas Müller, Jan-Christoph Borchardt, Steffen Lindner & many more …","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIID/zCCAucCAhAVMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDE5MTkzMDM0WhcNMjcwMTI1MTkzMDM0WjAPMQ0wCwYD\nVQQDDARtYWlsMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp++RuliQ\nlBeeiPtP0ecBn00OaU1UCpft/NVI5pnSiT9nU4l2kc5IvKjA8UxDB3gWfYTOeBFh\ntUHQ2P6UKCmHZT9sApHhqLu2n0V+YhlFIViuaxndSID/M414cl56xOYQusV3Pcae\no2dOSeRRzLab3tEaVHlkBSFkGmAwPZItsmTklvV3h1sUysDicYgfXPCkf7K+JgWA\nBP7vsWC8B7MDRhcB3enYv5tTcpsyvtGX7bb1oTIWVypcmKsGYfTX12VNBxKzNBIG\n8pwdb8Xo0o14TytWsWN7mSHf1XbwfwYMjDWOlMqiRc+mcoKMBH41TfM/CXslSivI\nsyvxasEaFdlj8lmKPENdzw1OfYRs43usIf4szwyt4rb8ocXfDipnY3P2hccN6YcZ\nl8y8Vsr69ASluDj2A2Pl5vH6xp6tNybZRnN5G6sghhaYaLNDU/TdMyYzz4AY33Ra\nHSaMypfcXjd76Aj8jZvcwk1BH+ZsvFqNK7ZKCb7WVcMH8KRcU1sxZ4rp9vviM2fL\nL7EVtznm3bSI9jjHXbiwq7RvNRRy+F6YRpAdWGwTU8uUkDabPFi41FikYyzNWauK\nJhlDJXl514XjKyMVBjAZYVr5gZZkO1J7C4XzLFbC5UzYNSzW5Iwx/1j5OeYJRxh6\n5rhiUwR+COT1wdVsl6khMC8MfBR4unSd338CAwEAATANBgkqhkiG9w0BAQsFAAOC\nAQEATBvpqz75PUOFPy7Tsj9bJPaKOlvBSklHH7s43fDDmQbJwswXarZi3gNdKf8D\nyO/ACZvO8ANWAWL/WahkOyQtKOYzffaABGcEIP7636jzBdKtgwSGzW3fMwDghG10\nqBr2dE6ruOEdSpuZxgMgh2EulgknZUXaHAMI2HjjtAMOBScLQVjOgUqiOHmICrXy\nZETmzhx0BXDt5enJYs8R2KMYJNIme1easQRYmWKliXogNY09W7ifT9FHtVW1HX+K\nxRS4JXbapjolkxyGSpP+iYSgItVnYzl6o9KZResR4yDsBv7G/8fpV4GQU9IS3zLD\nPiZOosVHWJdpUKCw9V4P1prGTQ==\n-----END CERTIFICATE-----"},{"id":"audioplayer","categories":["multimedia"],"userDocs":"https://github.com/rello/audioplayer/wiki#user-documentation","adminDocs":"https://github.com/rello/audioplayer/wiki#admin-documentation","developerDocs":"","issueTracker":"https://github.com/rello/audioplayer/issues","website":"https://github.com/rello/audioplayer","created":"2016-09-16T05:44:24.857567Z","lastModified":"2016-11-17T22:34:34.637028Z","releases":[{"version":"1.3.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/Rello/audioplayer/releases/download/1.3.1/audioplayer-1.3.1.tar.gz","created":"2016-11-17T22:34:34.215350Z","licenses":["agpl"],"lastModified":"2016-11-17T22:34:34.867778Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=9 <=11","signature":"p6Zz0IEFrxvw6y/3jHgGWWCxR6qpMzvU2HKfxcIVsK6sJnoRUhWLeAXwZ432fH2a S2llj+IGS9OvW+5VQElrXgPtEjDK1BT00DRJnp5RFCRlUv0LNoedJMzx6B6AHqPP JBufk3cG1O/CO0M0L1ITGSmSOzfKvWTRo3lxVGF792NyBaP/SyZCkH1N1TzBQzUi Ywl3+HiglPcXbHjtJm/arnKorbJWVKoaN93xFuaBapd2ozQSpi0fE0uGRsici+U7 HNa1M5WFE1rzUJoufE0E9246At07rFY1e+TdNEq8IlLgCXg5vGCKkEyuWpWno6aX LfRaIiT9x39UTAwNvuDKS0c+n4uWDYPsGfKhDx9N7CXpUrthfXVEWRzZEXG7as10 6ANvrRPJemSZH8FUSrdJhD7k12qa9R825y7mIG68Li8P71V92EOxFfo9tNXqXwBt VuDGxBqByFVPqSCj5I8hrzJzQl2Xt40g8+8ZcSF96RMg/pM+bwRMTv+mz0V+vQQ4 DWjqnWVPalaJ1PPD5/QFFErtXuNRbyxKZ6BMWxfJlLM9Kz66P75K+8fYaSwz+2KG NxY7I3svzS2K9LGH3fBLUy1t3Hl+c3zGFq/ll1MJrf9NswV4yxt2WmISfM/KDww8 yELkGs2cRzbw2tCvnmYlJJhIqRLkyFAbDzWRH/XdVx4=","translations":{"en":{"changelog":"2016-11-17\n- fix: one-click-play for wav not working\n- fix: wrong sql statement for PostgreSQL [#90](https://github.com/rello/audioplayer/issues/90)"}}},{"version":"1.3.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/Rello/audioplayer/releases/download/1.3.0/audioplayer-1.3.0.tar.gz","created":"2016-11-15T18:11:19.539636Z","licenses":["agpl"],"lastModified":"2016-11-15T18:11:19.592881Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=9 <=11","signature":"lbp7wd3JhMHW5mC8kVnQFvcwzf3aTIhYhq3ak/C/vfDXJDIPFuQ1odVRWtaHXEKQ XmKYIoTobV1TAU5q9G0O0Kds73T/XtHG4ATLxMZE8RsUWNSj5v3H4YDub6A0uoX6 rzyLEYV6SGEtdPFMwLcUjDExKpzAzKpgxcd9uyz2NhcHJEO8FJmirn34bm69//TO vjjiMW4zpL+dho+7LQbOX+L1SmwmdBqwypE9zzeuIuhUWDEQtImHAvjIO6Temajm lX0H5JaowJa8kvP6Jkh3KAvsHQ4sJklvWTPGcv0gboN+o6CmjWNOb+3LeSH0nhe6 BmiPloUDJcPQwq2gQejH2pY+qJEdRcULSKS09/dRbE3gOSlG36FThN0INpv6uNP4 qVIiYs3/SEHMmlS5CHvJDt2S2XN9LT9IX7QPeuS/0CMcuopaG/+cdC4KscVCq4D4 bllgew9asiBqix8iV8C4oerYOiC5vWcgBrZhGShoJT1Qq+NKz+H10dFgjFCAZuPj nVagJkbXmf2NdcvpSC7qsufhyEZyCSp+I7QEYsbo1PW3aUU35Syt47lgeVFX0hVQ jC1wMIhEW5Rm2nCkRSZkRupKDQ+N6uWuB0lykeMV2ShcDvvUZrhN3c49sooWgigB yIqKryzM4fLErjjNHdYgwCq6bbgPDLK3ic9b3B4rF3E=","translations":{"en":{"changelog":"2016-11-15\n- fix: handling of temporary scanner files [#68](https://github.com/rello/audioplayer/issues/68)\n- fix: simpler analysis of incorrect files in scanner [#57](https://github.com/rello/audioplayer/issues/57)\n- fix: album sorted correctly by artist and album [#80](https://github.com/rello/audioplayer/issues/80)\n- fix: neutral cover for unknown album [#16](https://github.com/rello/audioplayer/issues/16)\n- fix: error message from ID3 editor shown in front-end [#77](https://github.com/rello/audioplayer/issues/77)\n- enhancement: occ support for library scan and reset [#72](https://github.com/rello/audioplayer/issues/72)\n- enhancement: select a dedicated folder for scanning in personal settings [#79](https://github.com/rello/audioplayer/issues/79)\n- enhancement: exclude folders from scanning via .noaudio file [#79](https://github.com/rello/audioplayer/issues/79)\n- enhancement: significantly reduce database reads during scanning [#79](https://github.com/rello/audioplayer/issues/79)\n- enhancement: cleanup of classes; move from \\OC\\Files\\View to \\OCP\\Files\\IRootFolder [#72](https://github.com/rello/audioplayer/issues/72)"}}},{"version":"1.2.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/Rello/audioplayer/releases/download/1.2.2/audioplayer-1.2.2.tar.gz","created":"2016-10-06T21:21:05.414691Z","licenses":["agpl"],"lastModified":"2016-10-06T21:21:05.483224Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=9 <=11","signature":"toeS45z50Lm0djgrQokOTN7gA8a113IZtiKKiLsGUKWrCV/6AKJBmEFcSun6rhLH\nbz/RtIdFKwQql6O3E0m1Zch2y1A8aLWHzFTO+5orLCVi7y15SshrJYbb9aI5Pj3i\nSR7+kMHGS8uNx2uIn3B4mO6UYF8AzCfp+ule18DOjnpu86KWvEOGtFXsQkLtgepp\nbJhOGWW/uOVIos/T1xPP4GCmtVmgn7U3b9q0pMYRH7ONXEiNsfQxDrR66EZH3Jfo\nlVyM9UvQmMKoDSdBUlvLlhCEGJGqFOD7hFntLYloI4oXv9uGqcagaJVh3TkEysY2\nMbBZpVhch5zRJ/HGlZOvmEzZ8Inxkk3iap+JmJ5/gZTefwfKUyYHALsILlh820U2\nNA/1B5A015XH5a5uflGE/tnlPtrOeecIN4mg+1njo2RG89HJWJNHM2ZDO4SkXjSR\njgygmAS5aR5+KKifiA/pwjhLozDWPU4lNzsj3Foz3bx3Okopy7eq83LORqieT4Jp\nFvP64q/45LOSRBWIWLitYzRzZp7HYywMsnz12WpxtqxIjO7+7y/ByeWWOBNU1IJC\nK2D+035ZGWZr0CxDJte33WOISwjVoSwrcov++O3BQW8lM5IkcDNcJFyzNPKAXcQU\nPUXmQpYurHoIw6odAYcbrG6iOiSesuNOf2kQWbjV3/c=","translations":{"en":{"changelog":"2016-09-18\n- fix: icon issues with alternative apps folder [#65](https://github.com/rello/audioplayer/issues/65)"}}}],"screenshots":[{"url":"https://github.com/rello/screenshots/raw/master/audioplayer_main.png"},{"url":"https://github.com/rello/screenshots/raw/master/audioplayer_lists.png"},{"url":"https://github.com/rello/screenshots/raw/master/audioplayer_share.png"}],"translations":{"en":{"name":"Audio Player","summary":"Audio Player for ownCloud and Nextcloud","description":"Audio Player for MP3, MP4, Ogg, and Wave with a lot of flexibility for all your needs."}},"isFeatured":false,"authors":[{"name":"Marcel Scherello","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEBjCCAu4CAhAIMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE1MjExMjA4WhcNMjYxMjIyMjExMjA4WjAWMRQwEgYD\r\nVQQDDAthdWRpb3BsYXllcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB\r\nALyC+iLscLs62NeNmUXEBmg+xMuUtDmZKr+xzJWtl6SSNRz+8K1JygvUIXFJ3RIL\r\nCYA3xyq8/wyZH1gNrLKyz5eTeYawG+eT3ges/FT6MWGUbZoRrBrikVcLC94QzxTH\r\nxOl8Dn+SCV/2bhcvPTQdhK+dqtvGilOtjHa40iMrk9gSdlKVys5CK/xdlEp8uiMa\r\nkz1WENn8MVCCJV58bAUbaCupDWXR9CCoSsw8XinNsCenZ2B2XlnmbM44280w0ojs\r\n72rfQRgj3yDG+ZUUyUOuxIuodu8liXYciLf0ph6t/f/qoSmctbBdsR5Fl1Upj1Ac\r\nqeHb5Yf/B3Vi6Mn3XfDx0H2EHk1v9Dhzxay+v9BHUzyIX2iH/q+7TE0/Jzo5AwBW\r\nvFKWXvG7wXaALcHYZf5v/M93IE0iCHsv2EsZKQPBnzXVGmp4DwFSP4po1B7hcog1\r\ngAMaellAzzvUAizgCovN6Qct3qDEANYniPlvtnlcaQGonajW4N019kFQRHLIzPFR\r\njab5iUMMwSnT8FhZO2ZOWuWhJven+gXjxC8mfMVgBfZnAVgydNfx9rN+KzTc88ke\r\nobUdZ0OOeBzA7pIxGEFg9V6KTEEWZ+qH048vxXz4HI9B1I+2wQLBrZl8CvweEZ5U\r\n5ID8XrrE/UaNZ1CvLKtCgB24gj/m1Elkh7wA3gEcEo2JAgMBAAEwDQYJKoZIhvcN\r\nAQELBQADggEBACtgUp+FCmjWIkQUuWSdzKWdO+IH4v9wBIrF9mo0OLIakFyDYyM5\r\nLlkYZXbplGXd4cfn3ruIqJNzlIb4xa5CU0bM4TMbD4oOSlLMKM/EamKPHI3bzr++\r\nzi7mQDFxmAE6FWSMBgKKUb4tqLc5oBap8e12tPEZl/UR6d9iUB2ltvrm3T3vrjjl\r\n2Worm0eYBNqnagXmX5+wS11AQqeJemGqRy5e1yXRlTgB0IJhH0dCsFNwifEigutp\r\nFNvGFVBn4r5qCiChEoq+rCXHRjPi/eCfbW21XeLFDiLxapcZyc85JIcA7znUYoFe\r\nP7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI=\r\n-----END CERTIFICATE-----"},{"id":"calendar","categories":["organization"],"userDocs":"https://docs.nextcloud.com/server/10/user_manual/pim/calendar.html","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/nextcloud/calendar/issues","website":"https://github.com/nextcloud/calendar/","created":"2016-10-01T12:40:39.060903Z","lastModified":"2016-11-22T20:31:13.029921Z","releases":[{"version":"1.4.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/calendar/releases/download/v1.4.1/calendar.tar.gz","created":"2016-11-22T20:31:13.020268Z","licenses":["agpl"],"lastModified":"2016-11-22T20:31:13.087340Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"nThwe9CJBCan9nuDLdhfBiQyPhmum6Aa0UcYsIDdhGMw+C2acf81KhEmBJuTTWxo\nWGby6WcrcJJmeuCW+ePU91ju7Pd76RirprhVXIEceIDzSCxin+K0oZCZ1IGVIJjP\nIkVehTsLuCeTBbjvz1b3k5QFyhUhvd32Xt7k5d7VARyI4OqnqYYNBtH9vvgeRrFw\nAxsQr4o4axof6i3iykLg6WfWarYArY4dIuu5DkPuGPWf2bbgjwWEra4sQejhOs7G\nsk1xcsfYv2NpArIbpw/wnATdjiax+Gjz1URMD3NgL5ky0ecuZmNvN25QErg3nlVr\nhh1FBfA5pvCJbkJ6nr5bU4bKaffwDX1nr5h77FS5zzn0Pyd7ZIExmVmNtaeJfnfV\n5vnclapzXMNU+R6t/ATJQd1srvSJhyljQapzsqnrjNMEUojOEvqqygJp0KwNVPqs\n3g9XGSoOnO+WULWBeISW7UVOg8BOF8pwvHIU2++bSzOdpypW0Eq6p2DPWO6qL/H1\neFLKrUg3EvnTjvknbBxMB55h9jNJr0SAlkrmyEVm6+CE3BwRWpKB+cJMBuGiwPwv\nr/ASRiJrkDThbNWAUtX70rUmCqDV6/MujLXViqOc/Q2OHvcXd1oGDccJSQT92/1z\n7nonnedyYQIDqUt7u68WL8JRxp7pFsEqKLVuWSgxW3c=","translations":{}},{"version":"1.4.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/calendar/releases/download/v1.4.0/calendar.tar.gz","created":"2016-10-06T19:58:12.724588Z","licenses":["agpl"],"lastModified":"2016-10-06T19:58:12.790604Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"b//hJbICFMLR0Va1BGMzpLpaPREOo9QhjgfrHvDOfXVpddhvCM8ocz74X1s5hKyy\nGg67EE0pOp0dBf6RyJjduI+Dz1wQX55My7J9G1vXGCN30C/8zAcKSJoA218IWcub\nICavLkz2PkiitIOSZyBCAfEiSAeHPop/JGkq3KxQDC7QwFC78BnE9/adD9tO55c/\nDGLhvP/uTJIeH8RUifikTqVMmPH+aP3uPbZzl+AxhUezRiNCpEtZPA5QGqtQdJU4\nFc6x3d9y4IWbJV4TEIAP8jdfqtLVUQ6szFVnN8Oi1wtN9e8LIylBSYbmIZRj0+qh\nZcgntzEq6U843ZwXcAnL5jNYV0m+KNI+EkXFeWHkjvbwfCdvGPBvgFVbhc0YPzXU\nqHOe4Lvcx9X20ALG/MacV9zX69GzNnWgbBp9RnIHuaSRPFEKrNXUeXl2THuKsTyQ\nF9QtTwS5U5DcMyTO2RAN45NrRxIh8IL4stoIg5rmF7/ZaOm/Jza2gnUquOTarDE/\ntiWnNW5kWUAWyYYHvQgQix/of9qXvc2hhZaw0y623WDNrEwA+rngnjDMLA/vNv3B\nhgwQ6NbCOuHWsRK3S8DcJFpB9Kj/i7CDvDLEuJYnjSTvQ/q1XqawbJPDoRlydX43\n3/L0LvHvKVakYybv2OE5gy6bQ2Dw8e7D27DtZ6XTaBY=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png"},{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png"},{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png"},{"url":"https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/4.png"}],"translations":{"en":{"name":"Calendar","summary":"Calendar GUI for Nextcloud's CalDAV server","description":"The Nextcloud calendar app is a user interface for Nextcloud's CalDAV server.\n\nIt integrates with other apps, allows you to manage calendars and events, display external calendars and invite attendees to your events"}},"isFeatured":true,"authors":[{"name":"Georg Ehrke","mail":"","homepage":"https://georg.coffee"},{"name":"Raghu Nayyar","mail":"","homepage":"http://raghunayyar.com"},{"name":"Thomas Citharel","mail":"","homepage":"https://tcit.fr"}],"ratingRecent":0.944444444444444,"ratingOverall":0.944444444444444,"ratingNumRecent":9,"ratingNumOverall":9,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhARMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYxMDAzMTMyNjQwWhcNMjcwMTA5MTMyNjQwWjATMREwDwYD\r\nVQQDEwhjYWxlbmRhcjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMm6\r\nFTeqgzCXprkU83VM4/DrZWn3kqtfaR/edkC4gYT3ug7RHa/Uv1C/S++vr7pvgpnk\r\nYzQoavl/0Qlh5sKEYX+0ud/LQDoiidwBRDckFUQ1bRfVLxAD9UAVvDRHxDqJMOx2\r\ngZArbeQ3ztdSHZp4ThzBFWq2FILsJD86weG7LwHjzhW6SWgLb/YTLbuuW6tRCDVV\r\nbtB0I/a0vCwj2u91Chw3u6pWWjPakc9DQrIDH4HCIBKQ4zVrYDxAmJDRFGDvVVWx\r\nuIAeux8sd8drqSMqAhX+XMcZPRD71NQTWbCupSwWO8kgjmZnBpIiBNpzvMQzJf3A\r\nQloZtjZ2RDXAQG88eTeT8pp8yEOCEoDLpGdraKxJrh/z2Dsk30JP3lOiNYJ9vBaB\r\nC8NJbJ3oAlG7THwUaFF9fsdAKoTwzs5Xms04TI7W/v4Z/GClOzMymnR1T4sR72Oy\r\n3WaMNHv/1QGffvQn2/TtZt23Ou3P083xWx2vn5FgTcac8+x85vRgWsVCA4hq9v6m\r\nAlktB0+UWDEXpDTKD9BdFNWM8Ig9jQf7EJrvTLNnS7FIJZMB4GK8lpvPxyvACWnh\r\nR2hQOe987Zvl3B1JZNO5RvtSeYld9Y9UfMgW1aPRweDNjSuZYAKlugx1ZoyI5HyA\r\nQjfzAwicIMwZsCJDV/P5ZO8FE+23rdWaoJczpBqDAgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBAHQXwvj8q5khWR/ilg3JGYpmMNBYHE9OeDaOcNArkKaGMd478SDPOXeu\r\nyW7hCvNEpiTk5g0h3g3yleZFws0xH8fPsQgZANgvQXb3RCcD61NL77d0cMTr7Xzr\r\nN3Lq/ML1YLc/WwL4uV1XvpMQMwALFL1p63BU2c0ysO31zbLOjMKAJi0hHFDYz5ZQ\r\nD3xxtc17ll3B5IqrMnMHRqmOQ39Sbe56Y7T4agaIz/sUWpseo85D5kt7UAIOR+Mr\r\nQ0Bl/QinETk72afGR46Qvc7tC1t9JjQQD3AUbEGuJdGvXjJJ9GREYu01XoODmPdT\r\njXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0=\r\n-----END CERTIFICATE-----"},{"id":"gpxpod","categories":["multimedia","tools"],"userDocs":"https://gitlab.com/eneiluj/gpxpod-oc/wikis/userdoc","adminDocs":"https://gitlab.com/eneiluj/gpxpod-oc/wikis/admindoc","developerDocs":"https://gitlab.com/eneiluj/gpxpod-oc/wikis/devdoc","issueTracker":"https://gitlab.com/eneiluj/gpxpod-oc/issues","website":"https://gitlab.com/eneiluj/gpxpod-oc","created":"2016-10-31T10:57:44.387319Z","lastModified":"2016-11-23T17:27:37.793159Z","releases":[{"version":"1.0.8","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":">=9.4.0","rawVersionSpec":">=9.4"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":">=5.5.0","rawVersionSpec":">=5.5"}],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/963bbf246412bcbe8979bccadb3b8d03/gpxpod-1.0.8.tar.gz","created":"2016-11-23T17:27:37.783365Z","licenses":["agpl"],"lastModified":"2016-11-23T17:27:37.862469Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"hqhMh1l/mnwbYf4uPzEjjLFtZWHidzgR57X471OuXv2K/s87T5WhIkTSKk+2r8sp\nS7CtrF5+Pc5AgCCHvwzawN3e2+4eO4cK0+HD9CCzygzzHZEbSjufNHMMQucVoSD8\nPqR6MV9azzUpwHa/5d8fp3cFLVAle+aG0o4v5eHky9c7eaKxVJcgfjw3pjDE73N6\ngJVdtw1jf1kOFYk5pZQxDfBKFDrO5BRo5ZfZGuOuP2u/SmTwj42oTZiT7oTVWhqd\nLvJw+2TPv7B8s0Gin+J5e9K1Rs6CEWQ6WBxM+NhS5KgWB5Ig3pwm0QvMgza2cvoh\nlwVobOotfKLUBJzg0+wR7B2YH9Ao+m94h93vg7H0OKPReoTKhlDj2UExoTyeurV8\nhJdQv8sKVAxjC7/xrVaGSjM4YxFdBpzq8Zl8z4zq1o2voH5+u4ko3c62C1loDpsC\n8KrL1t6A7QpMk/XAMrPqwEPmFqlLEdv6FhzpOGyt4IEVnv6vdMTShcYw3tPvU/mD\njPtiVwpo8gWbGVIfpmwBg4wPaTrWK8V3+/1iTahIQHZfu4Lebb5mzht80HLQIcd8\n+oB4cGDEX4Rix1WxnCmE5ZzURY8xQXcvqYN+mTrUDh/3OtxQPSm5yC945SGoFNpr\nBYxfEyQcwulZrOMBdY0Ssj1AB5NOeC9OHwjJrnVe7dQ=","translations":{"en":{"changelog":"### Added\n- save/restore options for logged user\n- option to choose picture style (popup/small/big marker)\n [#25](https://gitlab.com/eneiluj/gpxpod-oc/issues/25) @eneiluj\n- add average speed and average moving speed in comparison table\n\n### Changed\n\n### Fixed\n- bug when python PIL is not available\n- deletion of bad parameter given to getGeoPicsFromFolder() in controller\n [#20](https://gitlab.com/eneiluj/gpxpod-oc/issues/20) @eneiluj\n- bug in file cleaning, bad use of array\\_unique\n [#22](https://gitlab.com/eneiluj/gpxpod-oc/issues/22) @eneiluj\n- python script do not need to be exectuable now\n [#23](https://gitlab.com/eneiluj/gpxpod-oc/issues/23) @eneiluj\n- jquery.colorbox was brought by \"First run wizard\" app, now included\n [#21](https://gitlab.com/eneiluj/gpxpod-oc/issues/21) @eneiluj\n- avoid JS error when failed to get options values by ajax"}}},{"version":"1.0.8","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":">=9.4.0","rawVersionSpec":">=9.4"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":">=5.5.0","rawVersionSpec":">=5.5"}],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-nightly.tar.gz","created":"2016-11-16T14:06:33.937534Z","licenses":["agpl"],"lastModified":"2016-11-16T14:06:33.971502Z","isNightly":true,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"JtUhKRDFGYDx9xtHjdfEUFOb0O4idexUYw6ixlBhKPP8Dn7NfyBfV6KH6MJTIVLU\nQ5Jw6tv/Nr1YDOvVikcWPG0p23mQdn1+7w8DzzIGKmknxCat9/vKr83oJZdWYxS7\nTJ4I7qTvWNlbMfK8OEdl13VJXgc6ftX+1isluLYqLjEm3aBFCS+/awYNMmXO55a1\nyG0NgJRu3pw1CBCMhDaRLsunhpRNDVLsamZj1SPmeT8qy0I/arFaG6hQnAo6JosE\ndi1XkvK6TEt9g16L6eizd+JpGE7xiWFP9ZEmMmmQSOLQYwU5Sk1YWcrW3EX4vtz5\nWnEIC0SENyyAyzBO6YJfu/EP2lLnlbNJiuc4zzKLqRw/zyz3j+imJLcXHIA78ZkQ\nuyUOBkkk3xeyBGeUcYfDuBqYQOQs+F/7+cNMsIBKJhx9ef3OPURBc7X16upk3mxV\n6GsOktbHkgUwWk3WiXRriBIqbAZocvDp0+PN++PAEZVWFEZEJzztd4Fxaeo+QSN5\n5Pz/9yXYRsoSPZv82Tlh7dx5tIPUvYb+UsANh5eGWUGufTSwgYBN0H2KT/iO35D7\nkDzNyh1qNakfBhAgPjrC2p4mBKBJJjlM0D9erDwr5D4GSTW2fp92vlRHeD0X8sqo\n3kBbwGuWnmhdJhbd7zYy0jVM6tVX/zgbhycimNALG0I=","translations":{"en":{"changelog":"### Added\n- save/restore options for logged user\n- option to choose picture style (popup/small/big marker)\n [#25](https://gitlab.com/eneiluj/gpxpod-oc/issues/25) @eneiluj\n\n### Changed\n\n### Fixed\n- bug when python PIL is not available\n- deletion of bad parameter given to getGeoPicsFromFolder() in controller\n [#20](https://gitlab.com/eneiluj/gpxpod-oc/issues/20) @eneiluj\n- bug in file cleaning, bad use of array\\_unique\n [#22](https://gitlab.com/eneiluj/gpxpod-oc/issues/22) @eneiluj\n- python script do not need to be exectuable now\n [#23](https://gitlab.com/eneiluj/gpxpod-oc/issues/23) @eneiluj\n- jquery.colorbox was brought by \"First run wizard\" app, now included\n [#21](https://gitlab.com/eneiluj/gpxpod-oc/issues/21) @eneiluj"}}},{"version":"1.0.7","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":">=9.4.0","rawVersionSpec":">=9.4"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":">=5.5.0","rawVersionSpec":">=5.5"}],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-1.0.7.tar.gz","created":"2016-11-14T00:57:37.521001Z","licenses":["agpl"],"lastModified":"2016-11-14T20:35:45.363487Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"SigBof6QJZ9IMZyFgc+B3LO2+EXaAPvnxUHjJQjIl3jLzomocpDGR6WjO6gtvB81\nzXUHjJ8+huc+P9TvgjUGRTmn9a/29HZ4IKTXnYBKIUY7wSLcJNMbJSp2Zd3OFHAG\nJwRaEdh/cIRk2X6NE1VT6dFCxB+LhTM4BXOEwuNYQvU1lZDVQgTz/r68zFLWBt6R\nqhBCNJHrVp87ecS4+XaGq/CfT4k1ihiOv+f4eX9iaPzUhxBJ71iYKF7wHpDoVmIk\nNrzWFUJH3BLBuW9oiC0PApli6Xu5RXrWUsOV7OAmxXgylRCPuTFwe09hw16JMbiS\nii8WFiUtp4qW53+7eoS7Fllm7CRi/Dg6Jvjtp3msrf1m+OiYM7dLyoKw22/S4P/a\nBIErZpSCHaCfrZ+DBXrAYcas27GWE7HizzG3yXk3aDJMa0Otcsq56bSPo01JDfNx\nm1y9iuwmlon8zKKoxsJCwxaFDnQpqazaLcUO0ATHUk8LdomTA7MCXVvNFPaO86Ea\n16iyw7Cfs0k3GrvN71+SdpvWss359CEEwBMpDwJZqwSFbLRyHtogUgbRWLIJqR4n\n5uVvJqirxWkr/EtXw6UkDWAI3ZoMhMRtjn4H4ekANP5mC8R0yp+UuFs2RkEC5uA0\nKzzh73WmxmpeUl6jcMZ49gXn3PTCC2fJNrdmSYch5Dc=","translations":{"en":{"changelog":"### Added\n- option to choose waypoint style\n- show elevation, lat, lng in waypoint popup\n- ability to display geotagged jpg pictures on the map\n- pictures slideshow with colorbox\n- pictures work in public dir link\n- use NC/OC thumbnails to display pictures on the map\n- options block hidden by default\n\n### Fixed\n- fix bug in geojson generation for waypoint-only files"}}},{"version":"1.0.6","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-1.0.6.tar.gz","created":"2016-11-07T12:11:00.619161Z","licenses":["agpl"],"lastModified":"2016-11-07T12:11:00.699921Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"WBts2fm2rW/7LMHYjcx9a0k0WTXV6PnGRxTl+158cjfV7ruMpNvhK58iTjrox69k\nFWAoIi1wNAlLBu9Xet1j7HKi4TC9q61IEN+lPlnwBCu0uHawiqS2gqB4i8A019Ei\noLsgAPWh8ndy6+gyUtPhVLVduLH76aT6KTwAiHPknV0zPtxsUy1P6nbbNOS5A5rG\nSQBqljy0TbcjOctTudEPp1IqjJIwcd12eZ9MLG4CEIO13n53pMAsuXJf4jnKSCm0\ngimvsFOwFRjBab3ZPwtOqeVw6aIh/lYF3U3/k8YBpaDN74m30nDtkp8teXBgshSY\nVYvX3yOAYe0PIR419IX0eoHb61K0VfZYvPT4FsOqjDr0zlVB8Rjq+6SiK4vMD2+6\neGE0aHbjR9HV5jymUnFYdm/hlhcZGaKrAiQKfBY6Vh0SWKfIv7bdGfQYauePAdZt\njlsV8lIwOy7FGAeP81CcjzWWfDeBgYr+MSzfoDNoTi41MvUaT14iWPIU/s5P1/Qv\nALGxgsbmB19wEgNbdh1UtTUY3xARLpWPYdUqU7yDcsddX9vCoCG2G5wCcbYJRj8o\nC+H7wdgPJoiMY/p4Go/lyWkvmzhfXrOeXytZIFXjb3ERVd1vD9WSt1DSy/7gsFYt\nxzzOPgqMvL3BbeluNuzNv366oT872s3OuFKa1ZOYY7A=","translations":{}},{"version":"1.0.5","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.6.0","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://pluton.cassio.pe/~julien/gpxpod-1.0.5.tar.gz","created":"2016-10-31T11:08:41.017766Z","licenses":["agpl"],"lastModified":"2016-10-31T11:08:41.068782Z","isNightly":false,"rawPhpVersionSpec":">=5.6","rawPlatformVersionSpec":">=9.0","signature":"UXeZVh5f0/WZE+r/dHWc1pu9q4qr/zACX6XraMhhIuKIp7vNCwUESeqJtVc99QZw\nw9kJp0isvib6l0zbQBRS1vI7xwKKBQyeaEhIciEs1JjsaCiato1Gyi26N+fY2N0Z\nFWlTwCsF3DdlwERXTYfeCpsOWCoxLxHKhnJIjUc0PVme/Ste4zxYj+5Su1RpadSw\n4vGnkW8zy/0tzua50NQCrOg+B4jXzH9kMWAP47w3sdP5CYalHSHl8EX0D1RjgGU5\n7vZYX3wF853FvQDbL4JXXCJupj3wZe8py8McWpQIcgz1p3KmE7A7d/rdNWExT+T+\nDxtStJ56qTRMz4aFwoSFxJrrEfgHIsE9Gv+Vo7nshCUYA8gkfHeckiaUtH1EiFTh\nVNeO6mTIqGpRosFvfUrZMKcuF5j74vGQjNM1o+M5N31gtLoPSkU605f/U4v+j2oC\n3/N1rYF2SEDFO0EgAGXaXVhB0ltSDkHJw6vZJ1L8Qz6tooUMDxaMri8vycA6LHvE\nqN+z+S6TXMfLvN/6ATYPGhicrWmkMT/k7v1az/hcnfH+zRyLZyFx94s88JWF7Jf+\nI+tgDbfqTMAIcytJUC+KfdQW1ueXh5F0owrOYM6jgBRvhqj1T8s+Twgw8orGmRPe\n9h8G9Z3wZAooQvmC0KdVhLuOeIkqt/S5krELNFFBRnk=","translations":{}}],"screenshots":[{"url":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/db5af6ba7ae1cd4d22ea81d418f5c762/screen1.jpg"},{"url":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/123588561a8067185572a8d1887ef906/screen2.jpg"},{"url":"https://gitlab.com/eneiluj/gpxpod-oc/uploads/427688b80bf8428dd45bd15d69b19075/screen3.jpg"}],"translations":{"en":{"name":"GpxPod","summary":"Display, analyse, compare and share gpx tracks","description":"\n# GpxPod owncloud/nextcloud application\n\nIf you want to help to translate this app in your language, take the english=>french files in \"l10n\" directory as examples.\n\nThis app's purpose is to display gpx, kml and tcx files collections,\nview elevation profiles and tracks stats, filter tracks,\n color tracks by speed, slope, elevation and compare divergent parts of similar tracks.\n\nIt's compatible with SQLite, MySQL and PostgreSQL databases.\n\nIt works with gpx/kml/tcx files anywhere in your files, files shared with you, files in folders shared with you.\nkml and tcx files will be displayed only if GpsBabel is found on the server system.\nElevations can be corrected for entire folders or specific track if SRTM.py (gpxelevations) is found.\nPersonal map tile servers can be added.\nIt works with encrypted data folder (server side encryption).\nA public link pointing to a specific track/folder can be shared if the corresponding gpx file/folder is already shared by public link.\n!!! GpxPod now uses the owncloud database to store meta-information. If you want to get rid of the .geojson, .geojson.colored and .markers produced by previous gpxpod versions, there are two buttons at the bottom of the \"Settings\" tab in user interface. !!!\nGeolocated pictures can be displayed if python PIL is installed on the server.\n\nGpxPod proudly uses Leaflet with lots of plugins to display the map.\n\nThis app is tested under Owncloud/Nextcloud 9.0/10 with Firefox and Chromium.\nThis app is under development.\n\nLink to Owncloud application website : https://apps.owncloud.com/content/show.php/GpxPod?content=174248\n\n## Install\n\nNo special installation instruction except :\n!! Server needs python2.x or 3.x \"gpxpy\" and \"geojson\" module to work !!\nThey may be installed with pip.\n\nFor example, on Debian-like systems :\n\n```\nsudo apt-get install python-pip\nsudo pip install gpxpy geojson\n```\nor on Redhat-like systems :\n```\nsudo yum install python-pip\nsudo pip install gpxpy geojson\n```\n\nThen put gpxpod directory in the Owncloud/Nextcloud apps to install.\nThere are several ways to do that.\n\n### Clone the git repository\n\n```\ncd /path/to/owncloud/apps\ngit clone https://gitlab.com/eneiluj/gpxpod-oc.git gpxpod\n```\n\n### Download from apps.owncloud.org\n\nExtract gpxpod archive you just downloaded from apps.owncloud.org :\n```\ncd /path/to/owncloud/apps\ntar xvf 174733-gpxpod-1.0.0.tar.gz\n```\n\n### Post install precautions\n\nJust in case, make python scripts executables :\n```\ncd /path/to/owncloud/apps\nchmod +x gpxpod/*.py\n```\n\n## Known issues\n\n* bad management of file names including simple or double quotes\n* _WARNING_, kml conversion will NOT work with recent kml files using the proprietary \"gx:track\" extension tag.\n\nAny feedback will be appreciated.\n\n "}},"isFeatured":false,"authors":[{"name":"Julien Veyssier","mail":"","homepage":""},{"name":"Fritz Kleinschroth","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEATCCAukCAhAaMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDMxMTA1MTI2WhcNMjcwMjA2MTA1MTI2WjARMQ8wDQYD\nVQQDDAZncHhwb2QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCq9p5l\nzNzR98l/xPgrplWrGQBhF6aQSLpnIyCdLAYKk+CmXn47W1pHh5CRYyCCyB8YPBBG\nTwbpP69pP1updfK2vUt+ShYmCXLxOLB3qEdhnwgqFfwpC48Ocev9d6XcacYp7jwu\nRNtv0ocMkm5o0TWWupcutQWkmqzCVq+OkrqM0xrf3mfPymuM6edEREshukoL86Ei\ngTuMMGT0XO99LikszvdceNQYEATix1MHzSVhkE7jHCNBXb95H6nQGr0v7R1MIbrI\nGFlgqxwwNNKwBFNfPMWZVnKwz9hoIwW6WOuu7ntwVcPqwB/gUsRZJTu7EjIW0trX\nnhA6xLlc4X66W1sdUCkJOxsV+Y21akz6wynI0SzIfjALLI2Ls4QWrPM8GOX8nPVM\nm+Y5WXzqLJScdWYoefFJKS7kxwUJRewREB9ykCG5OdDubV+Iu/6jh6HWx3h4p3ih\nqkDypPWoxpfLgA8VZkLD1RRKGkRa858QBGdF/RHbYT3JfLEp9l9gJVKZE/yw7HKk\nwsZ/T6CMpLyorpd1XWtp2wLX8lr3pp9ecVDOdAMSqD2thDMDsZA82JrJ/vITwkCF\nBlqtDZmT0UnpxYNYTfYBam5Cd00jsqCt+Hr+QkODNe8Yae9c/D0zE3h2Vt7g9H+W\n7Ei+rF5nDYTBAApoETxK7+aUZpycBf3THAJOcwIDAQABMA0GCSqGSIb3DQEBCwUA\nA4IBAQBbCGAEwg3M5QJDMnZgu0zNOH2f9bamAS9ksyCZqzLoeQic1W7GYYe9NqAi\n7lO5jXRZpTN4L133IUQPtxCxuDooD2vFmCne92tLxJbc7uqlSVfhL8uMVOlnrA99\nKTAhySTZU5so8/OibrngnBmcdWwbhaWoCQ671M8aXM1wg2FVYDqB2GP3RvbpW11L\nOc+4tfh4mO4TwXygf7KYMOJyJW8mNNY7PZ+XW2Qe3vSXR3DuN8H8fgMh5wppXPJf\nE0+yNs42hwFjSojtI8BCb0s5DTleaakpDo8HQGNzEXP8tBlUYudtjzdP0jxFXbFa\nsT9pcMdeJ0/t5HqJSx1EjUCLYS4y\n-----END CERTIFICATE-----"},{"id":"ownpad","categories":["tools"],"userDocs":"https://github.com/otetard/ownpad/blob/master/README.md#mimetype-detection","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/otetard/ownpad/issues","website":"","created":"2016-09-29T15:58:52.814912Z","lastModified":"2016-11-19T17:37:52.278497Z","releases":[{"version":"0.5.6","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/otetard/ownpad/releases/download/v0.5.6/ownpad.tar.gz","created":"2016-11-19T17:37:52.234684Z","licenses":["agpl"],"lastModified":"2016-11-19T17:37:52.423930Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"dh+Txg1iVfqXr8+cxplNQuBZGErSnXUo0ewGwnybNMJqp8/EjEo72+zPpW3dVnhY\n67YCvhrm2bo+VRdFFymEfymzSJu9nWVFkGJhEwvTxPyIdAtuD5YAVrzmnR6L+H7m\n7Q1nXE63ICPCAQpHkxIfIXLh25OhWeyofBB8AVsjDUNn58FEYJ8fFkr6dCgPriZS\nsM2J+xtZMDYufy+xFMsVf/Q3WopjFuBjMC3qOecW76ZTwtREaswOC2RtpzUku2r1\nsogrfFlFer3Ii9/CWgOktnLfjB1DzbTwdEkM2xNVBRJgdMXt2VLA9FsxFFkjmr5A\nl7x9cNLWA8RLpOIpIMBbaef75u5HgRBvSvq114UsA9GCu/EYbIgD8YxEt7xuKd4t\nenksJB5gJ2IQNdHrPbsil59AsJ/dismDN6ktYgWQEk5dINzvm9EAvucueW0Gt+Jr\nqEC5WBgJucsFxSvkHh52v43M8jgPYBfHWEL/M/+377z3+mbuIh+BcQ+vcDdiqxTF\no3n0+gw3QYIhLEe75sUhxG6ynVUdW25AKKju1kVj3KJnZTBH1R8t8/zy4DnJG8d4\nuRGqyU4BXpZjEC3nVlsC7vCncWWhxl0WZQ/MWKqsfjVAU4I88E518D6NioqMnPEJ\niCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=","translations":{}},{"version":"0.5.5","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <11.0.0","minIntSize":32,"download":"https://github.com/otetard/ownpad/releases/download/v0.5.5/ownpad.tar.gz","created":"2016-10-06T07:51:05.278637Z","licenses":["agpl"],"lastModified":"2016-10-06T07:51:05.348825Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=10","signature":"nYsQ9U5r7uXwtcquaWGm2XMJBNYCcA95aUx9gLZ/wEmjCHqId7+MzcCdBnom33+j\nat2XR2a4R96UAUP78bfSC4Yb7nPepFT51Y8CSpV3mDT85/+SgJdq500fXldq+qGY\nffXLneadAztyOfZO9TXljaCLdREYI0LJIGVENsxBQVKM/eyGIuZO7fF70cH5vbfS\ns37+BXB+fxcDTlP2Xuulra8HsNoS81bzjsdVMLM7B7QwwO6rZ1zd5c3UzQ1LmY5g\npQUBNd0KjfHfZ6+Fd64XZO6NGfgucGNmL3lgxdsfUqKiLtikvFxK39dYW5MckV8p\nvLoS2nZ7cgETQmAW9Ahn3ro7gXWcPxzL41oWtZOOHRRC2Yz5zlZ3Bky1o+bF9g5a\nYdDF13zV6utUkhlplZhWbjKaXa04rzOvmut8Iqhx/tmDtZRYtaQXJZWutVJYtPC3\nH86uJJnUHHNFHeoT560mp1Hq0dTeR+G+yWsPacPD1rTYgZOUVEtj3Y+YdbTODR2o\nOdGzeYFl+6CL/OcY4wPGRUCTFwvc31lIUd4DK5SPfN+IGtuuXhAqVhwy6lpkcKRs\ncj8sBoVXbMvEtMnt5uARBvA4tyVffUL4oyoIsUnvXz4u+q4WVt3T17swLm6HjGVC\nNVqU0srHN7EeBRhHlXP1CrKQWGQlS4k9j9Li4Iw+X8s=","translations":{}}],"screenshots":[],"translations":{"en":{"name":"Ownpad","summary":"\n Create and open Etherpad and Ethercalc documents.\n ","description":"\n Ownpad is an ownCloud application that allows to create and open\n Etherpad and Ethercalc documents.\n\n This application requires to have access to an instance of\n Etherpad and/or Ethercalc to work properly.\n "}},"isFeatured":false,"authors":[{"name":"Olivier Tétard","mail":"olivier.tetard@miskin.fr","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEATCCAukCAhAPMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYwOTI5MTU1NDA3WhcNMjcwMTA1MTU1NDA3WjARMQ8wDQYD\nVQQDDAZvd25wYWQwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC6CY7I\nHRJTaqDu376vt+kruX+QOL864joScxRuh3IOVcQktCvxasuA0EtrX7TCAQrV1tBK\nfkqJxU9uOV54RTgyh30yH/ZtnF2bYQwViGM06Snc0riqWydFrN5fxK52dpZWs63o\nUFCNhHxrX4aUGyfXu5nQMISLm4QHoZ3LDLofk1ZsiK62fM/Jz8N2PM8qeHzf1ATo\nSKcAOd3UeaS9C8bv2DuiZM7unkSO/tjrBzkMiq8ds9sIzBBsyk6BRh2HQjHPOtmO\ned+pS9mIZmc2xhssXoHL4IfZwTqwhktpsaTl7v0ROw2dwDATz/QoKMkUpboQ5lkz\nwgLQhoIZw6uAZ1R/Qjze59I3iU8zIo9quDarHBotZNXboYCmg9FRfE4mHtegVaa8\nv1a1JvFQ5gvsWEsKSV6Bzb65GTp4KG4q7YnUrzh6HJyDCGLvLlWm5OWsFj6sNzXX\nwLOv6JLORMbF4ZIo2iybb3x7gdfCu9JxMZ4JtOUC8KSJ6+ub15C1Aia3lN68dNts\nY6KwUF1Ted0o4OQPAulq5pUc+g6dTYmIKsavIiPKhMtl86AbUK50vRTeuGdFsT7X\nav73IanPdFI9bKth+tajgvB6dxcVnvBXbrsLUyEcsxsxtBJvQcMYS4aZ6ZJYLTep\n7AdK0Zt1iMdXB8+4PCps4rcG6bYB/uJeEAVm7QIDAQABMA0GCSqGSIb3DQEBCwUA\nA4IBAQCM10O+sCYhIExnx01vGzKlnRS7MSQNx8ZMmbR5Elfz4AVJAEJ96ytS2DXH\n2c+hcD0wAenXQEFk920AEqFQBT8DP34p0FmF83aMHW08ovzFiu4MdlhcqrLnko0h\ncZTXHVyS/8JZh+o6SVm8R0/BBLF1MQQ5TqRkJehbmk6gL0+MSYxehUDKWTjJITkR\nifneTw/Ba1d0AXBOq0c0HFyGxMPIlWe4qn5LtxH5t0wyVGeSj4jyv4nvd3ZGuAgY\nEUa2uYht/z475k4+vf0YhV98iQH07GnmlfD2TDZgmOCQGKlNfJh1v88OZyLLa3dz\ngRHzGwKbAiJ8T8bbpZ3e2ozXxADr\n-----END CERTIFICATE-----"},{"id":"announcementcenter","categories":["organization"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/nextcloud/announcementcenter/issues","website":"https://github.com/nextcloud/announcementcenter","created":"2016-09-14T10:38:53.939634Z","lastModified":"2016-11-24T11:21:50.324839Z","releases":[{"version":"2.0.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=10.0.0 <11.0.0","minIntSize":32,"download":"https://github.com/nextcloud/announcementcenter/releases/download/v2.0.1/announcementcenter-2.0.1.tar.gz","created":"2016-11-24T11:21:50.317635Z","licenses":["agpl"],"lastModified":"2016-11-24T11:21:50.386203Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=10 <=10","signature":"lmqeE6xBqUJfhuXPbjCfuWiIP0FEB4V/SsF/OvYar6rLpvDpJVf3DJoeIoxXurRP\nE9/xCcNN44P8PreRRDnFLCa0XsKOtwoGa56Lxk7IKvtiQG6xu4J6PKM+q/tIeF9K\nakw0LQXtjZB5InPhnCDDbY5YS9jgGEBylSHsgNgrElipcW+BzOBu1Amw4FECVlQw\ncQ83bio+YPZvsnE5+v3/bAx0m6QNxfyN9Sn6rMEqRkY3jfA3vejXGQH/XkputfV+\n5hOz48KbOVg7cKxg+ieJlSwC0aYjb+RXiopjc3icCoIF1llltOOeSsVYSflOb080\nupociPgQ6qIab/VNNXa2YQ==","translations":{}},{"version":"2.0.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/announcementcenter/releases/download/v2.0.0/announcementcenter-2.0.0.tar.gz","created":"2016-10-06T12:41:56.195206Z","licenses":["agpl"],"lastModified":"2016-10-06T12:41:56.263124Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=10 <=11","signature":"NVWYz73KtuoZ7ti2sluztJO5aFUc7PzhlDcg0VWyAQd1H7sk5wjw7i0bhrjw8O7M\nLsrb+PegnsL9eMlYM2WrRom+RF1PDP482xymZf1T8vh8qcTCm3TK89xSuiSm8yoA\niWUb/Uv/ODj74wVDWqWxAFKaAG/FestCB3InOOZQqQZLzlAV0U9ziYDGNzBjFqof\n9rLNxJ2IOqZOA7hhMIKhSrpA0KkSfNhBsVf8CWClYnVkZQiq0LoYkHkHIlXmXUr3\nOfQFKEjtsx+bNLa6CkAaocHGHJXAofX3GQZ9cjBsjZqiTfbXfcVk0kRfz7pwL92L\nI1McfJYvgMxDQG5bjRpNJw==","translations":{}}],"screenshots":[{"url":"https://github.com/nextcloud/announcementcenter/raw/stable10/docs/AnnouncementCenterFrontpage.png"}],"translations":{"en":{"name":"Announcement Center","summary":"An announcement center for Nextcloud","description":"An announcement center for Nextcloud"}},"isFeatured":true,"authors":[{"name":"Joas Schilling","mail":"","homepage":""}],"ratingRecent":0.75,"ratingOverall":0.75,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIDDTCCAfUCAhABMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwODIzMDkyNTQ0WhcNMjYxMTI5MDkyNTQ0WjAdMRswGQYD\r\nVQQDDBJhbm5vdW5jZW1lbnRjZW50ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw\r\nggEKAoIBAQDPx4Hp1HdBo5v7bDEiVcv2UrVjNW+fPPKS/5rwbagtPcE/1v3WDcwX\r\nvFwaXk8qCn2UpPSQ2b1rTuTDm51G1ZmEZhNiio+rBfEe9F+3tLsq9lElqIPKhkAq\r\nEUVI6dcN+jSqvLmLhuwloEoQQSYaLrX75mY3lGqTb83h1l2Pk/brVixuVf4vJW31\r\nTgeieuGKnC+keLzKOrvTHffJakU8ktwB2Nuu1o+jN5a7u1bxKkP3LjEWPjq236hk\r\nAoOcW/wi1dUEyUKUZsZQeJyvTJh1UXdLHKwYywtUu1/VLZ1IUtNyPBfiQ8ukPp3T\r\nTnSSmG3ZnvsfM6DmAvLZ8bBQkMBzEcTLAgMBAAEwDQYJKoZIhvcNAQELBQADggEB\r\nAAB3i2NgiZ4rpNag7cXYdaFxAxdDWnke1+LX2V2R3hzGmx73/W6cKLpo3JBn9+zT\r\n1aEjlqkt0yHu4aAPVYQzOa5zIV8mjP84p3ODSyV9J8lfjFNXT7wdA8+9PVx3lVki\r\n2ONoCNBh1kOxnxI4+BsMlQfF00ZbBSuGcMm3Ep3lTFWXzuUn3MQITzPwkL5LkW6a\r\nsli/yAYQRTVDsXD8A3ACYT7BG31jGxyXtIHzqCci0MhZFdKKayMYkwfjZchIUtGN\r\nJJoU8LQoHwGRtp3wutk0GlFzpEQEvSsn/Lsvvot5IfIe46tnzA6MVj5s64s5G8+Q\r\nphhXFlzXqO/VxquPdbfYjvU=\r\n-----END CERTIFICATE-----"},{"id":"ocsms","categories":["tools"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/nerzhul/ocsms/issues","website":"https://github.com/nerzhul/ocsms","created":"2016-09-19T21:56:04.745481Z","lastModified":"2016-11-11T16:29:55.864273Z","releases":[{"version":"1.10.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0","minIntSize":32,"download":"https://ftp.unix-experience.fr/owncloud-sms/v1.10.1.tar.gz","created":"2016-11-11T16:29:55.856768Z","licenses":["agpl"],"lastModified":"2016-11-11T16:29:55.947926Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9.0","signature":"hVzbkmmtJCtiOkZGe1mkWElqS3IPQ8wLtSzikVvoKmcg+Zq3YLQjpQWzy0t3UVjo\n9I/BfnL0bF+kjtGc9xF6M8IQaFqPrfJmN+lNT8WYIKLI97TTsLmJGg8Q8PAux3nY\n8/NxMjWdByMw9nVBClKo0o9eSW4+EnaUSJ62Gl/XWjq728kbB16WZm+iesk8LjJJ\nqqAgczWGwz6lkZTCN5o9n0a/YoLJTf4iT+OItHZyS609Cqaxx9CAmZPj/Xn5g1fm\n8hqO2ITAXLoBj4rYS/QsZTMcubtGkJ8fq3XYKVSv2UXZfvGsNWbbGV7puKN33uWJ\n5MrdoMlJ8XnJRPDlCBcb00LY+AB+hAMooLnNy765/Ew6ztp4KNLEPWGG+Ut8/Lkk\n0jIULl1RF/FjlW8P26NfwH36K30RCJFY06OFcWnxGBkkQaNFORDIsKcqTAxkl4x5\nnfKBkNdQZppCVfOSKOZj4NkWfWx75Ouq1S0QksmOsMZoOcjy1TbBKR8h6dt9DQub\nWpYBL0QwyQShGp0Vb1qCKkP69ZQAHVUJNzIFPz9LyoguvFyv8iZmAPLYDnFBvlf2\nnSHtA19rnJmZ4H7RJ02r6BdkstxISvEiHU7RLjNQxcb+DptIWX5C03wH87HTNIhr\nvptPorEoSY1KwW9fqUvvLE/c+vfkr5cvIEwZlyVKVXU=","translations":{}}],"screenshots":[],"translations":{"en":{"name":"ownCloud SMS","summary":"A app to sync SMS with your ownCloud","description":"A app to sync SMS with your ownCloud"}},"isFeatured":false,"authors":[{"name":"Loic Blot","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEADCCAugCAhALMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTE5MjE1MzU5WhcNMjYxMjI2MjE1MzU5WjAQMQ4wDAYD\r\nVQQDDAVvY3NtczCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANqZVIzM\r\nwBJuacuvgYKr2KnXuYhjKjZ58nfspSebsaGLr0ifBbo8L+NH5eaynnLCNhpegmu0\r\nO8D+KrbM1LtIkcdg1/eFpN5dTc6G2OAc9H9stmHs9nroF6MNhszgdZCz8Q8xkSoD\r\nGdSm8hdPg5GcfLrH27UilGtzdQlWJ1DralLMt3l+SfGJo152c/dc+e6SuT8+EbY2\r\nCeLdH5ImasXNpUgY+tAoEt2ZvhBrUghykBJTJVOjwL1jGLT37ybMtV4FBKo6hpeg\r\ntq/YzEk1ijBAC4pmoNWixDKCdolpVJVz0fijI9mlda3llurcp8eMhxfYJ9soXLHp\r\njvLX02YY6RfPcyy48uWVk4IEt9BvZWEVAAp7hCGA2yXrVSsR37E6sDbLsBcKav9A\r\n6dkGAgfmGkr2WT6O1/EhK/MakmnYO4WD1B+E7PnxtP/wOa+aQBmntQcd7igDiwzG\r\n6h05NYAWcRhqfZ4KWYsq0t0SezMbuHOhwzzi22q8wijC5YZbmhKSh+b3N8XwYKDi\r\nZaw+fSahPbRWaLyR3wn9zh7vKCwqrG3ugrNo6CtyoACAnmxKZ97ROFJIQTe3ndLL\r\nmv7Wy8iCZLhRYUaW/GKrF11AFwBVec9xmvkgU+PIKq2HSjwi9sCF+pFyhVjmq29C\r\nmZEPKUV7ySIpNHXpsXm8kTJJfqjSdb2ECbLfAgMBAAEwDQYJKoZIhvcNAQELBQAD\r\nggEBABvn97e8Nw8KAscf6FX/nZ99rEX+3IrZxTC8fmBgNwAvlbF2A+QZQcFI4G9/\r\n85nHK117+u7XDuwWl4QG3flWlI0hDE59Ud9Bd4AiTQ12VoXlNdYoTg/mXARxVozb\r\nKYqZ+1xRQclZKb2AqW8YiGo18okIKovn9VVRAFYPYx4O3Ve1FjgfsaMlIZLiXUFm\r\nkk+2qWo6kYsdU9FABLo6izx7RFOMbnYNre5FmDrWP1Dga/U7ErK/Dilh8g9b3HrP\r\nwP8OIZhdtFWw21wDTfyqrb9EhC/tsjPVP9u+bqyognHeiMhjbVYRbSvz5o8T7Mhj\r\nbxalCt4/LnMIfMwVyIvye7Uy2GY=\r\n-----END CERTIFICATE-----"},{"id":"rainloop","categories":["social","tools"],"userDocs":"","adminDocs":"","developerDocs":"","issueTracker":"https://github.com/RainLoop/rainloop-webmail/issues","website":"http://www.rainloop.net/","created":"2016-10-20T04:17:37.217555Z","lastModified":"2016-11-18T11:36:04.309739Z","releases":[{"version":"4.26.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":">=5.4.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/v4.26.0/rainloop-4.26.0.tar.gz","created":"2016-10-20T04:28:21.491747Z","licenses":["agpl"],"lastModified":"2016-11-18T11:36:04.619927Z","isNightly":false,"rawPhpVersionSpec":">=5.4","rawPlatformVersionSpec":">=10 <=11","signature":"nTYIVSB6mIwKtXIrKoVGsOGFflpLjed8jFem1VLQNtXQj4bztnNrdc4YaPIn0yzM\nyLpMSqRDNzdYNFuOeDiyKLPJPTA++MotLCNjEe7kxUekek+m+qzgnGBdcT7RQT6R\np9xWGecnVx94d6aA55uiRhgQRyHpdDMMLCOz1be+HvpwHy69DRFZ1+SPmGUt6eW0\nu5yS0vHCu1K22cbrVNXFKjxAOlGcIDm61oQuz7ycl3uAujZO4rZbWt55jilgKGak\new559A5gTp9W+j+TWKIcg6LIZ9zLRlGjcQrWJrsc+OBZQcqiYimSFyO6HhfT9TPS\nPof//I+dSsd+H0SRGGeL8DvSnK+NKZL1q5EX5pziqsv6nZFITpCDwmAN+I8AnXXL\nSNkFi53M8RZTOABpD2x7YPYP1cEvwrRweqV/C/oHcYnpfh7D2DjFeWwXsjeAXrHY\nhgFhPrg+7rf7g6UmJFOCp0dC9sBdyQ3KtJkv7bGqPr854r2cdA7xW0QHWQ2in9qQ\nLhIczc32ECi3ZVVgyF8zyT4Y/3MRS05oX3FHvHyt88mjni6bVaO78F7ZRSha8gHh\nNOAkku7AMXPvUCHaZP2iVCCoAViEso8GeR3O8xh2G42Ai61RLYwx8LB1+23EoJTr\nmfFuRYNSg+qAKCokXNnh+lDlwu4AkaQo3vtKGPXvU7A=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/pierre-alain-b/rainloop-nextcloud/master/screenshots/2016.10.20-screenshot.jpg"}],"translations":{"en":{"name":"RainLoop","summary":"RainLoop Webmail","description":"Simple, modern and fast web-based email client."}},"isFeatured":false,"authors":[{"name":"RainLoop Team","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEAzCCAusCAhAXMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDE5MTkzNDEwWhcNMjcwMTI1MTkzNDEwWjATMREwDwYD\nVQQDDAhyYWlubG9vcDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANqB\n5jnF9qZ/qjckt0kRjpHCOMtJumW/KiQoMeNP5nGv4ad0DS3KemOapUef8Zn7qCYb\nMnODhK7HBwPifFzI1j8bnT2hP6E0geFLb0MdN59d2NF0n4CCs1+BnepQPJ1kFbPK\n35wQRi0RDeTf/GQ+/owEVCU9a9W1P/VUXk8Z0vMoQxCXEdRqnB63SgsKl7DB9G/C\n4SYrgGor+OHVGl4ntMZhJujiM996DttrNK3iZRGkQ07L+lfUIwQ52XOhQNRdic4p\nB03lw7PpChwPGMv/EEvdR5HpCJQBJniqJbbu3Jh8bMBKTE/8fCzN3vMXICB2g3Bq\nlKkZW6fnJRGsrZ79fsQnl+WBPNSrWRLOxOfe1fyCFV1ljFB4nTH7uF3pC8ZRgJes\nkHIESHz3GJm28hn4+17ESMGHBCbs7L9FK2GY31cobU0VRntLxpSG+d9njbIAgMG1\nS7U+oKVFQhSVpdXNOaUNqhcQ3HkbQTLEP0k53A/lhLQb2+KPd8nntaELjwNyrmZg\nsVMgHj/zdlvrbguZjZFzUzDBFvkuv/5M58lNT/D1C6ufVp/R6eLsYI+nnk1ojAjz\nl7N6U8X5SXpD+Bm7+Kn1PH+bHl7cViCx8oXJXO2RhP+COXckw7BDZKtjItYHNG7M\npFwgYqWpvCu9LN6IN5a/eLqSI76dOOP3iYbaTH+NAgMBAAEwDQYJKoZIhvcNAQEL\nBQADggEBAGB0Vq0l6ndGTgNbZxSEFyBR3u3tiR3pWK81DYjsui7qBoO6P/BaGmf+\nraSwHPaBOwA9XNS8jcGLh5xdqY2p/m0dTS64xNjVL9nweWsG+FwVnPANo8C4nXdm\n9ajJ4cdg54stQK8qn1uh/xPcd23GKfYJazjYSwYmZ3pXXdzlGN9NxkeYJQxJ6B+5\npzAeVGiABI/e5URpxzz2UayRX7EE+vtpe3B84hzkLqsq0N39ZN6KLfaTyEBGLzqE\niLYeXQTV0XSRs8xVt+iyGlj7nPkv2DR0oCqRpWUFWeSBI//niDG5WxS3qg8kacSW\nfDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE=\n-----END CERTIFICATE-----"},{"id":"richdocuments","categories":["integration","office"],"userDocs":"https://nextcloud.com/collaboraonline/","adminDocs":"https://nextcloud.com/collaboraonline/","developerDocs":"","issueTracker":"https://github.com/owncloud/richdocuments/issues","website":"","created":"2016-10-31T08:55:45.631429Z","lastModified":"2016-11-24T12:13:53.905352Z","releases":[{"version":"1.1.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=8.2.0 <9.3.0","minIntSize":32,"download":"https://github.com/owncloud/richdocuments/releases/download/1.1.3/richdocuments.tar.gz","created":"2016-10-31T09:03:40.389355Z","licenses":["agpl"],"lastModified":"2016-10-31T09:03:40.439510Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=8.2 <=9.2","signature":"s5giQeiU2zwV5X6FmxWXiG9LtNDeKBlFqK+hfvGNbGZ+nic77Y+AnXHodV4lb3Ko\n0C0ThFLuafaZRdp9rBIN2K/acCfCYKJewGuYErb7FlEl+P9J4OQbb9pva0htZJw6\niuG5eyeTufi5MKB4vuj4+jo9zhepOFAtZMa7o+ZCfJkt8vDBuq5AXxomEiZRtW+n\nf9PPUnq0z7DJVwINhHvvBZJlSLjkpJ6VIHAr+/ElWr8O/mDKq5S5ohbvpDcPqR7b\njnsBckFDLFUz1FX9dA0JCJEKMMfkcfGqZcjH17NdjKAxRW2soN5cEKluu5MkOhz9\nFEPKfshzbrfUIm5MaFGv6w==","translations":{}},{"version":"1.1.14","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/owncloud/richdocuments/releases/download/1.1.14/richdocuments.tar.gz","created":"2016-11-24T12:10:13.337165Z","licenses":["agpl"],"lastModified":"2016-11-24T12:13:53.963638Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"prDGlfRPxqT6LP0BsAFPwGww7P4Bngha2N4u5B6+F02N+RVOjGtTcXKqvM1KjZb1\nCo7qJvgJmjpvIvDmB+rup02i8ObfwP2ct6UdsD7ouzOWJG2sJANXK31bHyvOmQ2h\nvKu5eNcOkf+WFyFKYi51TbsfWn2+1Wge3WWujKAVcEvqtcOOz+uMWNtqzBptEupk\nE1aaRnQfTx488YB8Ubul06LIY0PNCHgGCWPgy817tOVT7JA+V0P0FFonl/PXE0dr\nWgtxRJmvGaNiFzYq+kQmdKMfayZTm3kdVgP0W52t5wp878K0i4s2KPg5lANvjTz7\nDCT+VV2IGIE52o4RpMUGyQ==","translations":{}}],"screenshots":[{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png"},{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png"},{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png"},{"url":"https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-spreadsheet.png"}],"translations":{"en":{"name":"Collabora Online","summary":"Edit office documents directly in your browser.","description":"Collabora Online allows you to to work with all kinds of office documents directly in your browser. This application requires Collabora Cloudsuite to be installed on one of your servers, please read the documentation to learn more about that."}},"isFeatured":false,"authors":[{"name":"Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIDCDCCAfACAhAZMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYxMDMxMDg1NDExWhcNMjcwMjA2MDg1NDExWjAYMRYwFAYD\nVQQDEw1yaWNoZG9jdW1lbnRzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\nAQEA1jk29m6JykcJ2Ld0YEpjPMYh6kwxY6GysNJnfkA/th7tPWL3+vBJ9oTYyVnZ\njwAE1Cqwfa9MyBKMZ2IdfIqtT8PeWzuFP7Ib942EdxUpwwh9F3lykeGsj0h4zQwX\nF9OooiS99PfLX+JpkKm15Ujb00iLB6xQmq0+3NeOT1CTD1ziJ1ueOcxBKMwaFp2a\nPuz3F5ywqCvpmxG/OBuOs0LI3/zStXhBNbUMxBrWblr7zaVNJXl/I2JCKj8Wah/H\nXUEEGbW15fAUP1f+90eQSxpEoCZDBHXOQCTJYzySGv+BjU+qlI9/gS0QbrsiyzUf\nO5lyvi8LvUZBzpBw+yg1U75rqQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA9jU3m\nZmD0ywO3MUsG/GLigFtcWi/p7zp2BliR+NpuY2qNFYDcsIb8ZUudmUc/cJRRctzy\nAPaLLj/d+h5RFaxjTVvim1PSe6M7urK/IMSvyUVYCeQRYpG8ZJixKTCOVIBaWHMz\nxTfc51tm9EPlpJpK6JtaWrYYoWGE3k9sINdJ4JkvKkE2CBAqVhX6ZGyEQ0bnEhtk\nRu1DXn+LW7TJ4NZ8VtLWvmW/6Kfmi7dQ1V++Kmn0lO5ntRt5altePbStCHC8bhGp\nmyBOrjhrJgLIwvgH26MYZhdiSkFzoE38nMPZdrUmUDxcPCwucWJqgzDPudguFthj\nWCVZ3TTG/2z3+tWM\n-----END CERTIFICATE-----"},{"id":"ocr","categories":["files","tools"],"userDocs":"https://janis91.github.io/ocr/","adminDocs":"https://github.com/janis91/ocr/wiki","developerDocs":"https://github.com/janis91/ocr/wiki","issueTracker":"https://github.com/janis91/ocr/issues","website":"https://janis91.github.io/ocr/","created":"2016-09-19T12:07:49.220376Z","lastModified":"2016-11-21T11:22:21.024501Z","releases":[{"version":"1.0.0","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":"*","rawVersionSpec":"*"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"}],"shellCommands":["ocrmypdf","tesseract"],"phpVersionSpec":">=5.6.0 <8.0.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/janis91/ocr/releases/download/v1.0.0/ocr.tar.gz","created":"2016-10-24T06:50:43.283900Z","licenses":["agpl"],"lastModified":"2016-11-21T11:22:21.269108Z","isNightly":false,"rawPhpVersionSpec":">=5.6 <=7","rawPlatformVersionSpec":">=10 <=11","signature":"CBJkCIiUKyf2NuWfz2zJ3grhf8p7wJes7DPV/OxUzhlxIH0Fh7K54+U5A9JOOi6f\nWPhjXG1ylkyIVY1glr/B8svWNsD4jAclpnUi1/9ZW5UPT8LnRBfTbtF9Uoj0OgNs\ntsGQYbpuREoHnjbJWTRe0kq1OsOfX44xuf8PuX43B+lpQPW4iRSSz3ZIhdPcDGq1\n7pyqQM7gdKhBQ6/tOiwd7Enyt5Hi4V6jhwhUOCYeTNiLD2V3yKL+qA9DzpXUfNNw\nLGTjcaMrifibHQIZBZWbPPMmCfMJZ7GO9oR4gWHwkhWqt0yVWAJXAHJBLd5vXC5I\njtRTXRpHO/k6Dtqem8tZCVoDE5MAC7fDZ/0XzoFiXHciP6MenVasVcXo6xJOJc5y\nGsrecNftUEhP/ngxA6lMBVkLmmdpiexVisvsavPi64i34OUA6qOuxjgNVBDwg56i\n2lOEVvHa3nn0UX7ZZoQ/Nu6Mz7J3Hx/VDlttPuWe42eeJAphyDGubT1M62gW8dVB\nD3tJOF7spnK6I3BhVLviou/zs30AIRVBDTU0Orzx78cbInwy6/vyJib2a1olAaHz\nv05SzlQRnBWM4jYBe0mA/2ds9AO6VrXGrT/iLlHemj6JYoGBM185TGewA7OJyX3a\nHSlSDqaremmi+aS3onx3AKhXykDxTRkMVarePwTzzFs=","translations":{}},{"version":"0.8.8","phpExtensions":[],"databases":[{"id":"pgsql","versionSpec":"*","rawVersionSpec":"*"},{"id":"mysql","versionSpec":"*","rawVersionSpec":"*"},{"id":"sqlite","versionSpec":"*","rawVersionSpec":"*"}],"shellCommands":["ocrmypdf","tesseract"],"phpVersionSpec":">=5.6.0 <8.0.0","platformVersionSpec":">=10.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/janis91/ocr/releases/download/v0.8.8-beta/ocr-0.8.8-beta.tar.gz","created":"2016-10-10T18:01:16.076330Z","licenses":["agpl"],"lastModified":"2016-10-10T18:01:16.169733Z","isNightly":false,"rawPhpVersionSpec":">=5.6 <=7","rawPlatformVersionSpec":">=10 <=11","signature":"uEvhHfQCrzb6z+QuOoO8rYXiMsZFkrFWEqDvTyOTSgFKvo7dVoj3EfDfaApgcKEB\nIM/SqjLSO0lNhrp8F2mST3twbvLDprKsfrDWKFE6eiH0yKl2aNB+cHWE27utARaX\n/QZBD114vbWeDnbaBa4b9OwtBXDqKJrnO1LmqSLFP8guAlVTkU1jSPkRTpmwAcAZ\nJA/aiN/D2LSGfiNp/YdeTuzU+gPINIs9dCb6+PPkyam8PCBaXUSSaW+c0lAQHln+\ntb3EXxZ5YXdjPWrpEyHvFLk1N8s/w615QoMxr5fEs1M8D29aGbcL/wu7LXH4X0Yn\noiWwIFbpfrpJQlrIFumxWZR74JXiNr9J7ijnQ7SjxdHCcrLxMdnZ2cwq4iD6PnYm\nnIojhlhPOqUIzsWYCYutLWDQbUQz9eyWbj/+7XL+5KjetUUr/MnCu6xJ27IqFbAX\nHc8KRCO+9I0/qMQ2/rCZXBMeo39MGhhkgkVl5YAKwC1IEN/jlfyVNXZwYlfcHLKj\n6aNQ4zN6gGOerWWZ8qXtOeNJN+qv0nmXUKrZdnZUAhxOdB4G9Ym+JujxJZ9yNIWV\nsiqAI9J+OIzCwv/dzZhaHadONoo/RTF+Fl6Hy56HyBtMehb8w9p8ksVediqf33yt\nFAE/tzKtNK5NiRd+8MZkq/GbocaFUv3C7Y6pLMpTE1c=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png"},{"url":"https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png"},{"url":"https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc3.png"}],"translations":{"en":{"name":"OCR","summary":"Character recoginition for your images and pdf files.","description":"# Description\n\nNextcloud OCR (optical character recoginition) processing for images and PDF with tesseract-ocr and OCRmyPDF brings OCR capability to your Nextcloud 10.\nThe app uses tesseract-ocr, OCRmyPDF and a php internal message queueing service in order to process images (png, jpeg, tiff) and PDF (currently not all PDF-types are supported, for more information see [here](https://github.com/jbarlow83/OCRmyPDF)) asynchronously and save the output file to the same folder in nextcloud, so you are able to search in it.\nThe source data won't get lost. Instead:\n - in case of a PDF a copy will be saved with an extra layer of the processed text, so that you are able to search in it.\n - in case of a image the result of the OCR processing will be saved in a .txt file next to the image (same folder).\n\n**One big feature is the asynchronous ocr processing brought by the internal php message queueing system (Semaphore functions), which supports workers to handle tasks asynchronous from the rest of nextcloud.**\n\n## Prerequisites, Requirements and Dependencies\nThe OCR app has some prerequisites:\n - **[Nextcloud 10](https://nextcloud.com/)** or higher\n - **Linux** server as environment. (tested with Debian 8, Raspbian and Ubuntu 14.04 (Trusty))\n - **[OCRmyPDF](https://github.com/jbarlow83/OCRmyPDF)** >v2.x (tested with v4.1.3 (v4 is recommended))\n - **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 with corresponding language files (e.g. tesseract-ocr-eng)\n\nFor further information see the homepage or the appropriate documentation."},"de":{"name":"OCR","summary":"Schrifterkennung für Bilder (mit Text) und PDF Dateien.","description":"# Beschreibung\n\nOCR (Automatische Texterkennung) für Bilder (mit Text) und PDF Dateien mithilfe von tesseract-ocr und OCRmyPDF ermöglicht Ihnen automatische Schrifterkennung direkt in Ihrer Nextcloud 10.\nDie App nutzt Tesseract-ocr, OCRmyPDF und den internen Message Queueing Service von PHP, um so asynchron (im Hintegrund) Bilder (PNG, JPEG, TIFF) und PDFs (aktuell werden nicht alle Typen unterstützt, näheres [hier](https://github.com/jbarlow83/OCRmyPDF)) zu verarbeiten. Das Ergebnis, welches jetzt durchsuchbar, kopierbar und ähnliches ist, wird anschließend im selben Ordner gespeichert, wie die Ursprungsdatei.\nDie Ursuprungsdatei geht dabei nicht verloren:\n - im Falle einer PDF wird eine Kopie mit einer zusätzlichen Textebene gespeichert, damit sie durchsuchbar und kopierbar wird.\n - im Falle eines Bildes wird das Resultat in einer txt-Datei gespeichert.\n\n**Ein großer Vorteil ist, dass das Ausführen und Verarbeiten asynchron im Hintergrund stattfindet. Dies geschieht mithilfe der PHP internernen Unterstützung einer Message Queue (Semaphore Funktionen). Die Aufgaben werden somit getrennt von der Nextcloud in einem eigenen Arbeits-Prozess (Worker) abgearbeitet.**\n\n## Anforderungen und Abhängigkeiten\nFür die OCR App müssen folgende Anforderungen erfüllt sein:\n - **[Nextcloud 10](https://nextcloud.com/)** oder höher\n - **Linux** server als Betriebssystem. (getestet mit Debian 8, Raspbian und Ubuntu 14.04 (Trusty))\n - **[OCRmyPDF](https://github.com/jbarlow83/OCRmyPDF)** >v2.x (getestet mit v4.1.3 (v4 empfohlen))\n - **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 mit den dazugehörigen Übersetzungs- und Sprachdateien (z. B. tesseract-ocr-deu)\n\nFür weiter Informationen besuchen Sie die Homepage oder lesen Sie die zutreffende Dokumentation."}},"isFeatured":false,"authors":[{"name":"Janis Koehr","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIID/jCCAuYCAhAKMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYwOTE5MTEzNTAxWhcNMjYxMjI2MTEzNTAxWjAOMQwwCgYD\nVQQDDANvY3IwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDDpXiwec4f\nXAT//7YBPSb4z6ZsBJSMfBq0VTL/HagjJnQ7BL+WagzWlS69IStNDqlIlenamYRX\n4B40heJIUinzYKjTRbr5UAw6MX29HibZccm/qgrk36o1XTgIsoRhmvSxbXDVIo1k\nbDOJN8gc2Gvswa8X+uOe9pfcDgAdqGxOvFnoKW89GnB01pCNT+xakNErGAFqVLsr\n2AeademAZnbxJ1cB54tQn2Bygb/7DKKY8EmFfIq6/27n9Jbph1FG9HIlWRT4/M2H\nU2pG3cCScWMEBPsW7kpfpnzLk7Q30Oj6k/rEYjJgmNYgg6oVnn0D9uRmhBYBnGyx\nMab1ilsK53lyuzQY0pmU8V5ULqpnNFAK6DVFfofEamDUhBPO+TZXEA5cZmuULRpf\nQQXmGpUQSyV6pS9WirMIqXFp9wmQ4vtjMdhu/6CP7cmtYZdq9uOhWEHbQM0mZUkb\n8hMjeItPx9XITI7Cge1JUOI8ZIwiB3USnQXcMd3v82l++/VgqHB7s5OaKPhygsWI\nM6RCoBcGiuQB5/fEUOg5ACOpGVyJiBda0Mi57AdoxdJmfnr7Bxcf2tAWIJL9Y7T3\nE1+V2BMxJOWwvVz26Cq83F41yXK2hJS+SbfQTqNUR8Cfh50CS9POvgRxNrJK9yvI\nkKle3ITRtGVM1XU0njWjnsdGg3D3O2mmjQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB\nAQAbFddMbgfPI1szT57V1FKZrOrdYqQ7qjewlIQOzshGydbMtqS/9XL5hYocJCMt\nY6w+C/i6iEzO2Jx8D/k4rcZMXoVR6y3ZvO0Ke0gzSRsU+5eYj2FK1VV+cNIQW5Iu\nCYYIVa7pVPVHdeQH2Bba680bLV0HMF6b1fI9IwkfdCAinvCYZLjyEXZlmB7YjyA8\nHR7qPCNz4uG2Va7mlUHE3UYUYnlv8JFOV3YdbVL0nxhWwIdzSri5sxFIhdlabpzY\nyA1z/MCBEyTRo80jxFmL+MpwbsdbUJi7Qxlnd56zb6HHDGrLHXZTh9LXgyVbnhWL\nkxomWjIXQh4aMHQL4QF7U4EK\n-----END CERTIFICATE-----"},{"id":"spreedme","categories":["tools"],"userDocs":"https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md","adminDocs":"https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md","developerDocs":"","issueTracker":"https://github.com/strukturag/nextcloud-spreedme/issues","website":"","created":"2016-09-27T08:43:07.835196Z","lastModified":"2016-11-21T16:51:23.703819Z","releases":[{"version":"0.3.4","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz","created":"2016-11-21T16:51:23.689599Z","licenses":["agpl"],"lastModified":"2016-11-21T16:51:23.826509Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"Mhy3hXeGWlIujx1Op39MMRdqHYOo360BCwr4FPWoTNNggH3aS0gWlh48DAfGYK9W\netNiOqIuRyA0NrVlsqR2vDILgFtODJSbKPyHd3PQn3hcGsjogjQ+dkKciLNLinw7\nOhbv6aDdRFLBeRHpX/7wOnWL5W3ko/gyn0Awvi88M9+nC5aARtqncQqPy2SxDGzH\nKlOZHSNDnEQCGMhA8hNWWKdVwNUJHod/wmBWpW5QVNSJq5DqrKZcNwpGM2UUJoql\nEqUMwDXk5uVH5r5k62Tr9kguDWoUEG1OqQSyeMY24AmA64tq/HSlAdZ+CX32bc4E\nZvm+n8poJBrdSVmWEaa4ZfYaLFdOc6Kcuid1B1Sv9kPhD9WD6T1sicdzjDzcorBK\n/MLReCuSb2E8aPTnFWRoAZ4xCUGs1IXzX5fmxI8VdzwR42R6RhGJ/rqMuZRFenZF\nbOks45K5gE1da4QpkYOUQa3GVMNPqPiT3CqjmJ8tjxq7bGpb6v+YoCLACjjPpPZL\n2Y28qLxwHVaINDFUUxD75WWdrlulRbqHwiSw8jolP9qrpXhDuLAqYam9tRwV5K5R\n8uNawnFwWkicBEYkN/WtBTouWzehOPn38tHXov6SyEyD6lkuxUBZrsGQ2ru+t33U\nk0kKCbV0GFw43I+3Ji5DiB4TUVNZYVoPG1B7Qve+UfA=","translations":{}},{"version":"0.3.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <11.0.0","minIntSize":32,"download":"https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz","created":"2016-10-20T09:09:26.520692Z","licenses":["agpl"],"lastModified":"2016-10-20T09:09:26.666738Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=10","signature":"D62Ck7JUnrYbrfFlX7xXVaYUMZIh2acmykIKapqfemD/tuX5Bvb08GYGTeFG61MA\nQzsqcIylDfGnC1UJbf8yWEX7PbyJD5w/R4WlbFv34njDvM8rBs4HpzSjkqQoykOF\nZpYAjH2ydfKqtZadgoIRm7et5B8X2AeoGg11ec52DId5t1wAEBcDIv824CDBUt8t\n0pVY8Z8n1MUYwU7DCjCbPy23br2+EBODFCHp+cFfMBLg3F0BJI5nY3Q8ku+0tqMR\n0NDxQcscNZ2Ck/wpVDWylfhpS+ICIxSMiyq7urP593mRrK3399SUyaMqDfgl/pxo\nqTzdBxHLaAqcnKZYglbqp+Gxbyj4teqCod8TiSMlp90VaxhC72ACuVQQRWQKuTNI\nZeW3YweWB5d7VErqBNmQR1tGnX5YFFHiKo41fVDQFsrOqHx4zP6AeU3nkl2ol/r/\n3pg553so1MOxMkyLEhGYGMfrdQqVEtajNWHUdj3B73LS+M3jcjBFIdOD+AGXPtDX\njCRymt07c1znhkL+aT8yY5SHMVbKBZj9mExL49hcLjAYYc4U++60uq9MFH5r9g4T\ndph+yT6VVEM/UH2HjvKsHv2wm937sNgG3EXQdh79JU8nCXIz7cVrJ8f5/9r6n1VP\nBbjtfDAPEjmfVCXX2gmgLuZHV+GMhLBS9bTh+61AhhE=","translations":{}},{"version":"0.3.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <11.0.0","minIntSize":32,"download":"https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz","created":"2016-10-06T08:14:05.212553Z","licenses":["agpl"],"lastModified":"2016-10-06T08:14:05.278533Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=10","signature":"X9zXDyMBPoXPMpZ+XXWK3MLufjY2MG8lJ+93LiW3rv0iq9yd8PafK4IvP9czO6o9\nf/vNilq+1mfl6mjTvL6QF5+sySlzbRGbT3uTBwYXyYL07HVYgl1ZLrwe0kxvxqaW\nxTvPem7+HzwClI3VnWc7ylQfzGrcYIaSIg7nNq1GOHocsgZVNyj/nVW/eQx24MjZ\nuLzZs9SJqYoBGq+mo63vRswhqv5OzGebo+G6dHm0hvRSOw9qsWCDWBugiSRU8zU4\nD9PQ0e8WbyrIrQhBoUvvkuijO3zCySx606S1HUyaHmbJzMc4Fbpwz6ggmi6IRBbT\nFBKB1DWJDwN/7mY4fhS4KhircVnAHDqiBVCTu5i3pSfMPrwFymcmbn9OBuFHAFuZ\nd9PZvWQg4v32w+Q/NNvZVW5lRi+l0w5DEqNREaj79hljk2reZMaB65lvtV9NCYw+\nHmwWqsGqZ1SgGZuhYkOzEIkCfJ2fF/VpyavJ4X6bHP9yYdkt1pxnSSoZ2HC8mkG4\nBnPf28mEXRcY8EJv0rEePqKSBIhAt8yfEW+joH/8nupe1qOdfPvP08ifLad5m76s\nt23UzlSljzq9kVO+d16z2uagKomN9USZaNnJcUDVblfjvCPpdiHLfRPEJnRsDZCm\nNffFWEMcz+TWmwBboZgTRO9v0bPDEuwfCCEW0zy8rT0=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif"},{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png"},{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png"},{"url":"https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/users.png"}],"translations":{"en":{"name":"Spreed.ME","summary":"Audio-, video- and text chat for your Nextcloud","description":"Securely communicate with your friends and family using rich audio-, video- and text chat, and much more right from your Nextcloud – in your browser"}},"isFeatured":false,"authors":[{"name":"struktur AG","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\r\nMIIEAzCCAusCAhANMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTYwOTI2MTYxNzMzWhcNMjcwMTAyMTYxNzMzWjATMREwDwYD\r\nVQQDEwhzcHJlZWRtZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKLx\r\n2dCPBLIgX948BnOdLij0YyI2+FKD6uZOvzxMaoi3rlxNf8MJgraNMzTBWEXtxT5b\r\n7ZISNp89WEXhaQ1dwwCocodd/xow4Ek63m5nUvTZXsm+YSbMgrFbxzsBhYU7KuIE\r\nT/jhKdzYgemzErwwN/gtwkLMfPo3jkgg6c8NPPohYv6k7V4VnsqtJ0JS0kX19FqM\r\nMiNz9XkcncBHy9x0BSxy4+YnwbFcgIx/MtYKlBL8NkPuuJaB/6C1O+IPYhdEdnpX\r\n+RaIue71nSStOYOqT4YDqHAIw7EmqgA1my09mmK+0Pn92GJVEAEN7JGBSQ+F32RI\r\ndB3ivGAOVtUtVvJlepWdbHxj1xqeP+LCjWzHMLQjm0TyH8VqU4Cg/wxwAEFnBATH\r\naOaWwrggzY2d9KBo1mp0k71NArLbBdlHykFU4bgiSDWrXXMz0fZzLQVwGI0Eqcxc\r\nouf6t0kvrK8oKjrnso+FjBoT7lHV/H6ny4ufxIEDAJ/FEBV/gMizt5fDZ+DvmMw4\r\nq+a088/lXoiI/vWPoGfOa77H5BQOt3y70Pmwv2uVYp46dtU8oat+ZvyW9iMmgP1h\r\nJSEHj1WGGGlp45d10l4OghwfTB0OSuPUYwWR+lZnV8sukGvQzC9iRV1DGl/rREMC\r\ncQ5ajRAtO5NPnThvN5/Zuh4n8JoDc0GK4jEZsIivAgMBAAEwDQYJKoZIhvcNAQEL\r\nBQADggEBAGHMRbPV0WTI9r1w6m2iJRrMbZtbBb+mQr8NtOoXQwvSXWT1lXMP2N8u\r\nLQ1a8U5UaUjeg7TnoUWTEOqU05HpwA8GZtdWZqPPQpe691kMNvfqF64g0le2kzOL\r\nhuMP9kpDGzSD8pEKf1ihxvEWNUBmwewrZTC3+b4gM+MJ3BBCfb5SCzMURLirfFST\r\naxCNzc7veb2M98hS73w5ZE6vO+C/wz0GTsxuK0AoLitApT5naQnjvxSvSsjFPEGD\r\nsUNUEU2Decyp0jxLVnrrpz6Y5UupfBR0V8yAv1t5Od/mCKLc5DxHsDWiKOpsob9U\r\nJN+bdzJil2NNftihD4Dm7Ha7OS3O8W0=\r\n-----END CERTIFICATE-----"},{"id":"nextant","categories":["files","tools"],"userDocs":"","adminDocs":"https://github.com/nextcloud/nextant/wiki","developerDocs":"","issueTracker":"https://github.com/nextcloud/nextant/issues","website":"https://github.com/nextcloud/nextant/wiki","created":"2016-09-14T14:34:35.977699Z","lastModified":"2016-11-22T16:02:57.758477Z","releases":[{"version":"0.6.6","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.6/nextant-0.6.6.tar.gz","created":"2016-11-16T15:11:14.344704Z","licenses":["agpl"],"lastModified":"2016-11-16T20:39:59.030384Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"aOZeEeThyZ0V/vXBcn6c+Z0vyCsZcN6nfSJ8oWEea4zXh4g705Si+MFZESqix3M2\nOPCnA/U8eASwdRTAEwQJrW5ECmu1THXSIsrzQzc9kFycvyOGzCgAWtuu0ayzZD2/\nU5aDWlzpLHC1Czg9QJ5UnfZR0AfChWQ402N1YzGqMShdJv6AHXFrVE+uYnIyxuYI\noPJQBUYbQwthVUjpYwFwSxw50YU17gmx5RZ0Y0OPz3i/EiuEUrxopXtfDVYAuCML\npDw37LOTRQ2JqxSU3teALh8LcrwJbTeOP0n4bTeV+vU3jvtiaEoRrwfVrK41F701\nQymGXy1/EFG0kxPGS2dRNPBAXYLZfeoWlROl3D5BWlbsCcXKU1S+22yn0TEdS7x1\nY44x8jRKnBddDE7qkn+QoQYHNNcxOREsFFLmIoyCUpdNOdDX2PvTFUYkIqdnXaJy\noAKv2GkvWPQ0aiiBtA1i4oXuzvHW/M2wOrK7v7DCpNfILrD/sjxpljxcX082nRCd\n9P3iPd2hQ6yOM9fG21LVN74b6wggI81BzFf/xJPd4ZqYLjfeG/yqd0zaiMOzMm1W\nse+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/\n2avNqQnUh3hgOnxFCLI/5VrbqxfSTVdO6O/LTuAmwgw=","translations":{}},{"version":"0.6.5","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.5/nextant-0.6.5.tar.gz","created":"2016-11-09T16:58:06.856332Z","licenses":["agpl"],"lastModified":"2016-11-09T16:58:07.139404Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"DVOIbLEVggiLkNkuPW+pXqu8WYT15unUsMoqHSw81NiU6HF0Nuf3XiwnHJJDDqo5\nyX+QyHADO4ZiQpvXhGigvwD2eS1jVLatAztyxE0tEQv5eBU/7R0jQYxI8YCnC/jE\nZDa0qs+TI58EkDek0LBzueVQqrLubKgGU9P+E9H8gbWi1JHvl/2LdY7CplPqaJ+J\nMRokobPntzgx9m4DZC1RsCoXzSON7o2gp2cmunPJiXVHPhMUfIfolGEbNGJ1/xdp\nra7Y7XkPnDx4po98a38UpUh1x/2m5goOV54em35bWbh4ShNDykiE5ttz6tOywlYN\ngxceSsStTKyqscVaOV2Xu6Ive0pY9CInvrSfRnRktIWBYDyWdbK9sJuqs/s69kqn\nKQ/SjzE2smw0zwOUMnSaz0Jzr1vdPFgNu2xDYAVQO5G03V+wQ5AhxuhBz5Xp5Fll\nLaOhymZLCC7lq0DUqkeTeQ2QCfiG23hvG2VUPsIqW7xFe2YzKHZVXi9JuH//Gwym\nDmJmcyZDMvNwNiObx3ZRKsZNH2XwbldFZ9nTpb9AafyoSR/qbwd473NewaDLRTiY\nLrOP5Wx1xx6DOkRmDF2l2iT1bSJ6eoAoWQU2I0aYRH9NAr2Ugd4f2Um4o61EJaL+\nRHT9cERRySEloU/NdgmZEOi+CG0rEu+9LC5G/jGlHE8=","translations":{}},{"version":"0.6.4","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.4/nextant-0.6.4.tar.gz","created":"2016-11-05T18:17:47.622023Z","licenses":["agpl"],"lastModified":"2016-11-05T18:17:47.678445Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"RdkvnhNjw+kAnT6Or3+N9FzAv9DjJ9BAlmgANMwZZcaqo1gZRFewsGD2Rx1KEb9X\numSC28tl2B5/3r/+dprVJmOnYJny/7+kDmI/d+vigKfnaQJOUZ0ya5+f72pFgow7\nth8fw9rX/3+zIBs2IeEN66cis8ioFq97BJDsnDMBDr7wl7CnFJjYe6eviWuiFTnC\n4sBXlYjHoaIRRu561nwAooV+WXmWsparYPVhj2cXdyP/CnWo5HSF5jA51WCsz7Up\n7a0URXdh85xmxEbZtnjUymTW2BIegdxj9Erbfiuy/m3ApgnP+DiEQRcM13J7pXqg\n4cgFOBSzKDZgim599WBW2uNO1ztnDYOzz47GXDfJhcdvKiZZoQpUF9W4LMRtheMz\nxD9YArO3j3d+VOInSYU2Rpvhugwo1LExhwnRdT4+cOZfEeq0VojiM7yBZLDdEjIb\nGdYUJtNWSU0F6cPab2Au8FgZymLrHL9EpGvxuA1oAwtRxHAgMElJG2O6Jp89gGl9\nh/AptypeTvzNEc9/Kg24ueBKqmSUd5a45pZ3gM2pNATJhUK7fzLb/K6cq/kEzZtj\nOPra1ZfP0/20u8VP32Rgw1cFmIjqt8DFzUmOMpMfyoJkdldtTwQtGk+yIvtN1zp6\nT2zDknAKA2N/rZ/0SJl8KxVVNLhQWtYBJ+rFAdapuxI=","translations":{}},{"version":"0.6.3","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.3/nextant-0.6.3.tar.gz","created":"2016-11-03T21:51:27.654342Z","licenses":["agpl"],"lastModified":"2016-11-04T18:25:35.697130Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"Hf5GB4xd+rVXzWvVpGbbF5tqmnI+DGHlNHdLYPImFLS/Z4K5wKeNp80E5sd/RkAi\nhyuEsdWHlGDVMT6s7oeCmH/ClyWqLNSz9VH4KYqyFgD4+usHZp9PrEeEKbvPDPKv\nD3eB7Ats34cWcpf4E1oR5wsPicgmdgIgb2uMXzc/1G9xUBRWzocwCstzjEEAB/VJ\nvJuHvhDTGG294P4gOb82MxKCQ8LZ4i1QXzOf/mLETOubiUbZtJgTReYvpdAo2Wct\nbdfDFw13LYZkCf71r9jIQ3PSPlIpD+0BwAlE1fi0Br9dP2JjIfiKN6CGVaki6O0v\nKR42jtcE9xXiAop0Ym1FYMWJvQUy5PFLMwYDfEd6CvfEFJl+fi+RjXNDNZcTyw00\nHa48sACoGzxwts2JknWMU57mwvi0Z4uwpE0cFp/PRzBsXmSlCzWHjJhu7+2qambE\nAabdP9nH2NvqJHUJyPsxtDSrSWCBY4CoL3wYu36UrIA4NepyudMPNe9fhKTEU0bg\n8DLclw6hYdj5p9Zj3OUuwOZLz6r85KwnooTsUjOYkBXvdUuHWkgONqqZlPMApS4i\nChRQ7ysHAinPyyzsvr0PR9g6J52CSCO/7qwSJy6yqSzuSWrbZUa4FVTcKIwWJJPu\nJ2XzB4rWVG1wWjzMM6MIvFbO2HY9upzh651OdOwsYvk=","translations":{}},{"version":"0.6.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.2/nextant-0.6.2.tar.gz","created":"2016-11-01T11:24:58.054892Z","licenses":["agpl"],"lastModified":"2016-11-01T11:24:58.151609Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"h8KgwMh2RGGIp7q/II23VSfE5Ibkha7p/C1kvIfG6QIIc2Zu/Mm3Oekynnysh5ZJ\nZuMTaeWbejbBAmlnxW+AwBWa/s2PoMhv7foVvdtg76l9/qr+9jGvUM7D1LbbBvAy\n/XW6JSrhhBZHOohdU7kwV5Xnwsn/NC/zUe0G4eZ+9fc9uSntkob9wnWvUs2daAeD\nY6Mi7Xt/XAIX65OIVTKfC6ah1SlbXgtJ2i2j4G32I9jRhmbkpt/UJEangn90fHnY\nQXNJ85OyV0aNMafNHoMSL3uLscdvjp0Hy8w4iBeavsRlCs0GiUoG1+YdwTwmC9EM\n4CjbMfRJ0DYK7u697TOmS8MQzk8O7f5THtjeokZlrom2YnV9t6gLvjnxl/+gXPdJ\nmgLixnA8P6tPsff9pquHKQZsvxjv6vVa2DVJc8VpcqJRih7yj/3V7rxesEP7MUnP\nznIOcwzTsKXHuAnvujpCwyQj3QtpQK2XJPQ5WkKgwbTdvriVJfnzPironhcHo1vC\nbuUDOdhL59aySChw2cZGD9lCWaxYR7I1BDDzWKNl9Qg0AZ2auyGUGTv8P2vi5qUB\n0CmnkzkZurR5ju6Nb9/2lcZvda7QJdIdMtm2Wnn+Ak/Z3Y4IehB5PPDP5/MMAhQY\nXE8Jqe0mGtiU/O2346L5IThkS58JlRmep4kYv+II9zE=","translations":{}},{"version":"0.6.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.1/nextant-0.6.1.tar.gz","created":"2016-10-27T21:16:47.066097Z","licenses":["agpl"],"lastModified":"2016-10-27T21:16:47.125641Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"axSX4Kz2P4PbKU676DibjPZsxk8hCIG3lLOmeMXoiBhp3ka4wJ8u5tNwTzgY8/MV\n3mjXe5DNttD66SqmiRNSPKbotYHVFFW3wFK+Dgh/++n/KTomGYUeIwt88Z9ecbuG\nNT6U46jFrfZBYzRHWzbgiJ4c7MCoid9cfmoB7HDuQSyw+E0S2vbLL8+jzMcIzF+5\nTh/sJEterXCyrWSciw/9x98F+4svNbskdEIvrOox3+K6UIhpsojqJR2+bQhG3rsM\nPerOb6J+bzHdLV1ZL/4nWEz1F30T7B08QxY/4pHD68JFQcdtzmHMIhXfCoRvWhN2\nVRnizx3IXBALY4F49Ql6bjsnr6BCp+LroM5RSQ3eupDcqejDJLbjPz8xfOMOwlx7\nz84Xd0MUyqaEkxg1ihsWLbPlYACUZ2aoDkSQUIbfZTTiov7eqTM8UBc/UqVID/LU\nyEW4gjFZzQy6kX76XRAGq1vebKFjCU63asCnVyJhF/YQVTu1hPGbFslkRKnYuh8W\ne4MeaNfbdjcSEX+7oTcPJz6V09pOPvukXL0M1m7lS9PhTisI6oGj8c33GPYp/DSK\n6SGk+ukbt1mwFuFKdTvAMxo1lk96D+pKUv4MX/ralaaoIAmwPTGsSQ04RyL454ae\nU6q8PApwrVyPHYwMBPtXGoQMyb2ZV9rylazYbKCQ8I0=","translations":{}},{"version":"0.6.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/v0.6.0/nextant-0.6.0.tar.gz","created":"2016-10-26T01:46:48.419025Z","licenses":["agpl"],"lastModified":"2016-10-26T01:46:48.521063Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"W2TmbX/NbbfPPjIJLalO0kCDhhQF1pEohH/CxO9bY+yR+a5NKiTbpAhG2McqpTSj\nmgC4J8/thmwGlWGC+VW+KlpXzzjc7wCgMGMKViOpGD3pIy8p8U5MXTqVgjjrEb9g\nKgr9uErXzxJ5oDfkx8Uh1bUeBJTsAAivGJqMlhBYFGxw8BSB09sfOZytNxo4wbwZ\nNAcYP1qvkUQ8CVR0nInSTRfLvAp5+e/8xxyYZwJIWrdNgpoP0CxiwzKP/VSjBk/U\nsPU4R72UQnVZB0InRCeh/KNTwu1YiPkUKm+mNmt2hCfN7Fm6bY2rUMH7oa8KTkqn\nh52FhbaYRSAR1OPdC5RnHiQWlPh71gq+4Xqgp19Eawnl/QiVteVifSjNQZ+Ban8M\nRyw/PxHnzIWg/OAjx81Jx9mXjUIHSeUxMTJTKTp+lEqIAzjku0iHeU5UPGCfE+VM\nwmopZfnlfk2nLkUwjQXLCIcnZD1ME1m0h/H4Ad0Q/qXpBScUp47npkxg2b8zPIhk\n3aXUmNPLgwyXPWvAuaBK/WwpNefUnqWFns8t2Alpzg/EpC2PrZqciCNDcRFEycoa\nX+JsFyD7eYA7Dc9iIf09gXZX+tZ+Jinb+iPDwYrl1u/7IIBoBlUGCgo+cF7/dL9S\nc3vYeWw6MCH8Sv+ckgS2g726BfdN5EjB/8cb071b4lE=","translations":{}},{"version":"0.5.1","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/daita/nextant/releases/download/0.5.1/nextant-0.5.1.tar.gz","created":"2016-10-17T15:23:04.515057Z","licenses":["agpl"],"lastModified":"2016-10-17T15:23:04.576640Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"Pp3rC/9RmAYURneGpGit4HZ2t1qH9A9nwsUnGDgRuJ0akIii7CtJC+n8l1b9k73/\nhxMYnp2JOBu2HWKgFp9a3yeo1xphI5hOUdVQ1UZAWxIQyDI1FZVYDr81l7GCdkqm\n2lMxgviFADSYURCgEnAsj9Nt0NZ6LDcJZiJg3iPAjkDI0U+KnEBjtx/XRFqGUnfp\nCUZ/XLHh/hvoEitSHepTBDCMKkTNjbDEwBYfA2rAoz4zbMR5zKLU+1r1DIUgWSRe\nbk2i8TaTDVL4cbb6MhkGKwkujb+Atikvkpi45o7+fyQMs84c6fjjh/TZJaC+dMyG\n1GCikMPwwtEPjXtnLzynERAxJOd5mP4Ee4sD8ZrnzNUehpyFR88pwWU6r+dmiebb\nnsYlGkhIu2aIO2O4HZ4sUTsO5sfjZ9me7jsafhgJl6iG4IBeHa/L1MsSbhsh6mvH\nYsz4Xsluwr0QcFLmSDDQQYynyogKfJZG2xQsadM0GETWgXE44dVeRvMUsILfB4uZ\nmfKgd23SgaOhYC8m4bg5Hxnkl+xHJnyGZ6jhqg7bhuKwsoLymc18Vmjmb7a45HGV\nXbL5CTmw9yaPOBS3v7v91TnlB+0lhlzbKzZ0xIhY55qsTC76uScbTLwndPqNGaF7\n2koxRbJ3jcmf/Z2MLymdRi2BTZbZkPkxgVrSf9plaR0=","translations":{}},{"version":"0.5.0","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/daita/nextant/releases/download/0.5.0/nextant-0.5.0.tar.gz","created":"2016-10-11T11:47:46.191539Z","licenses":["agpl"],"lastModified":"2016-10-11T11:55:40.393000Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"qzQJSLK8nkrQedwwxUdhxL8bq3aXyppAlWJo+n3GqSvqA8uNTzl3Wsci0LsnBV0E\nDvDNW8K0enhl563F/bywQrDhgKl8jTX/CA5KCxqO9P+tvE80zAfMqiRnQayVcWuY\nSWX6RqfI/kqiWyN1SsFp2EDlas6eb+xfIoiJamlfsN0qzHYOFt5W77wmw2Bn9dB5\n9nwHHyC0z60Pf2pPduc/KuZ/971WrDFaIapL7Gm+z9XoaKSwUT575VtS+RNJkOKy\niBrwnHdc8x/62HPFOXsUYjCt2aEmLzPCQN8Ke5pd3596hm5wbAVzTHuxf2H35tb3\nljfGqAZ5AJX2Xd13d4aHXFdSEILwv6IFq2fx0hO3vkvFEoKF5oQ2t3hi++Mw/h8R\n15OKZCOC1bFH3gTwdshmnHSTSr3LxDeTF60aH16wpXcehQuJHagpb/aG8mPD1w+v\n759/mekqa4LYlqT9TLWTqX3UPeQXYIwcPijG84IvW1BDK1M4Mj2Vqsld4jXwG6CP\nORIL8xoQbA52dQI1Y19JXcU9zxIb6GaHYgpV0wejatsZRfhPv2Yd0CBShF4HY7aw\nnfcm88pqzOKNvjnLZjTFQwuJ0AUUSOsWhgZzYt8tATJ2KDZ+lxz+WAMGXJAC/ciY\ntrrglY7YxwJNLbYp+arE0sowZx+IOVaSZBvmUGHiEBY=","translations":{}},{"version":"0.4.2","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/daita/nextant/releases/download/0.4.2/nextant-0.4.2.tar.gz","created":"2016-10-06T10:31:12.482416Z","licenses":["agpl"],"lastModified":"2016-10-06T10:31:12.551117Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"QHJhYcBMi5HyPofshZ7EdcXsOfRrl7o48Y3BBBq8CkmYtFDbekghdJqjFbwwZa5u\n8FtgMVwssql/RSDNP6M2Zc/MpQ3K9gDm+DyxE5KRmtMEpzHB+oD+1DxP7kAoyW8/\nnBr5iiQSdLCelddMcTwbdxskLFUXIs3cFuLGhMvr8pdQOAgfxte5lolrj4/8EsJ0\n0yUImgIYG4NlgmvCygGApdpVaOcK7XVtv4oH+x43JmX9YZ3Ce0DQPYPUbFTCf4ZS\nS075j1vcnPx2cRFGxc+YpKzYVVYoy7ZdB75Hq+kaei/atxrTyV5+gcCrVPnH1RkX\n6G8rgu5l8FoGJYopi8/9dd8LsGLFx53CHMdEVob3tFR0WeK4TJAGJa403zE6S3hM\nxr86WCedmjuti0uOhSQr5AEVAoXZ/JUWQMMsPAUMuKEYVjKfmve6TlcNMC2oM5XT\nXcOf4OP3pcQq4ViN53o4Pj6NGSci6IzD6xLeAxKZUoTX37ArVKH6RHS5Najc193H\nRhYRnfE7D5YOr1u10HaZCFCVJif2MgMP0/uH2759NoRjXFowrh7Z6dW7JQG5lbHN\ne0jjJH1Y8m8H1peGGcmM0YxFiOVZ0ER7P+AxT4Cbau/cVhaS8vnPF2a2a6YFRiFS\nVH4aqazvvXrtifDr3lfvlyPCrP/570nwvOJgZGk+K/Y=","translations":{}},{"version":"0.10.0-alpha","phpExtensions":[],"databases":[],"shellCommands":[],"phpVersionSpec":"*","platformVersionSpec":">=9.0.0 <12.0.0","minIntSize":32,"download":"https://github.com/nextcloud/nextant/releases/download/0.10.0/nextant-master-0.10.0.tar.gz","created":"2016-11-22T16:02:57.740378Z","licenses":["agpl"],"lastModified":"2016-11-22T16:02:57.900805Z","isNightly":false,"rawPhpVersionSpec":"*","rawPlatformVersionSpec":">=9 <=11","signature":"kDO3xbPpoUdl2qo362tXfJIqKeiKE12M8FkMXbdKiRNzuQyvDOehQq3dErALZDOr\nLG47Tpez/Kn9Fsx1y4dQDx0w9SD3pyoqvjj1O6KkTYN6srpitQcj9EzEItCY+MZd\ngRSc7Px9MzxpFpgwtuThGVlSt5kLMd0vjWFLVcv7k07rZfWEsTwXd24INIDtlr1A\nC7hyLB777nEOGa7oAzx8nr+FJcIbmu9opVZk8AL40FOFDNBgfAy2AS9hGZreUmRV\ndV9Zh7UAR+RsEeO51xcU/CKqC8Jb0jL1gkYyUaQy16oe1HF9bRs1PWuNL5mYwsmy\nZNn0ay/a7mb7hxJbza1F3lbgBtodvbgUm7+So/QvaR29CSAqqoUXeQy6FfSBVWhZ\nYlTxdQfKcBcUPFO14BBk/O5p5iQaG8JCLJ/EZGDPDIVDMn7crGQ4oLZJv80eqTeB\n7ueDmWaD3gQ9j2XKsMk1uLSyY4unt9AaTofBylsKD1SjLhyxofGZym4jc2+M1GnQ\nyLcoEMSexnKuextu4nzrA0y5k3z9tvO07R29lwT1GFp6oGAakMLob/6XrGsm3YQY\nRQXgfXKFw8XmXBumqG8ayEIyvQ/O8nO6r4R1H8a7ooj6oWa3PhPsen+gLE0SpJPZ\nz3e2TLliwC4VtZp69H7u3px5Qn1Fc6RMDTh571edCr8=","translations":{}}],"screenshots":[{"url":"https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg"},{"url":"https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg"}],"translations":{"en":{"name":"Nextant","summary":"Navigate through your cloud using Solr","description":"\n\t Navigate through your cloud using Solr\n\n\n**Nextant** performs fast and concise _Full-Text Search_ within:\n\n- your own files,\n- shared files,\n- external storage,\n- bookmarks\n\n\n### Recognized file format:\n- plain text,\n- rtf,\n- pdf,\n- html,\n- openoffice,\n- microsoft office,\n- image JPEG and TIFF (will requiert Tesseract installed)\n- pdf with no text layer (will also requiert Tesseract) _[work in progress]_\n\n\n\n## Installation\n\n- [You first need to install a Solr servlet](https://github.com/nextcloud/nextant/wiki)\n- Download the .zip from the appstore, unzip and place this app in **nextcloud/apps/** (or clone the github and build the app yourself)\n- Enable the app in the app list,\n- Edit the settings in the administration page.\n- Extract the current files from your cloud using the **./occ nextant:index** commands\n- Have a look to this [explanation on how Nextant works](https://github.com/nextcloud/nextant/wiki/Extracting,-Live-Update)\n- _(Optional)_ [Installing Tesseract](https://github.com/tesseract-ocr/tesseract/wiki) ([Optical Character Recognition](https://en.wikipedia.org/wiki/Optical_character_recognition) (OCR) Engine) will allow Nextant to extract text from images and pdfs without text layer.\n\n\n\t"}},"isFeatured":false,"authors":[{"name":"Maxence Lange","mail":"","homepage":""}],"ratingRecent":0.5,"ratingOverall":0.5,"ratingNumRecent":0,"ratingNumOverall":0,"certificate":"-----BEGIN CERTIFICATE-----\nMIIEAjCCAuoCAhAFMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\ndXRob3JpdHkwHhcNMTYwOTE0MTI1NDQwWhcNMjYxMjIxMTI1NDQwWjASMRAwDgYD\nVQQDDAduZXh0YW50MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsbnQ\n+9acjKHfcrUj4yqBpD++GmQ5z2Sp8C8uOz4ZbLyM9bUXEYHo4a4u3CdC49kGUkb3\np5MkEAEzslTWDi1eh5MZgPWpbPgItsDsXY1o55O3jtxNkzSG5/yYcPQcuKtIOm9S\n7DY0K+UQt3nK+RrXEZfARMNrzFbEzpE3b7w901Yl5n+m/B8rhW4pqg8uSfx3u04J\nwduV1fHwoHUB0Ox5HyWib4Pq1XppNh7xdc2Fg93JxshwuCPJyOOzrFTnxC7s1yzQ\nUvaqkjPW5QeQRunQjZ2XtpYH8f8v01W18bNEiHwqtFwuDEyCVx1rvEMgUDVXdPkP\ngZrlB5TzGmz0U3HzYvf6205WuzfHxz7kPj502wP51PoZBKpniggKzmuXkx6BpsZC\nZX45VpDHdiATLwRj1t2bMs3C01nzpIWO5ZwFtkepH3Y+mvwX5lDh/XDsqJC2Yo8o\nWMmniWNW7dspufYOsBUqqYGP7rkailgVT4oYk6D1j6oFZ5SSpfPF5lsyYedDSM6y\nbIGVkSF+sjLK6R9BenBijKceAKsS//WwRYCBPC+JHlsYpXKW12bL+C47Kj2/N6d4\nrYryzV6ofVSF6pwIq0oEjoyfBfNpYavf3xrRkSSmIIlPSnMY7DT1xkGD5retxSm6\n+WIfkWKRZpv2S6PhMHGLspYc4H5Dj8c48rG5Co8CAwEAATANBgkqhkiG9w0BAQsF\nAAOCAQEAOZUwyPaUi+1BOUgQJMWqYRoTVZUyBshTXSC7jSwa97b7qADV9ooA6TYF\nzgsPcE41k7jRkUbnjcY45RGtL3vqsgZbx5TjPa5fGMxlqJ6eYBOY61Q6VIHEVm3u\nxnPEO9dsMoDBijvo5D7KtE+Ccs907Rq70kCsbrdgPHkyb5tDSnCKogN1LiQrg1EP\nmy7Z1C7jG9/h57vx0+QBMDCYnTmqLsvMKqo27uHskzAiB7VXLEdSZ2FtMGHkLUQO\n0bfhnvTZ2VhMmK83t7ovo71An4ycmsolGD/MA0vNI78VrVISrdI8rRh2WntUnCBU\nEJL3BaQAQaASSsvFrcozYxrQG4VzEg==\n-----END CERTIFICATE-----"}]
EOD;
- static $expectedResponse = array (
+ static $expectedResponse = [
'data' =>
- array (
+ [
0 =>
- array (
+ [
'id' => 'direct_menu',
'categories' =>
- array (
+ [
0 => 'customization',
- ),
+ ],
'userDocs' => '',
'adminDocs' => '',
'developerDocs' => '',
@@ -75,28 +75,28 @@ EOD;
'created' => '2016-10-01T09:16:06.030994Z',
'lastModified' => '2016-10-06T14:01:05.584192Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '0.9.2',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/juliushaertl/direct_menu/releases/download/v0.9.2/direct_menu.tar.gz',
'created' => '2016-10-06T14:01:05.578297Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-10-06T14:01:05.643813Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -113,36 +113,36 @@ bkR1DTBCyDjdpNBidpa3/26675dz5IT5Zedp4BBBREQzX08cIhJx5mgqDdX3CU09
uWtzoaLi71/1BWTFAN+Y9VyfZ8/Z3Pg3vKedRJ565mztIj0geL3riEsC5YnPS0+C
+a3B9sDiiOa101EORzX3lrPqL7reEPdCxrIwN+hKFBQ=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://bitgrid.net/~jus/direct_menu_nc.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Direct Menu',
'summary' => 'Provide easy access to all apps in the header.',
'description' => 'Provide easy access to all apps in the header.',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Julius Härtl',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -171,14 +171,14 @@ e/zxnB1EmeI2X5D2xceJDLB7Fy5W0EGrLixRIdFaSUommWFUm9E2hSIaNlziSBdc
G2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx
2OmWZo7UBREWenjKyFZZ/iKoqH5sdenBtpo=
-----END CERTIFICATE-----',
- ),
+ ],
1 =>
- array (
+ [
'id' => 'apporder',
'categories' =>
- array (
+ [
0 => 'customization',
- ),
+ ],
'userDocs' => '',
'adminDocs' => '',
'developerDocs' => '',
@@ -187,49 +187,49 @@ G2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx
'created' => '2016-10-01T09:16:47.111889Z',
'lastModified' => '2016-10-12T19:50:16.038821Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '0.3.3',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/juliushaertl/apporder/releases/download/0.3.3/apporder.tar.gz',
'created' => '2016-10-12T19:14:10.802359Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-10-12T19:50:16.104357Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
'rawPlatformVersionSpec' => '>=9 <=11',
'signature' => 'nhlT9lhrmBxIsqh/e3RLm2NDw/U8ZvvoMyYQTLMM3H19DQmVcPYPYC9QWVTsowUzXblVaOXVGylbpKma9yOlOAqJtF3qyXecLl4+tA/Awb6BBhKPgHFdcLDAL5yy1K7/uei3SgEojMlJoI9vEK5I1C5YTh43yNH+//Im6MAuNYFUTlMXK426zdOe6ogpCI5GlYdXopqYANxcpT+WXWET6DDSM5Ev+MYwMcSAY4r8+tvARRU4ZAenRgjkBT6R5z6cD76emRax14tbV6vkjjwRcO+dQtM0tFPbd+5fsNInbauv50VzIMgjA6RnKTOI17gRsSdGlsV4vZn2aIxEPWauu6T/UohMvAE9HMn13vtbpPBSFwJAktj6yHASYGzupNQLprA0+OdyALoLZPpQAKNEXA42a4EVISBKu0EmduHJlUPeqhnIGkkGgVNWS8AWqzP2nFoPdXBgUWateiMcBTHxgEKDac5YmNc9lsXpzf1OxBaXHBhGYKuXPwIfyH3jTWb1OdwixJEuRe9dl63T9qOTRre8QWns/bMqKLibGfMtFhVB21ARJayBuX70eVvabG/2N7Y5t1zUlFygIKu51tvo3AVCRDdRrFWDvkAjxzIz5FIdALVZ+DReFYu/r4WF/w3V9rInFuEDSwb/OH4r8sQycs07tSlMyA74Y3FpjKTBxso=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://bitgrid.net/~jus/apporder-nc.gif',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'AppOrder',
'summary' => 'Sort apps in the menu with drag and drop',
'description' => '
@@ -252,18 +252,18 @@ personal order by changing the following parameter in your config/config.php:
Users will now get redirected to the first app of the default order or to the
first app of the user order.
',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Julius Härtl',
'mail' => 'jus@bitgrid.net',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -292,14 +292,14 @@ CSKtBro2jcnxzI3BvHdQcx4RAGo8sUzaqKBmsy+JmAqpCSk8f1zHR94x4Akp7n44
Tu+WGOL2Ee5U4k4XFdzeSLODWby08iU+Gx3bXTR6WIvXCYeIVsCPKK/luvfGkiSR
CpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ=
-----END CERTIFICATE-----',
- ),
+ ],
2 =>
- array (
+ [
'id' => 'twofactor_totp',
'categories' =>
- array (
+ [
0 => 'tools',
- ),
+ ],
'userDocs' => '',
'adminDocs' => '',
'developerDocs' => '',
@@ -308,28 +308,28 @@ CpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ=
'created' => '2016-10-08T14:13:54.356716Z',
'lastModified' => '2016-10-12T14:38:56.186269Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '0.4.1',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '>=5.4.0 <7.1.0',
'platformVersionSpec' => '>=10.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/ChristophWurst/twofactor_totp/releases/download/0.4.1/twofactor_totp.tar.gz',
'created' => '2016-10-12T14:38:56.174612Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-10-12T14:38:56.248223Z',
'isNightly' => false,
'rawPhpVersionSpec' => '>=5.4 <=7.0',
@@ -346,32 +346,32 @@ h7ro5ls+d3OQ8i3i4vdZm821Ytxdu/DQBHiVoOBarvFWwWAv2zd2VAvpTmk6J5yv
Ml2RKcPeutMHHSLiGIN/h7fM5aSs49wGgGZmfz28fHVd7/U0HFSMYmkT/GMq5tMP
Iyc+QZAN4qbX8G0k/QSTkK/L4lOT2hQiQqiSqmWItMk=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
- ),
+ [
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Two Factor TOTP Provider',
'summary' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)',
'description' => 'A Two-Factor-Auth Provider for TOTP (e.g. Google Authenticator)',
- ),
- ),
+ ],
+ ],
'isFeatured' => true,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Christoph Wurst',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -400,16 +400,16 @@ dIu2MkhxAZk9FZfnFkjTaAXcBHafJce7H/IEjHDEoIkFp5KnAQLHsJb4n8JeXmi9
VMgQ6yUWNuzOQMZpMIV7RMOUZHvxiX/ZWUFzXNYX0GYub6p4O2uh3LJE+xXyDf77
RBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI=
-----END CERTIFICATE-----',
- ),
+ ],
3 =>
- array (
+ [
'id' => 'contacts',
'categories' =>
- array (
+ [
0 => 'office',
1 => 'organization',
2 => 'social',
- ),
+ ],
'userDocs' => 'https://docs.nextcloud.com/server/11/user_manual/pim/contacts.html',
'adminDocs' => 'https://docs.nextcloud.com/server/11/admin_manual/configuration_server/occ_command.html?highlight=occ%20commands#dav-label',
'developerDocs' => 'https://github.com/nextcloud/contacts#building-the-app',
@@ -418,28 +418,28 @@ RBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI=
'created' => '2016-10-30T14:00:58.922766Z',
'lastModified' => '2016-11-22T22:08:01.904319Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '1.5.0',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/nextcloud/contacts/releases/download/v1.5.0/contacts.tar.gz',
'created' => '2016-11-22T22:08:01.861942Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-22T22:08:02.306939Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -456,48 +456,48 @@ H3aH8GljatAFjrwItw1JzR0THt0ukkOK+bw/pfCslk10sjHMitmz/GXa4qMS91DZ
BKLUd0dSfQUQzkfwcojImbzJRvca4/DYe3mfG7+RCH0tDL6t72dKL9joB++u5R1u
VZPgkToexlXcKWpiDB8H2/SEShKr4udAOjR5de9CYWM=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Contacts/contacts.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Contacts',
'summary' => 'The new and improved app for your Contacts.',
'description' => 'The new and improved app for your Contacts.',
- ),
- ),
+ ],
+ ],
'isFeatured' => true,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Alexander Weidinger',
'mail' => '',
'homepage' => '',
- ),
+ ],
1 =>
- array (
+ [
'name' => 'Jan-Christoph Borchardt',
'mail' => '',
'homepage' => '',
- ),
+ ],
2 =>
- array (
+ [
'name' => 'Hendrik Leppelsack',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -526,14 +526,14 @@ iuPit2pjkw3nWz0JRHneRXz/BNoAWBnJiV7JMF2xwBAHN4ghTM8NSJzrGTurmpMI
Gld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId
52bVrGMxJwOuL1393vKxGH0PHDzcB1M=
-----END CERTIFICATE-----',
- ),
+ ],
4 =>
- array (
+ [
'id' => 'mail',
'categories' =>
- array (
+ [
0 => 'tools',
- ),
+ ],
'userDocs' => '',
'adminDocs' => 'https://github.com/nextcloud/mail#readme',
'developerDocs' => '',
@@ -542,28 +542,28 @@ Gld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId
'created' => '2016-10-19T19:41:41.710285Z',
'lastModified' => '2016-10-19T19:57:33.689238Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '0.6.0',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '>=5.4.0 <7.1.0',
'platformVersionSpec' => '>=10.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/nextcloud/mail/releases/download/v0.6.0/mail.tar.gz',
'created' => '2016-10-19T19:57:33.676730Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-10-19T19:57:33.834580Z',
'isNightly' => false,
'rawPhpVersionSpec' => '>=5.4 <=7.0',
@@ -580,9 +580,9 @@ D4c6b+qYn68kx3CLaPPiz+tFAZQZQdj7+Kx/lohso8yTnVSiGYrMj4IvvCbpsQjg
WF3WSqF/K/tTnPYTWb9NUPSihTbVNv6AXOfTsPEp/ba2YSS5DjvjVjkr5vhR9eg1
ikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=',
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'changelog' => '### Added
- Alias support
[#1523](https://github.com/owncloud/mail/pull/1523) @tahaalibra
@@ -616,32 +616,32 @@ ikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=',
[#1603](https://github.com/owncloud/mail/pull/1603) @ChristophWurst
- Update folder counters when reading/deleting messages
[#1585](https://github.com/owncloud/mail/pull/1585)',
- ),
- ),
- ),
- ),
+ ],
+ ],
+ ],
+ ],
'screenshots' =>
- array (
- ),
+ [
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Mail',
'summary' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.',
'description' => 'Easy to use email client which connects to your mail server via IMAP and SMTP.',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Christoph Wurst, Thomas Müller, Jan-Christoph Borchardt, Steffen Lindner & many more …',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -670,14 +670,14 @@ ZETmzhx0BXDt5enJYs8R2KMYJNIme1easQRYmWKliXogNY09W7ifT9FHtVW1HX+K
xRS4JXbapjolkxyGSpP+iYSgItVnYzl6o9KZResR4yDsBv7G/8fpV4GQU9IS3zLD
PiZOosVHWJdpUKCw9V4P1prGTQ==
-----END CERTIFICATE-----',
- ),
+ ],
5 =>
- array (
+ [
'id' => 'audioplayer',
'categories' =>
- array (
+ [
0 => 'multimedia',
- ),
+ ],
'userDocs' => 'https://github.com/rello/audioplayer/wiki#user-documentation',
'adminDocs' => 'https://github.com/rello/audioplayer/wiki#admin-documentation',
'developerDocs' => '',
@@ -686,78 +686,78 @@ PiZOosVHWJdpUKCw9V4P1prGTQ==
'created' => '2016-09-16T05:44:24.857567Z',
'lastModified' => '2016-11-17T22:34:34.637028Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '1.3.1',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '>=5.4.0',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/Rello/audioplayer/releases/download/1.3.1/audioplayer-1.3.1.tar.gz',
'created' => '2016-11-17T22:34:34.215350Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-17T22:34:34.867778Z',
'isNightly' => false,
'rawPhpVersionSpec' => '>=5.4',
'rawPlatformVersionSpec' => '>=9 <=11',
'signature' => 'p6Zz0IEFrxvw6y/3jHgGWWCxR6qpMzvU2HKfxcIVsK6sJnoRUhWLeAXwZ432fH2a S2llj+IGS9OvW+5VQElrXgPtEjDK1BT00DRJnp5RFCRlUv0LNoedJMzx6B6AHqPP JBufk3cG1O/CO0M0L1ITGSmSOzfKvWTRo3lxVGF792NyBaP/SyZCkH1N1TzBQzUi Ywl3+HiglPcXbHjtJm/arnKorbJWVKoaN93xFuaBapd2ozQSpi0fE0uGRsici+U7 HNa1M5WFE1rzUJoufE0E9246At07rFY1e+TdNEq8IlLgCXg5vGCKkEyuWpWno6aX LfRaIiT9x39UTAwNvuDKS0c+n4uWDYPsGfKhDx9N7CXpUrthfXVEWRzZEXG7as10 6ANvrRPJemSZH8FUSrdJhD7k12qa9R825y7mIG68Li8P71V92EOxFfo9tNXqXwBt VuDGxBqByFVPqSCj5I8hrzJzQl2Xt40g8+8ZcSF96RMg/pM+bwRMTv+mz0V+vQQ4 DWjqnWVPalaJ1PPD5/QFFErtXuNRbyxKZ6BMWxfJlLM9Kz66P75K+8fYaSwz+2KG NxY7I3svzS2K9LGH3fBLUy1t3Hl+c3zGFq/ll1MJrf9NswV4yxt2WmISfM/KDww8 yELkGs2cRzbw2tCvnmYlJJhIqRLkyFAbDzWRH/XdVx4=',
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'changelog' => '2016-11-17
- fix: one-click-play for wav not working
- fix: wrong sql statement for PostgreSQL [#90](https://github.com/rello/audioplayer/issues/90)',
- ),
- ),
- ),
- ),
+ ],
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_main.png',
- ),
+ ],
1 =>
- array (
+ [
'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_lists.png',
- ),
+ ],
2 =>
- array (
+ [
'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_share.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Audio Player',
'summary' => 'Audio Player for ownCloud and Nextcloud',
'description' => 'Audio Player for MP3, MP4, Ogg, and Wave with a lot of flexibility for all your needs.',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Marcel Scherello',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -786,14 +786,14 @@ zi7mQDFxmAE6FWSMBgKKUb4tqLc5oBap8e12tPEZl/UR6d9iUB2ltvrm3T3vrjjl
FNvGFVBn4r5qCiChEoq+rCXHRjPi/eCfbW21XeLFDiLxapcZyc85JIcA7znUYoFe
P7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI=
-----END CERTIFICATE-----',
- ),
+ ],
6 =>
- array (
+ [
'id' => 'calendar',
'categories' =>
- array (
+ [
0 => 'organization',
- ),
+ ],
'userDocs' => 'https://docs.nextcloud.com/server/10/user_manual/pim/calendar.html',
'adminDocs' => '',
'developerDocs' => '',
@@ -802,28 +802,28 @@ P7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI=
'created' => '2016-10-01T12:40:39.060903Z',
'lastModified' => '2016-11-22T20:31:13.029921Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '1.4.1',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/nextcloud/calendar/releases/download/v1.4.1/calendar.tar.gz',
'created' => '2016-11-22T20:31:13.020268Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-22T20:31:13.087340Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -840,62 +840,62 @@ eFLKrUg3EvnTjvknbBxMB55h9jNJr0SAlkrmyEVm6+CE3BwRWpKB+cJMBuGiwPwv
r/ASRiJrkDThbNWAUtX70rUmCqDV6/MujLXViqOc/Q2OHvcXd1oGDccJSQT92/1z
7nonnedyYQIDqUt7u68WL8JRxp7pFsEqKLVuWSgxW3c=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png',
- ),
+ ],
1 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png',
- ),
+ ],
2 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png',
- ),
+ ],
3 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/4.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Calendar',
'summary' => 'Calendar GUI for Nextcloud\'s CalDAV server',
'description' => 'The Nextcloud calendar app is a user interface for Nextcloud\'s CalDAV server.
It integrates with other apps, allows you to manage calendars and events, display external calendars and invite attendees to your events',
- ),
- ),
+ ],
+ ],
'isFeatured' => true,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Georg Ehrke',
'mail' => '',
'homepage' => 'https://georg.coffee',
- ),
+ ],
1 =>
- array (
+ [
'name' => 'Raghu Nayyar',
'mail' => '',
'homepage' => 'http://raghunayyar.com',
- ),
+ ],
2 =>
- array (
+ [
'name' => 'Thomas Citharel',
'mail' => '',
'homepage' => 'https://tcit.fr',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.94444444444444398,
'ratingOverall' => 0.94444444444444398,
'ratingNumRecent' => 9,
@@ -924,14 +924,14 @@ D3xxtc17ll3B5IqrMnMHRqmOQ39Sbe56Y7T4agaIz/sUWpseo85D5kt7UAIOR+Mr
Q0Bl/QinETk72afGR46Qvc7tC1t9JjQQD3AUbEGuJdGvXjJJ9GREYu01XoODmPdT
jXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0=
-----END CERTIFICATE-----',
- ),
+ ],
8 =>
- array (
+ [
'id' => 'ownpad',
'categories' =>
- array (
+ [
0 => 'tools',
- ),
+ ],
'userDocs' => 'https://github.com/otetard/ownpad/blob/master/README.md#mimetype-detection',
'adminDocs' => '',
'developerDocs' => '',
@@ -940,28 +940,28 @@ jXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0=
'created' => '2016-09-29T15:58:52.814912Z',
'lastModified' => '2016-11-19T17:37:52.278497Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '0.5.6',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/otetard/ownpad/releases/download/v0.5.6/ownpad.tar.gz',
'created' => '2016-11-19T17:37:52.234684Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-19T17:37:52.423930Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -978,17 +978,17 @@ o3n0+gw3QYIhLEe75sUhxG6ynVUdW25AKKju1kVj3KJnZTBH1R8t8/zy4DnJG8d4
uRGqyU4BXpZjEC3nVlsC7vCncWWhxl0WZQ/MWKqsfjVAU4I88E518D6NioqMnPEJ
iCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
- ),
+ [
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Ownpad',
'summary' => '
Create and open Etherpad and Ethercalc documents.
@@ -1000,18 +1000,18 @@ iCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=',
This application requires to have access to an instance of
Etherpad and/or Ethercalc to work properly.
',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Olivier Tétard',
'mail' => 'olivier.tetard@miskin.fr',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -1040,14 +1040,14 @@ ifneTw/Ba1d0AXBOq0c0HFyGxMPIlWe4qn5LtxH5t0wyVGeSj4jyv4nvd3ZGuAgY
EUa2uYht/z475k4+vf0YhV98iQH07GnmlfD2TDZgmOCQGKlNfJh1v88OZyLLa3dz
gRHzGwKbAiJ8T8bbpZ3e2ozXxADr
-----END CERTIFICATE-----',
- ),
+ ],
9 =>
- array (
+ [
'id' => 'announcementcenter',
'categories' =>
- array (
+ [
0 => 'organization',
- ),
+ ],
'userDocs' => '',
'adminDocs' => '',
'developerDocs' => '',
@@ -1056,28 +1056,28 @@ gRHzGwKbAiJ8T8bbpZ3e2ozXxADr
'created' => '2016-09-14T10:38:53.939634Z',
'lastModified' => '2016-11-24T11:21:50.324839Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '2.0.0',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=10.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/nextcloud/announcementcenter/releases/download/v2.0.0/announcementcenter-2.0.0.tar.gz',
'created' => '2016-10-06T12:41:56.195206Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-10-06T12:41:56.263124Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -1089,36 +1089,36 @@ iWUb/Uv/ODj74wVDWqWxAFKaAG/FestCB3InOOZQqQZLzlAV0U9ziYDGNzBjFqof
OfQFKEjtsx+bNLa6CkAaocHGHJXAofX3GQZ9cjBsjZqiTfbXfcVk0kRfz7pwL92L
I1McfJYvgMxDQG5bjRpNJw==',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://github.com/nextcloud/announcementcenter/raw/stable10/docs/AnnouncementCenterFrontpage.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Announcement Center',
'summary' => 'An announcement center for Nextcloud',
'description' => 'An announcement center for Nextcloud',
- ),
- ),
+ ],
+ ],
'isFeatured' => true,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Joas Schilling',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.75,
'ratingOverall' => 0.75,
'ratingNumRecent' => 0,
@@ -1142,15 +1142,15 @@ sli/yAYQRTVDsXD8A3ACYT7BG31jGxyXtIHzqCci0MhZFdKKayMYkwfjZchIUtGN
JJoU8LQoHwGRtp3wutk0GlFzpEQEvSsn/Lsvvot5IfIe46tnzA6MVj5s64s5G8+Q
phhXFlzXqO/VxquPdbfYjvU=
-----END CERTIFICATE-----',
- ),
+ ],
11 =>
- array (
+ [
'id' => 'rainloop',
'categories' =>
- array (
+ [
0 => 'social',
1 => 'tools',
- ),
+ ],
'userDocs' => '',
'adminDocs' => '',
'developerDocs' => '',
@@ -1159,28 +1159,28 @@ phhXFlzXqO/VxquPdbfYjvU=
'created' => '2016-10-20T04:17:37.217555Z',
'lastModified' => '2016-11-18T11:36:04.309739Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '4.26.0',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '>=5.4.0',
'platformVersionSpec' => '>=10.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/v4.26.0/rainloop-4.26.0.tar.gz',
'created' => '2016-10-20T04:28:21.491747Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-18T11:36:04.619927Z',
'isNightly' => false,
'rawPhpVersionSpec' => '>=5.4',
@@ -1197,36 +1197,36 @@ LhIczc32ECi3ZVVgyF8zyT4Y/3MRS05oX3FHvHyt88mjni6bVaO78F7ZRSha8gHh
NOAkku7AMXPvUCHaZP2iVCCoAViEso8GeR3O8xh2G42Ai61RLYwx8LB1+23EoJTr
mfFuRYNSg+qAKCokXNnh+lDlwu4AkaQo3vtKGPXvU7A=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/pierre-alain-b/rainloop-nextcloud/master/screenshots/2016.10.20-screenshot.jpg',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'RainLoop',
'summary' => 'RainLoop Webmail',
'description' => 'Simple, modern and fast web-based email client.',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'RainLoop Team',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -1255,15 +1255,15 @@ pzAeVGiABI/e5URpxzz2UayRX7EE+vtpe3B84hzkLqsq0N39ZN6KLfaTyEBGLzqE
iLYeXQTV0XSRs8xVt+iyGlj7nPkv2DR0oCqRpWUFWeSBI//niDG5WxS3qg8kacSW
fDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE=
-----END CERTIFICATE-----',
- ),
+ ],
12 =>
- array (
+ [
'id' => 'richdocuments',
'categories' =>
- array (
+ [
0 => 'integration',
1 => 'office',
- ),
+ ],
'userDocs' => 'https://nextcloud.com/collaboraonline/',
'adminDocs' => 'https://nextcloud.com/collaboraonline/',
'developerDocs' => '',
@@ -1272,28 +1272,28 @@ fDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE=
'created' => '2016-10-31T08:55:45.631429Z',
'lastModified' => '2016-11-24T12:13:53.905352Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '1.1.14',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/owncloud/richdocuments/releases/download/1.1.14/richdocuments.tar.gz',
'created' => '2016-11-24T12:10:13.337165Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-24T12:13:53.963638Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -1305,48 +1305,48 @@ E1aaRnQfTx488YB8Ubul06LIY0PNCHgGCWPgy817tOVT7JA+V0P0FFonl/PXE0dr
WgtxRJmvGaNiFzYq+kQmdKMfayZTm3kdVgP0W52t5wp878K0i4s2KPg5lANvjTz7
DCT+VV2IGIE52o4RpMUGyQ==',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png',
- ),
+ ],
1 =>
- array (
+ [
'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png',
- ),
+ ],
2 =>
- array (
+ [
'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png',
- ),
+ ],
3 =>
- array (
+ [
'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-spreadsheet.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Collabora Online',
'summary' => 'Edit office documents directly in your browser.',
'description' => 'Collabora Online allows you to to work with all kinds of office documents directly in your browser. This application requires Collabora Cloudsuite to be installed on one of your servers, please read the documentation to learn more about that.',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -1370,15 +1370,15 @@ Ru1DXn+LW7TJ4NZ8VtLWvmW/6Kfmi7dQ1V++Kmn0lO5ntRt5altePbStCHC8bhGp
myBOrjhrJgLIwvgH26MYZhdiSkFzoE38nMPZdrUmUDxcPCwucWJqgzDPudguFthj
WCVZ3TTG/2z3+tWM
-----END CERTIFICATE-----',
- ),
+ ],
13 =>
- array (
+ [
'id' => 'ocr',
'categories' =>
- array (
+ [
0 => 'files',
1 => 'tools',
- ),
+ ],
'userDocs' => 'https://janis91.github.io/ocr/',
'adminDocs' => 'https://github.com/janis91/ocr/wiki',
'developerDocs' => 'https://github.com/janis91/ocr/wiki',
@@ -1387,48 +1387,48 @@ WCVZ3TTG/2z3+tWM
'created' => '2016-09-19T12:07:49.220376Z',
'lastModified' => '2016-11-21T11:22:21.024501Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '1.0.0',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
+ [
0 =>
- array (
+ [
'id' => 'pgsql',
'versionSpec' => '*',
'rawVersionSpec' => '*',
- ),
+ ],
1 =>
- array (
+ [
'id' => 'mysql',
'versionSpec' => '*',
'rawVersionSpec' => '*',
- ),
+ ],
2 =>
- array (
+ [
'id' => 'sqlite',
'versionSpec' => '*',
'rawVersionSpec' => '*',
- ),
- ),
+ ],
+ ],
'shellCommands' =>
- array (
+ [
0 => 'ocrmypdf',
1 => 'tesseract',
- ),
+ ],
'phpVersionSpec' => '>=5.6.0 <8.0.0',
'platformVersionSpec' => '>=10.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/janis91/ocr/releases/download/v1.0.0/ocr.tar.gz',
'created' => '2016-10-24T06:50:43.283900Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-21T11:22:21.269108Z',
'isNightly' => false,
'rawPhpVersionSpec' => '>=5.6 <=7',
@@ -1445,29 +1445,29 @@ D3tJOF7spnK6I3BhVLviou/zs30AIRVBDTU0Orzx78cbInwy6/vyJib2a1olAaHz
v05SzlQRnBWM4jYBe0mA/2ds9AO6VrXGrT/iLlHemj6JYoGBM185TGewA7OJyX3a
HSlSDqaremmi+aS3onx3AKhXykDxTRkMVarePwTzzFs=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png',
- ),
+ ],
1 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png',
- ),
+ ],
2 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc3.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'OCR',
'summary' => 'Character recoginition for your images and pdf files.',
'description' => '# Description
@@ -1488,9 +1488,9 @@ The OCR app has some prerequisites:
- **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 with corresponding language files (e.g. tesseract-ocr-eng)
For further information see the homepage or the appropriate documentation.',
- ),
+ ],
'de' =>
- array (
+ [
'name' => 'OCR',
'summary' => 'Schrifterkennung für Bilder (mit Text) und PDF Dateien.',
'description' => '# Beschreibung
@@ -1511,18 +1511,18 @@ Für die OCR App müssen folgende Anforderungen erfüllt sein:
- **[tesseract-ocr](https://github.com/tesseract-ocr/tesseract)** >v3.02.02 mit den dazugehörigen Übersetzungs- und Sprachdateien (z. B. tesseract-ocr-deu)
Für weiter Informationen besuchen Sie die Homepage oder lesen Sie die zutreffende Dokumentation.',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Janis Koehr',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -1551,14 +1551,14 @@ HR7qPCNz4uG2Va7mlUHE3UYUYnlv8JFOV3YdbVL0nxhWwIdzSri5sxFIhdlabpzY
yA1z/MCBEyTRo80jxFmL+MpwbsdbUJi7Qxlnd56zb6HHDGrLHXZTh9LXgyVbnhWL
kxomWjIXQh4aMHQL4QF7U4EK
-----END CERTIFICATE-----',
- ),
+ ],
14 =>
- array (
+ [
'id' => 'spreedme',
'categories' =>
- array (
+ [
0 => 'tools',
- ),
+ ],
'userDocs' => 'https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md',
'adminDocs' => 'https://github.com/strukturag/nextcloud-spreedme/blob/master/README.md',
'developerDocs' => '',
@@ -1567,28 +1567,28 @@ kxomWjIXQh4aMHQL4QF7U4EK
'created' => '2016-09-27T08:43:07.835196Z',
'lastModified' => '2016-11-21T16:51:23.703819Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '0.3.4',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://apps.owncloud.com/CONTENT/content-files/174436-spreedme.tar.gz',
'created' => '2016-11-21T16:51:23.689599Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-21T16:51:23.826509Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -1605,48 +1605,48 @@ bOks45K5gE1da4QpkYOUQa3GVMNPqPiT3CqjmJ8tjxq7bGpb6v+YoCLACjjPpPZL
8uNawnFwWkicBEYkN/WtBTouWzehOPn38tHXov6SyEyD6lkuxUBZrsGQ2ru+t33U
k0kKCbV0GFw43I+3Ji5DiB4TUVNZYVoPG1B7Qve+UfA=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif',
- ),
+ ],
1 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png',
- ),
+ ],
2 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png',
- ),
+ ],
3 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/users.png',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Spreed.ME',
'summary' => 'Audio-, video- and text chat for your Nextcloud',
'description' => 'Securely communicate with your friends and family using rich audio-, video- and text chat, and much more right from your Nextcloud – in your browser',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'struktur AG',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -1675,15 +1675,15 @@ axCNzc7veb2M98hS73w5ZE6vO+C/wz0GTsxuK0AoLitApT5naQnjvxSvSsjFPEGD
sUNUEU2Decyp0jxLVnrrpz6Y5UupfBR0V8yAv1t5Od/mCKLc5DxHsDWiKOpsob9U
JN+bdzJil2NNftihD4Dm7Ha7OS3O8W0=
-----END CERTIFICATE-----',
- ),
+ ],
15 =>
- array (
+ [
'id' => 'nextant',
'categories' =>
- array (
+ [
0 => 'files',
1 => 'tools',
- ),
+ ],
'userDocs' => '',
'adminDocs' => 'https://github.com/nextcloud/nextant/wiki',
'developerDocs' => '',
@@ -1692,28 +1692,28 @@ JN+bdzJil2NNftihD4Dm7Ha7OS3O8W0=
'created' => '2016-09-14T14:34:35.977699Z',
'lastModified' => '2016-11-22T16:02:57.758477Z',
'releases' =>
- array (
+ [
0 =>
- array (
+ [
'version' => '0.6.6',
'phpExtensions' =>
- array (
- ),
+ [
+ ],
'databases' =>
- array (
- ),
+ [
+ ],
'shellCommands' =>
- array (
- ),
+ [
+ ],
'phpVersionSpec' => '*',
'platformVersionSpec' => '>=9.0.0 <12.0.0',
'minIntSize' => 32,
'download' => 'https://github.com/nextcloud/nextant/releases/download/v0.6.6/nextant-0.6.6.tar.gz',
'created' => '2016-11-16T15:11:14.344704Z',
'licenses' =>
- array (
+ [
0 => 'agpl',
- ),
+ ],
'lastModified' => '2016-11-16T20:39:59.030384Z',
'isNightly' => false,
'rawPhpVersionSpec' => '*',
@@ -1730,25 +1730,25 @@ oAKv2GkvWPQ0aiiBtA1i4oXuzvHW/M2wOrK7v7DCpNfILrD/sjxpljxcX082nRCd
se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/
2avNqQnUh3hgOnxFCLI/5VrbqxfSTVdO6O/LTuAmwgw=',
'translations' =>
- array (
- ),
- ),
- ),
+ [
+ ],
+ ],
+ ],
'screenshots' =>
- array (
+ [
0 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg',
- ),
+ ],
1 =>
- array (
+ [
'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg',
- ),
- ),
+ ],
+ ],
'translations' =>
- array (
+ [
'en' =>
- array (
+ [
'name' => 'Nextant',
'summary' => 'Navigate through your cloud using Solr',
'description' => '
@@ -1787,18 +1787,18 @@ se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/
',
- ),
- ),
+ ],
+ ],
'isFeatured' => false,
'authors' =>
- array (
+ [
0 =>
- array (
+ [
'name' => 'Maxence Lange',
'mail' => '',
'homepage' => '',
- ),
- ),
+ ],
+ ],
'ratingRecent' => 0.5,
'ratingOverall' => 0.5,
'ratingNumRecent' => 0,
@@ -1827,12 +1827,12 @@ my7Z1C7jG9/h57vx0+QBMDCYnTmqLsvMKqo27uHskzAiB7VXLEdSZ2FtMGHkLUQO
0bfhnvTZ2VhMmK83t7ovo71An4ycmsolGD/MA0vNI78VrVISrdI8rRh2WntUnCBU
EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
-----END CERTIFICATE-----',
- ),
- ),
+ ],
+ ],
'timestamp' => 1234,
'ncversion' => '11.0.0.2',
'ETag' => '"myETag"',
- );
+ ];
protected function setUp(): void {
diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php
index 8312bef5b9..52965d4a72 100644
--- a/tests/lib/App/DependencyAnalyzerTest.php
+++ b/tests/lib/App/DependencyAnalyzerTest.php
@@ -64,7 +64,7 @@ class DependencyAnalyzerTest extends TestCase {
->getMock();
$this->l10nMock->expects($this->any())
->method('t')
- ->willReturnCallback(function($text, $parameters = array()) {
+ ->willReturnCallback(function($text, $parameters = []) {
return vsprintf($text, $parameters);
});
@@ -80,11 +80,11 @@ class DependencyAnalyzerTest extends TestCase {
* @param string $intSize
*/
public function testPhpVersion($expectedMissing, $minVersion, $maxVersion, $intSize) {
- $app = array(
- 'dependencies' => array(
- 'php' => array()
- )
- );
+ $app = [
+ 'dependencies' => [
+ 'php' => []
+ ]
+ ];
if (!is_null($minVersion)) {
$app['dependencies']['php']['@attributes']['min-version'] = $minVersion;
}
@@ -126,10 +126,10 @@ class DependencyAnalyzerTest extends TestCase {
* @param string|null $commands
*/
public function testCommand($expectedMissing, $commands) {
- $app = array(
- 'dependencies' => array(
- )
- );
+ $app = [
+ 'dependencies' => [
+ ]
+ ];
if (!is_null($commands)) {
$app['dependencies']['command'] = $commands;
}
@@ -145,10 +145,10 @@ class DependencyAnalyzerTest extends TestCase {
* @param $libs
*/
function testLibs($expectedMissing, $libs) {
- $app = array(
- 'dependencies' => array(
- )
- );
+ $app = [
+ 'dependencies' => [
+ ]
+ ];
if (!is_null($libs)) {
$app['dependencies']['lib'] = $libs;
}
@@ -165,9 +165,9 @@ class DependencyAnalyzerTest extends TestCase {
* @param $oss
*/
function testOS($expectedMissing, $oss) {
- $app = array(
- 'dependencies' => array()
- );
+ $app = [
+ 'dependencies' => []
+ ];
if (!is_null($oss)) {
$app['dependencies']['os'] = $oss;
}
@@ -184,9 +184,9 @@ class DependencyAnalyzerTest extends TestCase {
* @param $oc
*/
function testOC($expectedMissing, $oc) {
- $app = array(
- 'dependencies' => array()
- );
+ $app = [
+ 'dependencies' => []
+ ];
if (!is_null($oc)) {
$app['dependencies'] = $oc;
}
@@ -429,12 +429,12 @@ class DependencyAnalyzerTest extends TestCase {
* @return array
*/
function providesOS() {
- return array(
- array(array(), null),
- array(array(), array()),
- array(array('Following platforms are supported: ANDROID'), 'ANDROID'),
- array(array('Following platforms are supported: WINNT'), array('WINNT'))
- );
+ return [
+ [[], null],
+ [[], []],
+ [['Following platforms are supported: ANDROID'], 'ANDROID'],
+ [['Following platforms are supported: WINNT'], ['WINNT']]
+ ];
}
/**
@@ -489,28 +489,28 @@ class DependencyAnalyzerTest extends TestCase {
* @return array
*/
function providesDatabases() {
- return array(
+ return [
// non BC - in case on databases are defined -> all are supported
- array(array(), null),
- array(array(), array()),
- array(array('Following databases are supported: mongodb'), 'mongodb'),
- array(array('Following databases are supported: sqlite, postgres'), array('sqlite', array('@value' => 'postgres'))),
- );
+ [[], null],
+ [[], []],
+ [['Following databases are supported: mongodb'], 'mongodb'],
+ [['Following databases are supported: sqlite, postgres'], ['sqlite', ['@value' => 'postgres']]],
+ ];
}
/**
* @return array
*/
function providesPhpVersion() {
- return array(
- array(array(), null, null, null),
- array(array(), '5.4', null, null),
- array(array(), null, '5.5', null),
- array(array(), '5.4', '5.5', null),
- array(array('PHP 5.4.4 or higher is required.'), '5.4.4', null, null),
- array(array('PHP with a version lower than 5.4.2 is required.'), null, '5.4.2', null),
- array(array('64bit or higher PHP required.'), null, null, 64),
- array(array(), '5.4', '5.4', null),
- );
+ return [
+ [[], null, null, null],
+ [[], '5.4', null, null],
+ [[], null, '5.5', null],
+ [[], '5.4', '5.5', null],
+ [['PHP 5.4.4 or higher is required.'], '5.4.4', null, null],
+ [['PHP with a version lower than 5.4.2 is required.'], null, '5.4.2', null],
+ [['64bit or higher PHP required.'], null, null, 64],
+ [[], '5.4', '5.4', null],
+ ];
}
}
diff --git a/tests/lib/App/PlatformRepositoryTest.php b/tests/lib/App/PlatformRepositoryTest.php
index 783f8f473f..555247f7dd 100644
--- a/tests/lib/App/PlatformRepositoryTest.php
+++ b/tests/lib/App/PlatformRepositoryTest.php
@@ -25,41 +25,41 @@ class PlatformRepositoryTest extends \Test\TestCase {
}
public function providesVersions() {
- return array(
- 'none' => array('1.0.0', '1.0.0.0'),
- 'none/2' => array('1.2.3.4', '1.2.3.4'),
- 'parses state' => array('1.0.0RC1dev', '1.0.0.0-RC1-dev'),
- 'CI parsing' => array('1.0.0-rC15-dev', '1.0.0.0-RC15-dev'),
- 'delimiters' => array('1.0.0.RC.15-dev', '1.0.0.0-RC15-dev'),
- 'RC uppercase' => array('1.0.0-rc1', '1.0.0.0-RC1'),
- 'patch replace' => array('1.0.0.pl3-dev', '1.0.0.0-patch3-dev'),
- 'forces w.x.y.z' => array('1.0-dev', '1.0.0.0-dev'),
- 'forces w.x.y.z/2' => array('0', '0.0.0.0'),
- 'parses long' => array('10.4.13-beta', '10.4.13.0-beta'),
- 'parses long/2' => array('10.4.13beta2', '10.4.13.0-beta2'),
- 'parses long/semver' => array('10.4.13beta.2', '10.4.13.0-beta2'),
- 'expand shorthand' => array('10.4.13-b', '10.4.13.0-beta'),
- 'expand shorthand2' => array('10.4.13-b5', '10.4.13.0-beta5'),
- 'strips leading v' => array('v1.0.0', '1.0.0.0'),
- 'strips v/datetime' => array('v20100102', '20100102'),
- 'parses dates y-m' => array('2010.01', '2010-01'),
- 'parses dates w/ .' => array('2010.01.02', '2010-01-02'),
- 'parses dates w/ -' => array('2010-01-02', '2010-01-02'),
- 'parses numbers' => array('2010-01-02.5', '2010-01-02-5'),
- 'parses dates y.m.Y' => array('2010.1.555', '2010.1.555.0'),
- 'parses datetime' => array('20100102-203040', '20100102-203040'),
- 'parses dt+number' => array('20100102203040-10', '20100102203040-10'),
- 'parses dt+patch' => array('20100102-203040-p1', '20100102-203040-patch1'),
- 'parses master' => array('dev-master', '9999999-dev'),
- 'parses trunk' => array('dev-trunk', '9999999-dev'),
+ return [
+ 'none' => ['1.0.0', '1.0.0.0'],
+ 'none/2' => ['1.2.3.4', '1.2.3.4'],
+ 'parses state' => ['1.0.0RC1dev', '1.0.0.0-RC1-dev'],
+ 'CI parsing' => ['1.0.0-rC15-dev', '1.0.0.0-RC15-dev'],
+ 'delimiters' => ['1.0.0.RC.15-dev', '1.0.0.0-RC15-dev'],
+ 'RC uppercase' => ['1.0.0-rc1', '1.0.0.0-RC1'],
+ 'patch replace' => ['1.0.0.pl3-dev', '1.0.0.0-patch3-dev'],
+ 'forces w.x.y.z' => ['1.0-dev', '1.0.0.0-dev'],
+ 'forces w.x.y.z/2' => ['0', '0.0.0.0'],
+ 'parses long' => ['10.4.13-beta', '10.4.13.0-beta'],
+ 'parses long/2' => ['10.4.13beta2', '10.4.13.0-beta2'],
+ 'parses long/semver' => ['10.4.13beta.2', '10.4.13.0-beta2'],
+ 'expand shorthand' => ['10.4.13-b', '10.4.13.0-beta'],
+ 'expand shorthand2' => ['10.4.13-b5', '10.4.13.0-beta5'],
+ 'strips leading v' => ['v1.0.0', '1.0.0.0'],
+ 'strips v/datetime' => ['v20100102', '20100102'],
+ 'parses dates y-m' => ['2010.01', '2010-01'],
+ 'parses dates w/ .' => ['2010.01.02', '2010-01-02'],
+ 'parses dates w/ -' => ['2010-01-02', '2010-01-02'],
+ 'parses numbers' => ['2010-01-02.5', '2010-01-02-5'],
+ 'parses dates y.m.Y' => ['2010.1.555', '2010.1.555.0'],
+ 'parses datetime' => ['20100102-203040', '20100102-203040'],
+ 'parses dt+number' => ['20100102203040-10', '20100102203040-10'],
+ 'parses dt+patch' => ['20100102-203040-p1', '20100102-203040-patch1'],
+ 'parses master' => ['dev-master', '9999999-dev'],
+ 'parses trunk' => ['dev-trunk', '9999999-dev'],
// 'parses branches' => array('1.x-dev', '1.9999999.9999999.9999999-dev'),
- 'parses arbitrary' => array('dev-feature-foo', 'dev-feature-foo'),
- 'parses arbitrary2' => array('DEV-FOOBAR', 'dev-FOOBAR'),
- 'parses arbitrary3' => array('dev-feature/foo', 'dev-feature/foo'),
- 'ignores aliases' => array('dev-master as 1.0.0', '9999999-dev'),
+ 'parses arbitrary' => ['dev-feature-foo', 'dev-feature-foo'],
+ 'parses arbitrary2' => ['DEV-FOOBAR', 'dev-FOOBAR'],
+ 'parses arbitrary3' => ['dev-feature/foo', 'dev-feature/foo'],
+ 'ignores aliases' => ['dev-master as 1.0.0', '9999999-dev'],
// 'semver metadata' => array('dev-master+foo.bar', '9999999-dev'),
// 'semver metadata/2' => array('1.0.0-beta.5+foo', '1.0.0.0-beta5'),
// 'semver metadata/3' => array('1.0.0+foo', '1.0.0.0'),
// 'metadata w/ alias' => array('1.0.0+foo as 2.0', '1.0.0.0'),
- );
+ ];
}}
diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php
index 3fb18979b8..fd83b6feae 100644
--- a/tests/lib/AppFramework/AppTest.php
+++ b/tests/lib/AppFramework/AppTest.php
@@ -30,7 +30,7 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Response;
function rrmdir($directory) {
- $files = array_diff(scandir($directory), array('.','..'));
+ $files = array_diff(scandir($directory), ['.','..']);
foreach ($files as $file) {
if (is_dir($directory . '/' . $file)) {
rrmdir($directory . '/' . $file);
@@ -59,12 +59,12 @@ class AppTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->container = new \OC\AppFramework\DependencyInjection\DIContainer('test', array());
+ $this->container = new \OC\AppFramework\DependencyInjection\DIContainer('test', []);
$this->controller = $this->createMock(Controller::class);
$this->dispatcher = $this->createMock(Dispatcher::class);
$this->io = $this->createMock(Http\IOutput::class);
- $this->headers = array('key' => 'value');
+ $this->headers = ['key' => 'value'];
$this->output = 'hi';
$this->controllerName = 'Controller';
$this->controllerMethod = 'method';
@@ -72,7 +72,7 @@ class AppTest extends \Test\TestCase {
$this->container[$this->controllerName] = $this->controller;
$this->container['Dispatcher'] = $this->dispatcher;
$this->container['OCP\\AppFramework\\Http\\IOutput'] = $this->io;
- $this->container['urlParams'] = array();
+ $this->container['urlParams'] = [];
$this->appPath = __DIR__ . '/../../../apps/namespacetestapp';
$infoXmlPath = $this->appPath . '/appinfo/info.xml';
diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php
index 23ebe6ec98..675d4b7cce 100644
--- a/tests/lib/AppFramework/Controller/ControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ControllerTest.php
@@ -41,7 +41,7 @@ class ChildController extends Controller {
public function custom($in) {
$this->registerResponder('json', function ($response) {
- return new JSONResponse(array(strlen($response)));
+ return new JSONResponse([strlen($response)]);
});
return $in;
@@ -103,9 +103,9 @@ class ControllerTest extends \Test\TestCase {
public function testFormat() {
- $response = $this->controller->buildResponse(array('hi'), 'json');
+ $response = $this->controller->buildResponse(['hi'], 'json');
- $this->assertEquals(array('hi'), $response->getData());
+ $this->assertEquals(['hi'], $response->getData());
}
@@ -118,10 +118,10 @@ class ControllerTest extends \Test\TestCase {
'Feature-Policy' => "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'",
];
- $response = $this->controller->customDataResponse(array('hi'));
+ $response = $this->controller->customDataResponse(['hi']);
$response = $this->controller->buildResponse($response, 'json');
- $this->assertEquals(array('hi'), $response->getData());
+ $this->assertEquals(['hi'], $response->getData());
$this->assertEquals(300, $response->getStatus());
$this->assertEquals($expectedHeaders, $response->getHeaders());
}
@@ -131,7 +131,7 @@ class ControllerTest extends \Test\TestCase {
$response = $this->controller->custom('hi');
$response = $this->controller->buildResponse($response, 'json');
- $this->assertEquals(array(2), $response->getData());
+ $this->assertEquals([2], $response->getData());
}
diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php
index c8ebda55a8..43770eba17 100644
--- a/tests/lib/AppFramework/Db/EntityTest.php
+++ b/tests/lib/AppFramework/Db/EntityTest.php
@@ -77,15 +77,15 @@ class EntityTest extends \Test\TestCase {
$entity->setId(3);
$entity->resetUpdatedFields();
- $this->assertEquals(array(), $entity->getUpdatedFields());
+ $this->assertEquals([], $entity->getUpdatedFields());
}
public function testFromRow(){
- $row = array(
+ $row = [
'pre_name' => 'john',
'email' => 'john@something.com'
- );
+ ];
$this->entity = TestEntity::fromRow($row);
$this->assertEquals($row['pre_name'], $this->entity->getPreName());
@@ -153,7 +153,7 @@ class EntityTest extends \Test\TestCase {
public function testFromRowShouldNotAssignEmptyArray(){
- $row = array();
+ $row = [];
$entity2 = new TestEntity();
$this->entity = TestEntity::fromRow($row);
@@ -162,7 +162,7 @@ class EntityTest extends \Test\TestCase {
public function testIdGetsConvertedToInt(){
- $row = array('id' => '4');
+ $row = ['id' => '4'];
$this->entity = TestEntity::fromRow($row);
$this->assertSame(4, $this->entity->getId());
@@ -170,7 +170,7 @@ class EntityTest extends \Test\TestCase {
public function testSetType(){
- $row = array('testId' => '4');
+ $row = ['testId' => '4'];
$this->entity = TestEntity::fromRow($row);
$this->assertSame(4, $this->entity->getTestId());
@@ -178,10 +178,10 @@ class EntityTest extends \Test\TestCase {
public function testFromParams(){
- $params = array(
+ $params = [
'testId' => 4,
'email' => 'john@doe'
- );
+ ];
$entity = TestEntity::fromParams($params);
@@ -215,12 +215,12 @@ class EntityTest extends \Test\TestCase {
public function testGetFieldTypes() {
$entity = new TestEntity();
- $this->assertEquals(array(
+ $this->assertEquals([
'id' => 'integer',
'testId' => 'integer',
'trueOrFalse' => 'bool',
'anotherBool' => 'boolean',
- ), $entity->getFieldTypes());
+ ], $entity->getFieldTypes());
}
diff --git a/tests/lib/AppFramework/Db/MapperTest.php b/tests/lib/AppFramework/Db/MapperTest.php
index 67d88c879a..79a9a1884e 100644
--- a/tests/lib/AppFramework/Db/MapperTest.php
+++ b/tests/lib/AppFramework/Db/MapperTest.php
@@ -73,28 +73,28 @@ class MapperTest extends MapperTestUtility {
public function testFindQuery(){
$sql = 'hi';
- $params = array('jo');
- $rows = array(
- array('hi')
- );
+ $params = ['jo'];
+ $rows = [
+ ['hi']
+ ];
$this->setMapperResult($sql, $params, $rows);
$this->mapper->find($sql, $params);
}
public function testFindEntity(){
$sql = 'hi';
- $params = array('jo');
- $rows = array(
- array('pre_name' => 'hi')
- );
+ $params = ['jo'];
+ $rows = [
+ ['pre_name' => 'hi']
+ ];
$this->setMapperResult($sql, $params, $rows, null, null, true);
$this->mapper->findOneEntity($sql, $params);
}
public function testFindNotFound(){
$sql = 'hi';
- $params = array('jo');
- $rows = array();
+ $params = ['jo'];
+ $rows = [];
$this->setMapperResult($sql, $params, $rows);
$this->expectException(DoesNotExistException::class);
$this->mapper->find($sql, $params);
@@ -102,8 +102,8 @@ class MapperTest extends MapperTestUtility {
public function testFindEntityNotFound(){
$sql = 'hi';
- $params = array('jo');
- $rows = array();
+ $params = ['jo'];
+ $rows = [];
$this->setMapperResult($sql, $params, $rows, null, null, true);
$this->expectException(DoesNotExistException::class);
$this->mapper->findOneEntity($sql, $params);
@@ -111,10 +111,10 @@ class MapperTest extends MapperTestUtility {
public function testFindMultiple(){
$sql = 'hi';
- $params = array('jo');
- $rows = array(
- array('jo'), array('ho')
- );
+ $params = ['jo'];
+ $rows = [
+ ['jo'], ['ho']
+ ];
$this->setMapperResult($sql, $params, $rows, null, null, true);
$this->expectException(MultipleObjectsReturnedException::class);
$this->mapper->find($sql, $params);
@@ -122,10 +122,10 @@ class MapperTest extends MapperTestUtility {
public function testFindEntityMultiple(){
$sql = 'hi';
- $params = array('jo');
- $rows = array(
- array('jo'), array('ho')
- );
+ $params = ['jo'];
+ $rows = [
+ ['jo'], ['ho']
+ ];
$this->setMapperResult($sql, $params, $rows, null, null, true);
$this->expectException(MultipleObjectsReturnedException::class);
$this->mapper->findOneEntity($sql, $params);
@@ -134,7 +134,7 @@ class MapperTest extends MapperTestUtility {
public function testDelete(){
$sql = 'DELETE FROM `*PREFIX*table` WHERE `id` = ?';
- $params = array(2);
+ $params = [2];
$this->setMapperResult($sql, $params, [], null, null, true);
$entity = new Example();
@@ -153,7 +153,7 @@ class MapperTest extends MapperTestUtility {
$sql = 'INSERT INTO `*PREFIX*table`(`pre_name`,`email`) ' .
'VALUES(?,?)';
- $params = array('john', 'my@email');
+ $params = ['john', 'my@email'];
$entity = new Example();
$entity->setPreName($params[0]);
$entity->setEmail($params[1]);
@@ -173,7 +173,7 @@ class MapperTest extends MapperTestUtility {
$sql = 'INSERT INTO `*PREFIX*table`(`pre_name`,`email`) ' .
'VALUES(?,?)';
- $params = array('john', 'my@email');
+ $params = ['john', 'my@email'];
$entity = new Example();
$entity->setPreName($params[0]);
$entity->setEmail($params[1]);
@@ -202,7 +202,7 @@ class MapperTest extends MapperTestUtility {
'`email` = ? ' .
'WHERE `id` = ?';
- $params = array('john', 'my@email', 1);
+ $params = ['john', 'my@email', 1];
$entity = new Example();
$entity->setPreName($params[0]);
$entity->setEmail($params[1]);
@@ -215,7 +215,7 @@ class MapperTest extends MapperTestUtility {
public function testUpdateNoId(){
- $params = array('john', 'my@email');
+ $params = ['john', 'my@email'];
$entity = new Example();
$entity->setPreName($params[0]);
$entity->setEmail($params[1]);
@@ -227,7 +227,7 @@ class MapperTest extends MapperTestUtility {
public function testUpdateNothingChangedNoQuery(){
- $params = array('john', 'my@email');
+ $params = ['john', 'my@email'];
$entity = new Example();
$entity->setId(3);
$entity->setEmail($params[1]);
@@ -241,7 +241,7 @@ class MapperTest extends MapperTestUtility {
public function testMapRowToEntity(){
- $entity1 = $this->mapper->mapRow(array('pre_name' => 'test1', 'email' => 'test2'));
+ $entity1 = $this->mapper->mapRow(['pre_name' => 'test1', 'email' => 'test2']);
$entity2 = new Example();
$entity2->setPreName('test1');
$entity2->setEmail('test2');
@@ -251,38 +251,38 @@ class MapperTest extends MapperTestUtility {
public function testFindEntities(){
$sql = 'hi';
- $rows = array(
- array('pre_name' => 'hi')
- );
+ $rows = [
+ ['pre_name' => 'hi']
+ ];
$entity = new Example();
$entity->setPreName('hi');
$entity->resetUpdatedFields();
- $this->setMapperResult($sql, array(), $rows, null, null, true);
+ $this->setMapperResult($sql, [], $rows, null, null, true);
$result = $this->mapper->findAllEntities($sql);
- $this->assertEquals(array($entity), $result);
+ $this->assertEquals([$entity], $result);
}
public function testFindEntitiesNotFound(){
$sql = 'hi';
- $rows = array();
- $this->setMapperResult($sql, array(), $rows);
+ $rows = [];
+ $this->setMapperResult($sql, [], $rows);
$result = $this->mapper->findAllEntities($sql);
- $this->assertEquals(array(), $result);
+ $this->assertEquals([], $result);
}
public function testFindEntitiesMultiple(){
$sql = 'hi';
- $rows = array(
- array('pre_name' => 'jo'), array('email' => 'ho')
- );
+ $rows = [
+ ['pre_name' => 'jo'], ['email' => 'ho']
+ ];
$entity1 = new Example();
$entity1->setPreName('jo');
$entity1->resetUpdatedFields();
$entity2 = new Example();
$entity2->setEmail('ho');
$entity2->resetUpdatedFields();
- $this->setMapperResult($sql, array(), $rows);
+ $this->setMapperResult($sql, [], $rows);
$result = $this->mapper->findAllEntities($sql);
- $this->assertEquals(array($entity1, $entity2), $result);
+ $this->assertEquals([$entity1, $entity2], $result);
}
}
diff --git a/tests/lib/AppFramework/Db/MapperTestUtility.php b/tests/lib/AppFramework/Db/MapperTestUtility.php
index cddf015cbe..11905a9bbb 100644
--- a/tests/lib/AppFramework/Db/MapperTestUtility.php
+++ b/tests/lib/AppFramework/Db/MapperTestUtility.php
@@ -89,7 +89,7 @@ abstract class MapperTestUtility extends \Test\TestCase {
* of the database query. If not provided, it wont be assumed that fetch
* will be called on the result
*/
- protected function setMapperResult($sql, $arguments=array(), $returnRows=array(),
+ protected function setMapperResult($sql, $arguments=[], $returnRows=[],
$limit=null, $offset=null, $expectClose=false){
if($limit === null && $offset === null) {
$this->db->expects($this->at($this->prepareAt))
diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php
index b629c6d385..7af11807d8 100644
--- a/tests/lib/AppFramework/Http/DataResponseTest.php
+++ b/tests/lib/AppFramework/Http/DataResponseTest.php
@@ -41,15 +41,15 @@ class DataResponseTest extends \Test\TestCase {
public function testSetData() {
- $params = array('hi', 'yo');
+ $params = ['hi', 'yo'];
$this->response->setData($params);
- $this->assertEquals(array('hi', 'yo'), $this->response->getData());
+ $this->assertEquals(['hi', 'yo'], $this->response->getData());
}
public function testConstructorAllowsToSetData() {
- $data = array('hi');
+ $data = ['hi'];
$code = 300;
$response = new DataResponse($data, $code);
@@ -59,9 +59,9 @@ class DataResponseTest extends \Test\TestCase {
public function testConstructorAllowsToSetHeaders() {
- $data = array('hi');
+ $data = ['hi'];
$code = 300;
- $headers = array('test' => 'something');
+ $headers = ['test' => 'something'];
$response = new DataResponse($data, $code, $headers);
$expectedHeaders = [
@@ -78,12 +78,12 @@ class DataResponseTest extends \Test\TestCase {
public function testChainability() {
- $params = array('hi', 'yo');
+ $params = ['hi', 'yo'];
$this->response->setData($params)
->setStatus(Http::STATUS_NOT_FOUND);
$this->assertEquals(Http::STATUS_NOT_FOUND, $this->response->getStatus());
- $this->assertEquals(array('hi', 'yo'), $this->response->getData());
+ $this->assertEquals(['hi', 'yo'], $this->response->getData());
}
diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php
index 494f19a6d2..b6b43d4a5d 100644
--- a/tests/lib/AppFramework/Http/DispatcherTest.php
+++ b/tests/lib/AppFramework/Http/DispatcherTest.php
@@ -52,9 +52,9 @@ class TestController extends Controller {
*/
public function exec($int, $bool, $test=4, $test2=1) {
$this->registerResponder('text', function($in) {
- return new JSONResponse(array('text' => $in));
+ return new JSONResponse(['text' => $in]);
});
- return array($int, $bool, $test, $test2);
+ return [$int, $bool, $test, $test2];
}
@@ -66,9 +66,9 @@ class TestController extends Controller {
* @return DataResponse
*/
public function execDataResponse($int, $bool, $test=4, $test2=1) {
- return new DataResponse(array(
- 'text' => array($int, $bool, $test, $test2)
- ));
+ return new DataResponse([
+ 'text' => [$int, $bool, $test, $test2]
+ ]);
}
}
@@ -140,7 +140,7 @@ class DispatcherTest extends \Test\TestCase {
* @param string $httpHeaders
*/
private function setMiddlewareExpectations($out=null,
- $httpHeaders=null, $responseHeaders=array(),
+ $httpHeaders=null, $responseHeaders=[],
$ex=false, $catchEx=true) {
if($ex) {
@@ -226,7 +226,7 @@ class DispatcherTest extends \Test\TestCase {
$response = $this->dispatcher->dispatch($this->controller, $this->controllerMethod);
$this->assertNull($response[0]);
- $this->assertEquals(array(), $response[1]);
+ $this->assertEquals([], $response[1]);
$this->assertNull($response[2]);
}
@@ -234,7 +234,7 @@ class DispatcherTest extends \Test\TestCase {
public function testHeadersAndOutputAreReturned(){
$out = 'yo';
$httpHeaders = 'Http';
- $responseHeaders = array('hell' => 'yeah');
+ $responseHeaders = ['hell' => 'yeah'];
$this->setMiddlewareExpectations($out, $httpHeaders, $responseHeaders);
$response = $this->dispatcher->dispatch($this->controller,
@@ -249,7 +249,7 @@ class DispatcherTest extends \Test\TestCase {
public function testExceptionCallsAfterException() {
$out = 'yo';
$httpHeaders = 'Http';
- $responseHeaders = array('hell' => 'yeah');
+ $responseHeaders = ['hell' => 'yeah'];
$this->setMiddlewareExpectations($out, $httpHeaders, $responseHeaders, true);
$response = $this->dispatcher->dispatch($this->controller,
diff --git a/tests/lib/AppFramework/Http/HttpTest.php b/tests/lib/AppFramework/Http/HttpTest.php
index 79c03ce1ab..14097a2a58 100644
--- a/tests/lib/AppFramework/Http/HttpTest.php
+++ b/tests/lib/AppFramework/Http/HttpTest.php
@@ -37,7 +37,7 @@ class HttpTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->server = array();
+ $this->server = [];
$this->http = new Http($this->server);
}
@@ -56,7 +56,7 @@ class HttpTest extends \Test\TestCase {
public function testEtagMatchReturnsNotModified() {
- $http = new Http(array('HTTP_IF_NONE_MATCH' => 'hi'));
+ $http = new Http(['HTTP_IF_NONE_MATCH' => 'hi']);
$header = $http->getStatusHeader(Http::STATUS_OK, null, 'hi');
$this->assertEquals('HTTP/1.1 304 Not Modified', $header);
@@ -64,7 +64,7 @@ class HttpTest extends \Test\TestCase {
public function testQuotedEtagMatchReturnsNotModified() {
- $http = new Http(array('HTTP_IF_NONE_MATCH' => '"hi"'));
+ $http = new Http(['HTTP_IF_NONE_MATCH' => '"hi"']);
$header = $http->getStatusHeader(Http::STATUS_OK, null, 'hi');
$this->assertEquals('HTTP/1.1 304 Not Modified', $header);
@@ -76,8 +76,8 @@ class HttpTest extends \Test\TestCase {
$dateTime->setTimestamp('12');
$http = new Http(
- array(
- 'HTTP_IF_MODIFIED_SINCE' => 'Thu, 01 Jan 1970 00:00:12 +0000')
+ [
+ 'HTTP_IF_MODIFIED_SINCE' => 'Thu, 01 Jan 1970 00:00:12 +0000']
);
$header = $http->getStatusHeader(Http::STATUS_OK, $dateTime);
@@ -87,7 +87,7 @@ class HttpTest extends \Test\TestCase {
public function testTempRedirectBecomesFoundInHttp10() {
- $http = new Http(array(), 'HTTP/1.0');
+ $http = new Http([], 'HTTP/1.0');
$header = $http->getStatusHeader(Http::STATUS_TEMPORARY_REDIRECT);
$this->assertEquals('HTTP/1.0 302 Found', $header);
diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php
index 95d2e2a0a4..2a0978db62 100644
--- a/tests/lib/AppFramework/Http/JSONResponseTest.php
+++ b/tests/lib/AppFramework/Http/JSONResponseTest.php
@@ -49,15 +49,15 @@ class JSONResponseTest extends \Test\TestCase {
public function testSetData() {
- $params = array('hi', 'yo');
+ $params = ['hi', 'yo'];
$this->json->setData($params);
- $this->assertEquals(array('hi', 'yo'), $this->json->getData());
+ $this->assertEquals(['hi', 'yo'], $this->json->getData());
}
public function testSetRender() {
- $params = array('test' => 'hi');
+ $params = ['test' => 'hi'];
$this->json->setData($params);
$expected = '{"test":"hi"}';
@@ -100,7 +100,7 @@ class JSONResponseTest extends \Test\TestCase {
}
public function testConstructorAllowsToSetData() {
- $data = array('hi');
+ $data = ['hi'];
$code = 300;
$response = new JSONResponse($data, $code);
@@ -110,12 +110,12 @@ class JSONResponseTest extends \Test\TestCase {
}
public function testChainability() {
- $params = array('hi', 'yo');
+ $params = ['hi', 'yo'];
$this->json->setData($params)
->setStatus(Http::STATUS_NOT_FOUND);
$this->assertEquals(Http::STATUS_NOT_FOUND, $this->json->getStatus());
- $this->assertEquals(array('hi', 'yo'), $this->json->getData());
+ $this->assertEquals(['hi', 'yo'], $this->json->getData());
}
}
diff --git a/tests/lib/AppFramework/Http/RequestStream.php b/tests/lib/AppFramework/Http/RequestStream.php
index 8f6dffd4e9..97951ea4b9 100644
--- a/tests/lib/AppFramework/Http/RequestStream.php
+++ b/tests/lib/AppFramework/Http/RequestStream.php
@@ -77,7 +77,7 @@ class RequestStream {
public function stream_stat() {
$size = strlen($GLOBALS[$this->varname]);
$time = time();
- $data = array(
+ $data = [
'dev' => 0,
'ino' => 0,
'mode' => 0777,
@@ -91,7 +91,7 @@ class RequestStream {
'ctime' => $time,
'blksize' => -1,
'blocks' => -1,
- );
+ ];
return array_values($data) + $data;
//return false;
}
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index 67fef79dcf..8f7c26cc95 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -51,10 +51,10 @@ class RequestTest extends \Test\TestCase {
}
public function testRequestAccessors() {
- $vars = array(
- 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'),
+ $vars = [
+ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'],
'method' => 'GET',
- );
+ ];
$request = new Request(
$vars,
@@ -82,12 +82,12 @@ class RequestTest extends \Test\TestCase {
// urlParams has precedence over POST which has precedence over GET
public function testPrecedence() {
- $vars = array(
- 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'),
- 'post' => array('name' => 'Jane Doe', 'nickname' => 'Janey'),
- 'urlParams' => array('user' => 'jw', 'name' => 'Johnny Weissmüller'),
+ $vars = [
+ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'],
+ 'post' => ['name' => 'Jane Doe', 'nickname' => 'Janey'],
+ 'urlParams' => ['user' => 'jw', 'name' => 'Johnny Weissmüller'],
'method' => 'GET'
- );
+ ];
$request = new Request(
$vars,
@@ -107,10 +107,10 @@ class RequestTest extends \Test\TestCase {
public function testImmutableArrayAccess() {
$this->expectException(\RuntimeException::class);
- $vars = array(
- 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'),
+ $vars = [
+ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'],
'method' => 'GET'
- );
+ ];
$request = new Request(
$vars,
@@ -127,10 +127,10 @@ class RequestTest extends \Test\TestCase {
public function testImmutableMagicAccess() {
$this->expectException(\RuntimeException::class);
- $vars = array(
- 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'),
+ $vars = [
+ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'],
'method' => 'GET'
- );
+ ];
$request = new Request(
$vars,
@@ -147,10 +147,10 @@ class RequestTest extends \Test\TestCase {
public function testGetTheMethodRight() {
$this->expectException(\LogicException::class);
- $vars = array(
- 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'),
+ $vars = [
+ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'],
'method' => 'GET',
- );
+ ];
$request = new Request(
$vars,
@@ -164,10 +164,10 @@ class RequestTest extends \Test\TestCase {
}
public function testTheMethodIsRight() {
- $vars = array(
- 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'),
+ $vars = [
+ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'],
'method' => 'GET',
- );
+ ];
$request = new Request(
$vars,
@@ -186,10 +186,10 @@ class RequestTest extends \Test\TestCase {
public function testJsonPost() {
global $data;
$data = '{"name": "John Q. Public", "nickname": "Joey"}';
- $vars = array(
+ $vars = [
'method' => 'POST',
- 'server' => array('CONTENT_TYPE' => 'application/json; utf-8')
- );
+ 'server' => ['CONTENT_TYPE' => 'application/json; utf-8']
+ ];
$request = new Request(
$vars,
@@ -210,10 +210,10 @@ class RequestTest extends \Test\TestCase {
public function testNotJsonPost() {
global $data;
$data = 'this is not valid json';
- $vars = array(
+ $vars = [
'method' => 'POST',
- 'server' => array('CONTENT_TYPE' => 'application/json; utf-8')
- );
+ 'server' => ['CONTENT_TYPE' => 'application/json; utf-8']
+ ];
$request = new Request(
$vars,
@@ -230,12 +230,12 @@ class RequestTest extends \Test\TestCase {
public function testPatch() {
global $data;
- $data = http_build_query(array('name' => 'John Q. Public', 'nickname' => 'Joey'), '', '&');
+ $data = http_build_query(['name' => 'John Q. Public', 'nickname' => 'Joey'], '', '&');
- $vars = array(
+ $vars = [
'method' => 'PATCH',
- 'server' => array('CONTENT_TYPE' => 'application/x-www-form-urlencoded'),
- );
+ 'server' => ['CONTENT_TYPE' => 'application/x-www-form-urlencoded'],
+ ];
$request = new Request(
$vars,
@@ -257,10 +257,10 @@ class RequestTest extends \Test\TestCase {
// PUT content
$data = '{"name": "John Q. Public", "nickname": "Joey"}';
- $vars = array(
+ $vars = [
'method' => 'PUT',
- 'server' => array('CONTENT_TYPE' => 'application/json; utf-8'),
- );
+ 'server' => ['CONTENT_TYPE' => 'application/json; utf-8'],
+ ];
$request = new Request(
$vars,
@@ -278,10 +278,10 @@ class RequestTest extends \Test\TestCase {
// PATCH content
$data = '{"name": "John Q. Public", "nickname": null}';
- $vars = array(
+ $vars = [
'method' => 'PATCH',
- 'server' => array('CONTENT_TYPE' => 'application/json; utf-8'),
- );
+ 'server' => ['CONTENT_TYPE' => 'application/json; utf-8'],
+ ];
$request = new Request(
$vars,
@@ -302,14 +302,14 @@ class RequestTest extends \Test\TestCase {
global $data;
$data = file_get_contents(__DIR__ . '/../../../data/testimage.png');
- $vars = array(
+ $vars = [
'put' => $data,
'method' => 'PUT',
'server' => [
'CONTENT_TYPE' => 'image/png',
'CONTENT_LENGTH' => (string)strlen($data)
],
- );
+ ];
$request = new Request(
$vars,
@@ -335,11 +335,11 @@ class RequestTest extends \Test\TestCase {
public function testSetUrlParameters() {
- $vars = array(
- 'post' => array(),
+ $vars = [
+ 'post' => [],
'method' => 'POST',
- 'urlParams' => array('id' => '2'),
- );
+ 'urlParams' => ['id' => '2'],
+ ];
$request = new Request(
$vars,
@@ -349,7 +349,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $newParams = array('id' => '3', 'test' => 'test2');
+ $newParams = ['id' => '3', 'test' => 'test2'];
$request->setUrlParameters($newParams);
$this->assertSame('test2', $request->getParam('test'));
$this->assertEquals('3', $request->getParam('id'));
diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php
index 3d76d24496..86a909b768 100644
--- a/tests/lib/AppFramework/Http/ResponseTest.php
+++ b/tests/lib/AppFramework/Http/ResponseTest.php
@@ -49,11 +49,11 @@ class ResponseTest extends \Test\TestCase {
public function testSetHeaders() {
- $expected = array(
+ $expected = [
'Last-Modified' => 1,
'ETag' => 3,
'Something-Else' => 'hi'
- );
+ ];
$this->childResponse->setHeaders($expected);
$headers = $this->childResponse->getHeaders();
@@ -105,31 +105,31 @@ class ResponseTest extends \Test\TestCase {
$this->childResponse->addCookie('foo', 'bar');
$this->childResponse->addCookie('bar', 'foo', new \DateTime('1970-01-01'));
- $expectedResponse = array(
- 'foo' => array(
+ $expectedResponse = [
+ 'foo' => [
'value' => 'bar',
'expireDate' => null,
- ),
- 'bar' => array(
+ ],
+ 'bar' => [
'value' => 'foo',
'expireDate' => new \DateTime('1970-01-01')
- )
- );
+ ]
+ ];
$this->assertEquals($expectedResponse, $this->childResponse->getCookies());
}
function testSetCookies() {
- $expected = array(
- 'foo' => array(
+ $expected = [
+ 'foo' => [
'value' => 'bar',
'expireDate' => null,
- ),
- 'bar' => array(
+ ],
+ 'bar' => [
'value' => 'foo',
'expireDate' => new \DateTime('1970-01-01')
- )
- );
+ ]
+ ];
$this->childResponse->setCookies($expected);
$cookies = $this->childResponse->getCookies();
@@ -141,12 +141,12 @@ class ResponseTest extends \Test\TestCase {
function testInvalidateCookie() {
$this->childResponse->addCookie('foo', 'bar');
$this->childResponse->invalidateCookie('foo');
- $expected = array(
- 'foo' => array(
+ $expected = [
+ 'foo' => [
'value' => 'expired',
'expireDate' => new \DateTime('1971-01-01')
- )
- );
+ ]
+ ];
$cookies = $this->childResponse->getCookies();
@@ -157,30 +157,30 @@ class ResponseTest extends \Test\TestCase {
function testInvalidateCookies() {
$this->childResponse->addCookie('foo', 'bar');
$this->childResponse->addCookie('bar', 'foo');
- $expected = array(
- 'foo' => array(
+ $expected = [
+ 'foo' => [
'value' => 'bar',
'expireDate' => null
- ),
- 'bar' => array(
+ ],
+ 'bar' => [
'value' => 'foo',
'expireDate' => null
- )
- );
+ ]
+ ];
$cookies = $this->childResponse->getCookies();
$this->assertEquals($expected, $cookies);
- $this->childResponse->invalidateCookies(array('foo', 'bar'));
- $expected = array(
- 'foo' => array(
+ $this->childResponse->invalidateCookies(['foo', 'bar']);
+ $expected = [
+ 'foo' => [
'value' => 'expired',
'expireDate' => new \DateTime('1971-01-01')
- ),
- 'bar' => array(
+ ],
+ 'bar' => [
'value' => 'expired',
'expireDate' => new \DateTime('1971-01-01')
- )
- );
+ ]
+ ];
$cookies = $this->childResponse->getCookies();
$this->assertEquals($expected, $cookies);
diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php
index 6672b4d0c1..af5b428cf8 100644
--- a/tests/lib/AppFramework/Http/TemplateResponseTest.php
+++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php
@@ -41,26 +41,26 @@ class TemplateResponseTest extends \Test\TestCase {
public function testSetParamsConstructor(){
- $params = array('hi' => 'yo');
+ $params = ['hi' => 'yo'];
$this->tpl = new TemplateResponse('app', 'home', $params);
- $this->assertEquals(array('hi' => 'yo'), $this->tpl->getParams());
+ $this->assertEquals(['hi' => 'yo'], $this->tpl->getParams());
}
public function testSetRenderAsConstructor(){
$renderAs = 'myrender';
- $this->tpl = new TemplateResponse('app', 'home', array(), $renderAs);
+ $this->tpl = new TemplateResponse('app', 'home', [], $renderAs);
$this->assertEquals($renderAs, $this->tpl->getRenderAs());
}
public function testSetParams(){
- $params = array('hi' => 'yo');
+ $params = ['hi' => 'yo'];
$this->tpl->setParams($params);
- $this->assertEquals(array('hi' => 'yo'), $this->tpl->getParams());
+ $this->assertEquals(['hi' => 'yo'], $this->tpl->getParams());
}
@@ -75,12 +75,12 @@ class TemplateResponseTest extends \Test\TestCase {
}
public function testChainability() {
- $params = array('hi' => 'yo');
+ $params = ['hi' => 'yo'];
$this->tpl->setParams($params)
->setStatus(Http::STATUS_NOT_FOUND);
$this->assertEquals(Http::STATUS_NOT_FOUND, $this->tpl->getStatus());
- $this->assertEquals(array('hi' => 'yo'), $this->tpl->getParams());
+ $this->assertEquals(['hi' => 'yo'], $this->tpl->getParams());
}
}
diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php
index 4d184adcdb..95f8996dbd 100644
--- a/tests/lib/AppFramework/Routing/RoutingTest.php
+++ b/tests/lib/AppFramework/Routing/RoutingTest.php
@@ -15,9 +15,9 @@ class RoutingTest extends \Test\TestCase
public function testSimpleRoute()
{
- $routes = array('routes' => array(
- array('name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'GET')
- ));
+ $routes = ['routes' => [
+ ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'GET']
+ ]];
$this->assertSimpleRoute($routes, 'folders.open', 'GET', '/folders/{folderId}/open', 'FoldersController', 'open');
}
@@ -33,9 +33,9 @@ class RoutingTest extends \Test\TestCase
public function testSimpleRouteWithMissingVerb()
{
- $routes = array('routes' => array(
- array('name' => 'folders#open', 'url' => '/folders/{folderId}/open')
- ));
+ $routes = ['routes' => [
+ ['name' => 'folders#open', 'url' => '/folders/{folderId}/open']
+ ]];
$this->assertSimpleRoute($routes, 'folders.open', 'GET', '/folders/{folderId}/open', 'FoldersController', 'open');
}
@@ -51,9 +51,9 @@ class RoutingTest extends \Test\TestCase
public function testSimpleRouteWithLowercaseVerb()
{
- $routes = array('routes' => array(
- array('name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete')
- ));
+ $routes = ['routes' => [
+ ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete']
+ ]];
$this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open');
}
@@ -69,11 +69,11 @@ class RoutingTest extends \Test\TestCase
public function testSimpleRouteWithRequirements()
{
- $routes = array('routes' => array(
- array('name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'requirements' => array('something'))
- ));
+ $routes = ['routes' => [
+ ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'requirements' => ['something']]
+ ]];
- $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', array('something'));
+ $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', ['something']);
}
public function testSimpleOCSRouteWithRequirements() {
@@ -87,11 +87,11 @@ class RoutingTest extends \Test\TestCase
public function testSimpleRouteWithDefaults()
{
- $routes = array('routes' => array(
- array('name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', array(), 'defaults' => array('param' => 'foobar'))
- ));
+ $routes = ['routes' => [
+ ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', [], 'defaults' => ['param' => 'foobar']]
+ ]];
- $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', array(), array('param' => 'foobar'));
+ $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', [], ['param' => 'foobar']);
}
@@ -106,11 +106,11 @@ class RoutingTest extends \Test\TestCase
public function testSimpleRouteWithPostfix()
{
- $routes = array('routes' => array(
- array('name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'postfix' => '_something')
- ));
+ $routes = ['routes' => [
+ ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'postfix' => '_something']
+ ]];
- $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', array(), array(), '_something');
+ $this->assertSimpleRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', [], [], '_something');
}
public function testSimpleOCSRouteWithPostfix() {
@@ -127,9 +127,9 @@ class RoutingTest extends \Test\TestCase
{
$this->expectException(\UnexpectedValueException::class);
- $routes = array('routes' => array(
- array('name' => 'folders_open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete')
- ));
+ $routes = ['routes' => [
+ ['name' => 'folders_open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete']
+ ]];
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
@@ -167,9 +167,9 @@ class RoutingTest extends \Test\TestCase
public function testSimpleRouteWithUnderScoreNames()
{
- $routes = array('routes' => array(
- array('name' => 'admin_folders#open_current', 'url' => '/folders/{folderId}/open', 'verb' => 'delete')
- ));
+ $routes = ['routes' => [
+ ['name' => 'admin_folders#open_current', 'url' => '/folders/{folderId}/open', 'verb' => 'delete']
+ ]];
$this->assertSimpleRoute($routes, 'admin_folders.open_current', 'DELETE', '/folders/{folderId}/open', 'AdminFoldersController', 'openCurrent');
}
@@ -205,14 +205,14 @@ class RoutingTest extends \Test\TestCase
public function testResource()
{
- $routes = array('resources' => array('account' => array('url' => '/accounts')));
+ $routes = ['resources' => ['account' => ['url' => '/accounts']]];
$this->assertResource($routes, 'account', '/accounts', 'AccountController', 'id');
}
public function testResourceWithUnderScoreName()
{
- $routes = array('resources' => array('admin_accounts' => array('url' => '/admin/accounts')));
+ $routes = ['resources' => ['admin_accounts' => ['url' => '/admin/accounts']]];
$this->assertResource($routes, 'admin_accounts', '/admin/accounts', 'AdminAccountsController', 'id');
}
@@ -224,7 +224,7 @@ class RoutingTest extends \Test\TestCase
* @param string $controllerName
* @param string $actionName
*/
- private function assertSimpleRoute($routes, $name, $verb, $url, $controllerName, $actionName, array $requirements=array(), array $defaults=array(), $postfix='')
+ private function assertSimpleRoute($routes, $name, $verb, $url, $controllerName, $actionName, array $requirements=[], array $defaults=[], $postfix='')
{
if ($postfix) {
$name .= $postfix;
@@ -270,8 +270,8 @@ class RoutingTest extends \Test\TestCase
$url,
$controllerName,
$actionName,
- array $requirements=array(),
- array $defaults=array(),
+ array $requirements=[],
+ array $defaults=[],
$postfix='')
{
if ($postfix) {
@@ -437,8 +437,8 @@ class RoutingTest extends \Test\TestCase
$verb,
$controllerName,
$actionName,
- array $requirements=array(),
- array $defaults=array()
+ array $requirements=[],
+ array $defaults=[]
) {
$route = $this->getMockBuilder('\OC\Route\Route')
->setMethods(['method', 'action', 'requirements', 'defaults'])
diff --git a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php
index fe1fc5bfa1..5a3c3f2a00 100644
--- a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php
+++ b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php
@@ -193,7 +193,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
'arguments'
);
- $this->assertEquals(array('arg' => null, 'arg2' => 'hi'), $reader->getParameters());
+ $this->assertEquals(['arg' => null, 'arg2' => 'hi'], $reader->getParameters());
}
@@ -205,7 +205,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
'arguments2'
);
- $this->assertEquals(array('arg' => null), $reader->getParameters());
+ $this->assertEquals(['arg' => null], $reader->getParameters());
}
diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php
index 3ec70d7142..75084e7f0f 100644
--- a/tests/lib/AppTest.php
+++ b/tests/lib/AppTest.php
@@ -28,245 +28,245 @@ class AppTest extends \Test\TestCase {
const TEST_GROUP2 = 'group2';
public function appVersionsProvider() {
- return array(
+ return [
// exact match
- array(
+ [
'6.0.0.0',
- array(
+ [
'requiremin' => '6.0',
'requiremax' => '6.0',
- ),
+ ],
true
- ),
+ ],
// in-between match
- array(
+ [
'6.0.0.0',
- array(
+ [
'requiremin' => '5.0',
'requiremax' => '7.0',
- ),
+ ],
true
- ),
+ ],
// app too old
- array(
+ [
'6.0.0.0',
- array(
+ [
'requiremin' => '5.0',
'requiremax' => '5.0',
- ),
+ ],
false
- ),
+ ],
// app too new
- array(
+ [
'5.0.0.0',
- array(
+ [
'requiremin' => '6.0',
'requiremax' => '6.0',
- ),
+ ],
false
- ),
+ ],
// only min specified
- array(
+ [
'6.0.0.0',
- array(
+ [
'requiremin' => '6.0',
- ),
+ ],
true
- ),
+ ],
// only min specified fail
- array(
+ [
'5.0.0.0',
- array(
+ [
'requiremin' => '6.0',
- ),
+ ],
false
- ),
+ ],
// only min specified legacy
- array(
+ [
'6.0.0.0',
- array(
+ [
'require' => '6.0',
- ),
+ ],
true
- ),
+ ],
// only min specified legacy fail
- array(
+ [
'4.0.0.0',
- array(
+ [
'require' => '6.0',
- ),
+ ],
false
- ),
+ ],
// only max specified
- array(
+ [
'5.0.0.0',
- array(
+ [
'requiremax' => '6.0',
- ),
+ ],
true
- ),
+ ],
// only max specified fail
- array(
+ [
'7.0.0.0',
- array(
+ [
'requiremax' => '6.0',
- ),
+ ],
false
- ),
+ ],
// variations of versions
// single OC number
- array(
+ [
'4',
- array(
+ [
'require' => '4.0',
- ),
+ ],
true
- ),
+ ],
// multiple OC number
- array(
+ [
'4.3.1',
- array(
+ [
'require' => '4.3',
- ),
+ ],
true
- ),
+ ],
// single app number
- array(
+ [
'4',
- array(
+ [
'require' => '4',
- ),
+ ],
true
- ),
+ ],
// single app number fail
- array(
+ [
'4.3',
- array(
+ [
'require' => '5',
- ),
+ ],
false
- ),
+ ],
// complex
- array(
+ [
'5.0.0',
- array(
+ [
'require' => '4.5.1',
- ),
+ ],
true
- ),
+ ],
// complex fail
- array(
+ [
'4.3.1',
- array(
+ [
'require' => '4.3.2',
- ),
+ ],
false
- ),
+ ],
// two numbers
- array(
+ [
'4.3.1',
- array(
+ [
'require' => '4.4',
- ),
+ ],
false
- ),
+ ],
// one number fail
- array(
+ [
'4.3.1',
- array(
+ [
'require' => '5',
- ),
+ ],
false
- ),
+ ],
// pre-alpha app
- array(
+ [
'5.0.3',
- array(
+ [
'require' => '4.93',
- ),
+ ],
true
- ),
+ ],
// pre-alpha OC
- array(
+ [
'6.90.0.2',
- array(
+ [
'require' => '6.90',
- ),
+ ],
true
- ),
+ ],
// pre-alpha OC max
- array(
+ [
'6.90.0.2',
- array(
+ [
'requiremax' => '7',
- ),
+ ],
true
- ),
+ ],
// expect same major number match
- array(
+ [
'5.0.3',
- array(
+ [
'require' => '5',
- ),
+ ],
true
- ),
+ ],
// expect same major number match
- array(
+ [
'5.0.3',
- array(
+ [
'requiremax' => '5',
- ),
+ ],
true
- ),
+ ],
// dependencies versions before require*
- array(
+ [
'6.0.0.0',
- array(
+ [
'requiremin' => '5.0',
'requiremax' => '7.0',
- 'dependencies' => array(
- 'owncloud' => array(
- '@attributes' => array(
+ 'dependencies' => [
+ 'owncloud' => [
+ '@attributes' => [
'min-version' => '7.0',
'max-version' => '7.0',
- ),
- ),
- ),
- ),
+ ],
+ ],
+ ],
+ ],
false
- ),
- array(
+ ],
+ [
'6.0.0.0',
- array(
+ [
'requiremin' => '5.0',
'requiremax' => '7.0',
- 'dependencies' => array(
- 'owncloud' => array(
- '@attributes' => array(
+ 'dependencies' => [
+ 'owncloud' => [
+ '@attributes' => [
'min-version' => '5.0',
'max-version' => '5.0',
- ),
- ),
- ),
- ),
+ ],
+ ],
+ ],
+ ],
false
- ),
- array(
+ ],
+ [
'6.0.0.0',
- array(
+ [
'requiremin' => '5.0',
'requiremax' => '5.0',
- 'dependencies' => array(
- 'owncloud' => array(
- '@attributes' => array(
+ 'dependencies' => [
+ 'owncloud' => [
+ '@attributes' => [
'min-version' => '5.0',
'max-version' => '7.0',
- ),
- ),
- ),
- ),
+ ],
+ ],
+ ],
+ ],
true
- ),
+ ],
[
'9.2.0.0',
[
@@ -301,7 +301,7 @@ class AppTest extends \Test\TestCase {
],
true
],
- );
+ ];
}
/**
@@ -329,11 +329,11 @@ class AppTest extends \Test\TestCase {
* Providers for the app config values
*/
public function appConfigValuesProvider() {
- return array(
+ return [
// logged in user1
- array(
+ [
self::TEST_USER1,
- array(
+ [
'files',
'app1',
'app3',
@@ -349,13 +349,13 @@ class AppTest extends \Test\TestCase {
'twofactor_backupcodes',
'viewer',
'workflowengine',
- ),
+ ],
false
- ),
+ ],
// logged in user2
- array(
+ [
self::TEST_USER2,
- array(
+ [
'files',
'app1',
'app3',
@@ -371,13 +371,13 @@ class AppTest extends \Test\TestCase {
'twofactor_backupcodes',
'viewer',
'workflowengine',
- ),
+ ],
false
- ),
+ ],
// logged in user3
- array(
+ [
self::TEST_USER3,
- array(
+ [
'files',
'app1',
'app3',
@@ -394,13 +394,13 @@ class AppTest extends \Test\TestCase {
'twofactor_backupcodes',
'viewer',
'workflowengine',
- ),
+ ],
false
- ),
+ ],
// no user, returns all apps
- array(
+ [
null,
- array(
+ [
'files',
'app1',
'app3',
@@ -417,13 +417,13 @@ class AppTest extends \Test\TestCase {
'twofactor_backupcodes',
'viewer',
'workflowengine',
- ),
+ ],
false,
- ),
+ ],
// user given, but ask for all
- array(
+ [
self::TEST_USER1,
- array(
+ [
'files',
'app1',
'app3',
@@ -440,10 +440,10 @@ class AppTest extends \Test\TestCase {
'twofactor_backupcodes',
'viewer',
'workflowengine',
- ),
+ ],
true,
- ),
- );
+ ],
+ ];
}
/**
@@ -470,14 +470,14 @@ class AppTest extends \Test\TestCase {
$this->setupAppConfigMock()->expects($this->once())
->method('getValues')
->willReturn(
- array(
+ [
'app3' => 'yes',
'app2' => 'no',
'app1' => 'yes',
'appforgroup1' => '["group1"]',
'appforgroup2' => '["group2"]',
'appforgroup12' => '["group2","group1"]',
- )
+ ]
);
@@ -509,19 +509,19 @@ class AppTest extends \Test\TestCase {
$this->setupAppConfigMock()->expects($this->once())
->method('getValues')
->willReturn(
- array(
+ [
'app3' => 'yes',
'app2' => 'no',
- )
+ ]
);
$apps = \OC_App::getEnabledApps();
- $this->assertEquals(array('files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'provisioning_api', 'settings', 'twofactor_backupcodes', 'viewer', 'workflowengine'), $apps);
+ $this->assertEquals(['files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'provisioning_api', 'settings', 'twofactor_backupcodes', 'viewer', 'workflowengine'], $apps);
// mock should not be called again here
$apps = \OC_App::getEnabledApps();
- $this->assertEquals(array('files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'provisioning_api', 'settings', 'twofactor_backupcodes', 'viewer', 'workflowengine'), $apps);
+ $this->assertEquals(['files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'provisioning_api', 'settings', 'twofactor_backupcodes', 'viewer', 'workflowengine'], $apps);
$this->restoreAppConfig();
\OC_User::setUserId(null);
diff --git a/tests/lib/Archive/TestBase.php b/tests/lib/Archive/TestBase.php
index bdfe65d430..8ecedb189c 100644
--- a/tests/lib/Archive/TestBase.php
+++ b/tests/lib/Archive/TestBase.php
@@ -29,7 +29,7 @@ abstract class TestBase extends \Test\TestCase {
public function testGetFiles() {
$this->instance=$this->getExisting();
$allFiles=$this->instance->getFiles();
- $expected=array('lorem.txt','logo-wide.png','dir/', 'dir/lorem.txt');
+ $expected=['lorem.txt','logo-wide.png','dir/', 'dir/lorem.txt'];
$this->assertEquals(4, count($allFiles), 'only found '.count($allFiles).' out of 4 expected files');
foreach($expected as $file) {
$this->assertContains($file, $allFiles, 'cant find '. $file . ' in archive');
@@ -38,14 +38,14 @@ abstract class TestBase extends \Test\TestCase {
$this->assertFalse($this->instance->fileExists('non/existing/file'));
$rootContent=$this->instance->getFolder('');
- $expected=array('lorem.txt','logo-wide.png', 'dir/');
+ $expected=['lorem.txt','logo-wide.png', 'dir/'];
$this->assertEquals(3, count($rootContent));
foreach($expected as $file) {
$this->assertContains($file, $rootContent, 'cant find '. $file . ' in archive');
}
$dirContent=$this->instance->getFolder('dir/');
- $expected=array('lorem.txt');
+ $expected=['lorem.txt'];
$this->assertEquals(1, count($dirContent));
foreach($expected as $file) {
$this->assertContains($file, $dirContent, 'cant find '. $file . ' in archive');
diff --git a/tests/lib/BackgroundJob/DummyJobList.php b/tests/lib/BackgroundJob/DummyJobList.php
index fe8ca5aefe..4b8de82b36 100644
--- a/tests/lib/BackgroundJob/DummyJobList.php
+++ b/tests/lib/BackgroundJob/DummyJobList.php
@@ -18,7 +18,7 @@ class DummyJobList extends \OC\BackgroundJob\JobList {
/**
* @var IJob[]
*/
- private $jobs = array();
+ private $jobs = [];
private $last = 0;
diff --git a/tests/lib/BackgroundJob/JobListTest.php b/tests/lib/BackgroundJob/JobListTest.php
index 6e99a71d1e..3013afdfa1 100644
--- a/tests/lib/BackgroundJob/JobListTest.php
+++ b/tests/lib/BackgroundJob/JobListTest.php
@@ -64,16 +64,16 @@ class JobListTest extends TestCase {
}
public function argumentProvider() {
- return array(
- array(null),
- array(false),
- array('foobar'),
- array(12),
- array(array(
+ return [
+ [null],
+ [false],
+ ['foobar'],
+ [12],
+ [[
'asd' => 5,
'foo' => 'bar'
- ))
- );
+ ]]
+ ];
}
/**
diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php
index cadeb502b4..df7a72a749 100644
--- a/tests/lib/Cache/FileCacheTest.php
+++ b/tests/lib/Cache/FileCacheTest.php
@@ -61,8 +61,8 @@ class FileCacheTest extends TestCache {
//set up temporary storage
$this->storage = \OC\Files\Filesystem::getStorage('/');
\OC\Files\Filesystem::clearMounts();
- $storage = new \OC\Files\Storage\Temporary(array());
- \OC\Files\Filesystem::mount($storage,array(),'/');
+ $storage = new \OC\Files\Storage\Temporary([]);
+ \OC\Files\Filesystem::mount($storage,[],'/');
$datadir = str_replace('local::', '', $storage->getId());
$config = \OC::$server->getConfig();
$this->datadir = $config->getSystemValue('cachedirectory', \OC::$SERVERROOT.'/data/cache');
@@ -106,7 +106,7 @@ class FileCacheTest extends TestCache {
// Restore the original mount point
\OC\Files\Filesystem::clearMounts();
- \OC\Files\Filesystem::mount($this->storage, array(), '/');
+ \OC\Files\Filesystem::mount($this->storage, [], '/');
parent::tearDown();
}
@@ -117,7 +117,7 @@ class FileCacheTest extends TestCache {
->setConstructorArgs([['datadir' => \OC::$server->getTempManager()->getTemporaryFolder()]])
->getMock();
- \OC\Files\Filesystem::mount($mockStorage, array(), '/test/cache');
+ \OC\Files\Filesystem::mount($mockStorage, [], '/test/cache');
return $mockStorage;
}
diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
index 4ac2cc124e..59338b74de 100644
--- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
@@ -410,20 +410,20 @@ class RemotePluginTest extends TestCase {
}
public function dataTestSplitUserRemoteError() {
- return array(
+ return [
// Invalid path
- array('user@'),
+ ['user@'],
// Invalid user
- array('@server'),
- array('us/er@server'),
- array('us:er@server'),
+ ['@server'],
+ ['us/er@server'],
+ ['us:er@server'],
// Invalid splitting
- array('user'),
- array(''),
- array('us/erserver'),
- array('us:erserver'),
- );
+ ['user'],
+ [''],
+ ['us/erserver'],
+ ['us:erserver'],
+ ];
}
}
diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php
index 109f7471e9..58144b2c26 100644
--- a/tests/lib/ConfigTest.php
+++ b/tests/lib/ConfigTest.php
@@ -12,7 +12,7 @@ class ConfigTest extends TestCase {
const TESTCONTENT = '"bar", "beers" => array("Appenzeller", "Guinness", "Kölsch"), "alcohol_free" => false);';
/** @var array */
- private $initialConfig = array('foo' => 'bar', 'beers' => array('Appenzeller', 'Guinness', 'Kölsch'), 'alcohol_free' => false);
+ private $initialConfig = ['foo' => 'bar', 'beers' => ['Appenzeller', 'Guinness', 'Kölsch'], 'alcohol_free' => false];
/** @var string */
private $configFile;
/** @var \OC\Config */
@@ -35,7 +35,7 @@ class ConfigTest extends TestCase {
}
public function testGetKeys() {
- $expectedConfig = array('foo', 'beers', 'alcohol_free');
+ $expectedConfig = ['foo', 'beers', 'alcohol_free'];
$this->assertSame($expectedConfig, $this->config->getKeys());
}
@@ -44,8 +44,8 @@ class ConfigTest extends TestCase {
$this->assertSame(null, $this->config->getValue('bar'));
$this->assertSame('moo', $this->config->getValue('bar', 'moo'));
$this->assertSame(false, $this->config->getValue('alcohol_free', 'someBogusValue'));
- $this->assertSame(array('Appenzeller', 'Guinness', 'Kölsch'), $this->config->getValue('beers', 'someBogusValue'));
- $this->assertSame(array('Appenzeller', 'Guinness', 'Kölsch'), $this->config->getValue('beers'));
+ $this->assertSame(['Appenzeller', 'Guinness', 'Kölsch'], $this->config->getValue('beers', 'someBogusValue'));
+ $this->assertSame(['Appenzeller', 'Guinness', 'Kölsch'], $this->config->getValue('beers'));
}
public function testGetValueReturnsEnvironmentValueIfSet() {
@@ -81,9 +81,9 @@ class ConfigTest extends TestCase {
$this->assertEquals($expected, $content);
$this->config->setValue('bar', 'red');
- $this->config->setValue('apps', array('files', 'gallery'));
+ $this->config->setValue('apps', ['files', 'gallery']);
$expectedConfig['bar'] = 'red';
- $expectedConfig['apps'] = array('files', 'gallery');
+ $expectedConfig['apps'] = ['files', 'gallery'];
$this->assertAttributeEquals($expectedConfig, 'cache', $this->config);
$content = file_get_contents($this->configFile);
@@ -150,7 +150,7 @@ class ConfigTest extends TestCase {
$this->assertEquals(self::TESTCONTENT, file_get_contents($this->configFile));
// Write a new value to the config
- $this->config->setValue('CoolWebsites', array('demo.owncloud.org', 'owncloud.org', 'owncloud.com'));
+ $this->config->setValue('CoolWebsites', ['demo.owncloud.org', 'owncloud.org', 'owncloud.com']);
$expected = " 'bar',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " .
" 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n 'php53' => 'totallyOutdated',\n 'CoolWebsites' => \n array (\n " .
" 0 => 'demo.owncloud.org',\n 1 => 'owncloud.org',\n 2 => 'owncloud.com',\n ),\n);\n";
diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php
index f39d849bb9..5437ca3fba 100644
--- a/tests/lib/ContactsManagerTest.php
+++ b/tests/lib/ContactsManagerTest.php
@@ -15,48 +15,48 @@ class ContactsManagerTest extends \Test\TestCase {
}
public function searchProvider(){
- $search1 = array(
- 0 => array(
- 'N' => array(0 => '', 1 => 'Jan', 2 => 'Jansen', 3 => '', 4 => '',),
+ $search1 = [
+ 0 => [
+ 'N' => [0 => '', 1 => 'Jan', 2 => 'Jansen', 3 => '', 4 => '',],
'UID' => '04ada7f5-01f9-4309-9c82-6b555b2170ed',
'FN' => 'Jan Jansen',
'id' => '1',
'addressbook-key' => 'simple:1',
- ),
- 0 => array(
- 'N' => array(0 => '', 1 => 'Tom', 2 => 'Peeters', 3 => '', 4 => '',),
+ ],
+ 0 => [
+ 'N' => [0 => '', 1 => 'Tom', 2 => 'Peeters', 3 => '', 4 => '',],
'UID' => '04ada7f5-01f9-4309-9c82-2345-2345--6b555b2170ed',
'FN' => 'Tom Peeters',
'id' => '2',
'addressbook-key' => 'simple:1',
- ),
- );
+ ],
+ ];
- $search2 = array(
- 0 => array(
- 'N' => array(0 => '', 1 => 'fg', 2 => '', 3 => '', 4 => '',),
+ $search2 = [
+ 0 => [
+ 'N' => [0 => '', 1 => 'fg', 2 => '', 3 => '', 4 => '',],
'UID' => '04ada234h5jh357f5-01f9-4309-9c82-6b555b2170ed',
'FN' => 'Jan Rompuy',
'id' => '1',
'addressbook-key' => 'simple:2',
- ),
- 0 => array(
- 'N' => array(0 => '', 1 => 'fg', 2 => '', 3 => '', 4 => '',),
+ ],
+ 0 => [
+ 'N' => [0 => '', 1 => 'fg', 2 => '', 3 => '', 4 => '',],
'UID' => '04ada7f5-01f9-4309-345kj345j9c82-2345-2345--6b555b2170ed',
'FN' => 'Tim Peeters',
'id' => '2',
'addressbook-key' => 'simple:2',
- ),
- );
+ ],
+ ];
$expectedResult = array_merge($search1, $search2);
- return array(
- array(
+ return [
+ [
$search1,
$search2,
$expectedResult
- )
- );
+ ]
+ ];
}
/**
@@ -164,7 +164,7 @@ class ContactsManagerTest extends \Test\TestCase {
->willReturn('returnMe');
$this->cm->registerAddressBook($addressbook);
- $result = $this->cm->createOrUpdate(array(), $addressbook->getKey());
+ $result = $this->cm->createOrUpdate([], $addressbook->getKey());
$this->assertEquals($result, 'returnMe');
}
@@ -182,7 +182,7 @@ class ContactsManagerTest extends \Test\TestCase {
->method('createOrUpdate');
$this->cm->registerAddressBook($addressbook);
- $result = $this->cm->createOrUpdate(array(), $addressbook->getKey());
+ $result = $this->cm->createOrUpdate([], $addressbook->getKey());
$this->assertEquals($result, null);
}
@@ -197,7 +197,7 @@ class ContactsManagerTest extends \Test\TestCase {
->method('createOrUpdate');
$this->cm->registerAddressBook($addressbook);
- $result = $this->cm->createOrUpdate(array(), 'noaddressbook');
+ $result = $this->cm->createOrUpdate([], 'noaddressbook');
$this->assertEquals($result, null);
}
diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php
index ce7ef0a3a6..cd4befdbe5 100644
--- a/tests/lib/DB/LegacyDBTest.php
+++ b/tests/lib/DB/LegacyDBTest.php
@@ -85,15 +85,15 @@ class LegacyDBTest extends \Test\TestCase {
public function testQuotes() {
$query = OC_DB::prepare('SELECT `fullname` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?');
- $result = $query->execute(array('uri_1'));
+ $result = $query->execute(['uri_1']);
$this->assertTrue((bool)$result);
$row = $result->fetchRow();
$this->assertFalse($row);
$query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (?,?)');
- $result = $query->execute(array('fullname test', 'uri_1'));
+ $result = $query->execute(['fullname test', 'uri_1']);
$this->assertEquals(1, $result);
$query = OC_DB::prepare('SELECT `fullname`,`uri` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?');
- $result = $query->execute(array('uri_1'));
+ $result = $query->execute(['uri_1']);
$this->assertTrue((bool)$result);
$row = $result->fetchRow();
$this->assertArrayHasKey('fullname', $row);
@@ -107,29 +107,29 @@ class LegacyDBTest extends \Test\TestCase {
*/
public function testNOW() {
$query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (NOW(),?)');
- $result = $query->execute(array('uri_2'));
+ $result = $query->execute(['uri_2']);
$this->assertEquals(1, $result);
$query = OC_DB::prepare('SELECT `fullname`,`uri` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?');
- $result = $query->execute(array('uri_2'));
+ $result = $query->execute(['uri_2']);
$this->assertTrue((bool)$result);
}
public function testUNIX_TIMESTAMP() {
$query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (UNIX_TIMESTAMP(),?)');
- $result = $query->execute(array('uri_3'));
+ $result = $query->execute(['uri_3']);
$this->assertEquals(1, $result);
$query = OC_DB::prepare('SELECT `fullname`,`uri` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?');
- $result = $query->execute(array('uri_3'));
+ $result = $query->execute(['uri_3']);
$this->assertTrue((bool)$result);
}
public function testLastInsertId() {
$query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (?,?)');
- $result1 = OC_DB::executeAudited($query, array('insertid 1','uri_1'));
+ $result1 = OC_DB::executeAudited($query, ['insertid 1','uri_1']);
$id1 = \OC::$server->getDatabaseConnection()->lastInsertId('*PREFIX*'.$this->table2);
// we don't know the id we should expect, so insert another row
- $result2 = OC_DB::executeAudited($query, array('insertid 2','uri_2'));
+ $result2 = OC_DB::executeAudited($query, ['insertid 2','uri_2']);
$id2 = \OC::$server->getDatabaseConnection()->lastInsertId('*PREFIX*'.$this->table2);
// now we can check if the two ids are in correct order
$this->assertGreaterThan($id1, $id2);
@@ -140,7 +140,7 @@ class LegacyDBTest extends \Test\TestCase {
$expected = "Ћö雙喜\xE2\x80\xA2";
$query = OC_DB::prepare("INSERT INTO `$table` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)");
- $result = $query->execute(array($expected, 'uri_1', 'This is a vCard'));
+ $result = $query->execute([$expected, 'uri_1', 'This is a vCard']);
$this->assertEquals(1, $result);
$actual = OC_DB::prepare("SELECT `fullname` FROM `$table`")->execute()->fetchOne();
@@ -156,7 +156,7 @@ class LegacyDBTest extends \Test\TestCase {
$rowname = 'decimaltest';
$query = OC_DB::prepare('INSERT INTO `' . $table . '` (`' . $rowname . '`) VALUES (?)');
- $result = $query->execute(array($insert));
+ $result = $query->execute([$insert]);
$this->assertEquals(1, $result);
$query = OC_DB::prepare('SELECT `' . $rowname . '` FROM `' . $table . '`');
$result = $query->execute();
@@ -205,35 +205,35 @@ class LegacyDBTest extends \Test\TestCase {
// updating to. MySQL reports 1 here when the PDO::MYSQL_ATTR_FOUND_ROWS
// flag is not specified.
$query = OC_DB::prepare("UPDATE `*PREFIX*{$this->table2}` SET `uri` = ?");
- $this->assertSame(2, $query->execute(array('uri1')));
+ $this->assertSame(2, $query->execute(['uri1']));
}
protected function insertCardData($fullname, $uri) {
$query = OC_DB::prepare("INSERT INTO `*PREFIX*{$this->table2}` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)");
- $this->assertSame(1, $query->execute(array($fullname, $uri, $this->getUniqueID())));
+ $this->assertSame(1, $query->execute([$fullname, $uri, $this->getUniqueID()]));
}
protected function updateCardData($fullname, $uri) {
$query = OC_DB::prepare("UPDATE `*PREFIX*{$this->table2}` SET `uri` = ? WHERE `fullname` = ?");
- return $query->execute(array($uri, $fullname));
+ return $query->execute([$uri, $fullname]);
}
public function testILIKE() {
$table = "*PREFIX*{$this->table2}";
$query = OC_DB::prepare("INSERT INTO `$table` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)");
- $query->execute(array('fooBAR', 'foo', 'bar'));
+ $query->execute(['fooBAR', 'foo', 'bar']);
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` LIKE ?");
- $result = $query->execute(array('foobar'));
+ $result = $query->execute(['foobar']);
$this->assertCount(0, $result->fetchAll());
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` ILIKE ?");
- $result = $query->execute(array('foobar'));
+ $result = $query->execute(['foobar']);
$this->assertCount(1, $result->fetchAll());
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` ILIKE ?");
- $result = $query->execute(array('foo'));
+ $result = $query->execute(['foo']);
$this->assertCount(0, $result->fetchAll());
}
@@ -241,30 +241,30 @@ class LegacyDBTest extends \Test\TestCase {
$table = "*PREFIX*{$this->table2}";
$query = OC_DB::prepare("INSERT INTO `$table` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)");
- $query->execute(array('FooBAR', 'foo', 'bar'));
+ $query->execute(['FooBAR', 'foo', 'bar']);
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` LIKE ?");
- $result = $query->execute(array('%bar'));
+ $result = $query->execute(['%bar']);
$this->assertCount(0, $result->fetchAll());
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` LIKE ?");
- $result = $query->execute(array('foo%'));
+ $result = $query->execute(['foo%']);
$this->assertCount(0, $result->fetchAll());
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` LIKE ?");
- $result = $query->execute(array('%ba%'));
+ $result = $query->execute(['%ba%']);
$this->assertCount(0, $result->fetchAll());
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` ILIKE ?");
- $result = $query->execute(array('%bar'));
+ $result = $query->execute(['%bar']);
$this->assertCount(1, $result->fetchAll());
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` ILIKE ?");
- $result = $query->execute(array('foo%'));
+ $result = $query->execute(['foo%']);
$this->assertCount(1, $result->fetchAll());
$query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` ILIKE ?");
- $result = $query->execute(array('%ba%'));
+ $result = $query->execute(['%ba%']);
$this->assertCount(1, $result->fetchAll());
}
@@ -279,7 +279,7 @@ class LegacyDBTest extends \Test\TestCase {
if ($throwsOnMysqlWithoutUTF8MB4 && $config->getSystemValue('dbtype', 'sqlite') === 'mysql' && $config->getSystemValue('mysql.utf8mb4', false) === false) {
$this->markTestSkipped('MySQL requires UTF8mb4 to store value: ' . $expected);
}
- $result = $query->execute(array($expected));
+ $result = $query->execute([$expected]);
$this->assertEquals(1, $result);
$actual = OC_DB::prepare("SELECT `textfield` FROM `$table`")->execute()->fetchOne();
diff --git a/tests/lib/DB/MDB2SchemaManagerTest.php b/tests/lib/DB/MDB2SchemaManagerTest.php
index 8c9290c56b..d83131a685 100644
--- a/tests/lib/DB/MDB2SchemaManagerTest.php
+++ b/tests/lib/DB/MDB2SchemaManagerTest.php
@@ -40,10 +40,10 @@ class MDB2SchemaManagerTest extends \Test\TestCase {
$manager = new \OC\DB\MDB2SchemaManager($connection);
$manager->createDbFromStructure(__DIR__ . '/ts-autoincrement-before.xml');
- $connection->executeUpdate('insert into `*PREFIX*table` values (?)', array('abc'));
- $connection->executeUpdate('insert into `*PREFIX*table` values (?)', array('abc'));
- $connection->executeUpdate('insert into `*PREFIX*table` values (?)', array('123'));
- $connection->executeUpdate('insert into `*PREFIX*table` values (?)', array('123'));
+ $connection->executeUpdate('insert into `*PREFIX*table` values (?)', ['abc']);
+ $connection->executeUpdate('insert into `*PREFIX*table` values (?)', ['abc']);
+ $connection->executeUpdate('insert into `*PREFIX*table` values (?)', ['123']);
+ $connection->executeUpdate('insert into `*PREFIX*table` values (?)', ['123']);
$manager->updateDbFromStructure(__DIR__ . '/ts-autoincrement-after.xml');
$this->addToAssertionCount(1);
diff --git a/tests/lib/DB/MDB2SchemaReaderTest.php b/tests/lib/DB/MDB2SchemaReaderTest.php
index 5698ad966f..2f987adb29 100644
--- a/tests/lib/DB/MDB2SchemaReaderTest.php
+++ b/tests/lib/DB/MDB2SchemaReaderTest.php
@@ -38,10 +38,10 @@ class MDB2SchemaReaderTest extends TestCase {
->getMock();
$config->expects($this->any())
->method('getSystemValue')
- ->willReturnMap(array(
- array('dbname', 'owncloud', 'testDB'),
- array('dbtableprefix', 'oc_', 'test_')
- ));
+ ->willReturnMap([
+ ['dbname', 'owncloud', 'testDB'],
+ ['dbtableprefix', 'oc_', 'test_']
+ ]);
return $config;
}
@@ -85,10 +85,10 @@ class MDB2SchemaReaderTest extends TestCase {
$this->assertEquals(2, $table->getColumn('decimalfield_precision_scale')->getScale());
$this->assertCount(2, $table->getIndexes());
- $this->assertEquals(array('integerfield'), $table->getIndex('primary')->getUnquotedColumns());
+ $this->assertEquals(['integerfield'], $table->getIndex('primary')->getUnquotedColumns());
$this->assertTrue($table->getIndex('primary')->isPrimary());
$this->assertTrue($table->getIndex('primary')->isUnique());
- $this->assertEquals(array('booleanfield'), $table->getIndex('index_boolean')->getUnquotedColumns());
+ $this->assertEquals(['booleanfield'], $table->getIndex('index_boolean')->getUnquotedColumns());
$this->assertFalse($table->getIndex('index_boolean')->isPrimary());
$this->assertFalse($table->getIndex('index_boolean')->isUnique());
}
diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php
index e5cc28654e..a438d0189d 100644
--- a/tests/lib/DB/MigratorTest.php
+++ b/tests/lib/DB/MigratorTest.php
@@ -77,19 +77,19 @@ class MigratorTest extends \Test\TestCase {
* @return \Doctrine\DBAL\Schema\Schema[]
*/
private function getDuplicateKeySchemas() {
- $startSchema = new Schema(array(), array(), $this->getSchemaConfig());
+ $startSchema = new Schema([], [], $this->getSchemaConfig());
$table = $startSchema->createTable($this->tableName);
$table->addColumn('id', 'integer');
$table->addColumn('name', 'string');
- $table->addIndex(array('id'), $this->tableName . '_id');
+ $table->addIndex(['id'], $this->tableName . '_id');
- $endSchema = new Schema(array(), array(), $this->getSchemaConfig());
+ $endSchema = new Schema([], [], $this->getSchemaConfig());
$table = $endSchema->createTable($this->tableName);
$table->addColumn('id', 'integer');
$table->addColumn('name', 'string');
- $table->addUniqueIndex(array('id'), $this->tableName . '_id');
+ $table->addUniqueIndex(['id'], $this->tableName . '_id');
- return array($startSchema, $endSchema);
+ return [$startSchema, $endSchema];
}
private function getSchemaConfig() {
@@ -113,9 +113,9 @@ class MigratorTest extends \Test\TestCase {
$migrator = $this->manager->getMigrator();
$migrator->migrate($startSchema);
- $this->connection->insert($this->tableName, array('id' => 1, 'name' => 'foo'));
- $this->connection->insert($this->tableName, array('id' => 2, 'name' => 'bar'));
- $this->connection->insert($this->tableName, array('id' => 2, 'name' => 'qwerty'));
+ $this->connection->insert($this->tableName, ['id' => 1, 'name' => 'foo']);
+ $this->connection->insert($this->tableName, ['id' => 2, 'name' => 'bar']);
+ $this->connection->insert($this->tableName, ['id' => 2, 'name' => 'qwerty']);
$migrator->checkMigrate($endSchema);
$this->fail('checkMigrate should have failed');
@@ -126,9 +126,9 @@ class MigratorTest extends \Test\TestCase {
$migrator = $this->manager->getMigrator();
$migrator->migrate($startSchema);
- $this->connection->insert($this->tableName, array('id' => 1, 'name' => 'foo'));
- $this->connection->insert($this->tableName, array('id' => 2, 'name' => 'bar'));
- $this->connection->insert($this->tableName, array('id' => 3, 'name' => 'qwerty'));
+ $this->connection->insert($this->tableName, ['id' => 1, 'name' => 'foo']);
+ $this->connection->insert($this->tableName, ['id' => 2, 'name' => 'bar']);
+ $this->connection->insert($this->tableName, ['id' => 3, 'name' => 'qwerty']);
$migrator->checkMigrate($endSchema);
$migrator->migrate($endSchema);
@@ -145,9 +145,9 @@ class MigratorTest extends \Test\TestCase {
$migrator = $this->manager->getMigrator();
$migrator->migrate($startSchema);
- $this->connection->insert($this->tableName, array('id' => 1, 'name' => 'foo'));
- $this->connection->insert($this->tableName, array('id' => 2, 'name' => 'bar'));
- $this->connection->insert($this->tableName, array('id' => 3, 'name' => 'qwerty'));
+ $this->connection->insert($this->tableName, ['id' => 1, 'name' => 'foo']);
+ $this->connection->insert($this->tableName, ['id' => 2, 'name' => 'bar']);
+ $this->connection->insert($this->tableName, ['id' => 3, 'name' => 'qwerty']);
$migrator->checkMigrate($endSchema);
$migrator->migrate($endSchema);
@@ -163,10 +163,10 @@ class MigratorTest extends \Test\TestCase {
$migrator->migrate($endSchema);
- $this->connection->insert($this->tableName, array('id' => 1, 'name' => 'foo'));
- $this->connection->insert($this->tableName, array('id' => 2, 'name' => 'bar'));
+ $this->connection->insert($this->tableName, ['id' => 1, 'name' => 'foo']);
+ $this->connection->insert($this->tableName, ['id' => 2, 'name' => 'bar']);
try {
- $this->connection->insert($this->tableName, array('id' => 2, 'name' => 'qwerty'));
+ $this->connection->insert($this->tableName, ['id' => 2, 'name' => 'qwerty']);
$this->fail('Expected duplicate key insert to fail');
} catch (DBALException $e) {
$this->addToAssertionCount(1);
@@ -174,16 +174,16 @@ class MigratorTest extends \Test\TestCase {
}
public function testAddingPrimaryKeyWithAutoIncrement() {
- $startSchema = new Schema(array(), array(), $this->getSchemaConfig());
+ $startSchema = new Schema([], [], $this->getSchemaConfig());
$table = $startSchema->createTable($this->tableName);
$table->addColumn('id', 'integer');
$table->addColumn('name', 'string');
- $endSchema = new Schema(array(), array(), $this->getSchemaConfig());
+ $endSchema = new Schema([], [], $this->getSchemaConfig());
$table = $endSchema->createTable($this->tableName);
- $table->addColumn('id', 'integer', array('autoincrement' => true));
+ $table->addColumn('id', 'integer', ['autoincrement' => true]);
$table->addColumn('name', 'string');
- $table->setPrimaryKey(array('id'));
+ $table->setPrimaryKey(['id']);
$migrator = $this->manager->getMigrator();
$migrator->migrate($startSchema);
@@ -195,17 +195,17 @@ class MigratorTest extends \Test\TestCase {
}
public function testReservedKeywords() {
- $startSchema = new Schema(array(), array(), $this->getSchemaConfig());
+ $startSchema = new Schema([], [], $this->getSchemaConfig());
$table = $startSchema->createTable($this->tableName);
- $table->addColumn('id', 'integer', array('autoincrement' => true));
- $table->addColumn('user', 'string', array('length' => 255));
- $table->setPrimaryKey(array('id'));
+ $table->addColumn('id', 'integer', ['autoincrement' => true]);
+ $table->addColumn('user', 'string', ['length' => 255]);
+ $table->setPrimaryKey(['id']);
- $endSchema = new Schema(array(), array(), $this->getSchemaConfig());
+ $endSchema = new Schema([], [], $this->getSchemaConfig());
$table = $endSchema->createTable($this->tableName);
- $table->addColumn('id', 'integer', array('autoincrement' => true));
- $table->addColumn('user', 'string', array('length' => 64));
- $table->setPrimaryKey(array('id'));
+ $table->addColumn('id', 'integer', ['autoincrement' => true]);
+ $table->addColumn('user', 'string', ['length' => 64]);
+ $table->setPrimaryKey(['id']);
$migrator = $this->manager->getMigrator();
$migrator->migrate($startSchema);
@@ -227,7 +227,7 @@ class MigratorTest extends \Test\TestCase {
$tableFk = $startSchema->createTable($this->tableNameTmp);
$tableFk->addColumn('fk_id', 'integer');
$tableFk->addColumn('name', 'string');
- $tableFk->addForeignKeyConstraint($this->tableName, array('fk_id'), array('id'), array(), $fkName);
+ $tableFk->addForeignKeyConstraint($this->tableName, ['fk_id'], ['id'], [], $fkName);
$migrator = $this->manager->getMigrator();
$migrator->migrate($startSchema);
diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php
index 6cd8b572fc..1470f3b6bf 100644
--- a/tests/lib/DateTimeFormatterTest.php
+++ b/tests/lib/DateTimeFormatterTest.php
@@ -44,35 +44,35 @@ class DateTimeFormatterTest extends TestCase {
public function formatTimeSpanData() {
$time = 1416916800; // Use a fixed timestamp so we don't switch days/years with the getTimestampAgo
$deL10N = \OC::$server->getL10N('lib', 'de');
- return array(
- array('seconds ago', $time, $time),
- array('in a few seconds', $time + 5 , $time),
- array('1 minute ago', $this->getTimestampAgo($time, 30, 1), $time),
- array('15 minutes ago', $this->getTimestampAgo($time, 30, 15), $time),
- array('in 15 minutes', $time, $this->getTimestampAgo($time, 30, 15)),
- array('1 hour ago', $this->getTimestampAgo($time, 30, 15, 1), $time),
- array('3 hours ago', $this->getTimestampAgo($time, 30, 15, 3), $time),
- array('in 3 hours', $time, $this->getTimestampAgo($time, 30, 15, 3)),
- array('4 days ago', $this->getTimestampAgo($time, 30, 15, 3, 4), $time),
+ return [
+ ['seconds ago', $time, $time],
+ ['in a few seconds', $time + 5 , $time],
+ ['1 minute ago', $this->getTimestampAgo($time, 30, 1), $time],
+ ['15 minutes ago', $this->getTimestampAgo($time, 30, 15), $time],
+ ['in 15 minutes', $time, $this->getTimestampAgo($time, 30, 15)],
+ ['1 hour ago', $this->getTimestampAgo($time, 30, 15, 1), $time],
+ ['3 hours ago', $this->getTimestampAgo($time, 30, 15, 3), $time],
+ ['in 3 hours', $time, $this->getTimestampAgo($time, 30, 15, 3)],
+ ['4 days ago', $this->getTimestampAgo($time, 30, 15, 3, 4), $time],
- array('seconds ago', new \DateTime('Wed, 02 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('seconds ago', new \DateTime('Wed, 02 Oct 2013 23:59:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('1 minute ago', new \DateTime('Wed, 02 Oct 2013 23:58:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('3 minutes ago', new \DateTime('Wed, 02 Oct 2013 23:56:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('59 minutes ago', new \DateTime('Wed, 02 Oct 2013 23:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('1 hour ago', new \DateTime('Wed, 02 Oct 2013 22:59:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('3 hours ago', new \DateTime('Wed, 02 Oct 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('yesterday', new \DateTime('Tue, 01 Oct 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('2 days ago', new \DateTime('Mon, 30 Sep 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
+ ['seconds ago', new \DateTime('Wed, 02 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['seconds ago', new \DateTime('Wed, 02 Oct 2013 23:59:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['1 minute ago', new \DateTime('Wed, 02 Oct 2013 23:58:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['3 minutes ago', new \DateTime('Wed, 02 Oct 2013 23:56:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['59 minutes ago', new \DateTime('Wed, 02 Oct 2013 23:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['1 hour ago', new \DateTime('Wed, 02 Oct 2013 22:59:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['3 hours ago', new \DateTime('Wed, 02 Oct 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['yesterday', new \DateTime('Tue, 01 Oct 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['2 days ago', new \DateTime('Mon, 30 Sep 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
- array($deL10N->t('seconds ago'), new \DateTime('Wed, 02 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N),
- array($deL10N->n('%n minute ago', '%n minutes ago', 1), new \DateTime('Wed, 02 Oct 2013 23:58:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N),
- array($deL10N->n('%n minute ago', '%n minutes ago', 3), new \DateTime('Wed, 02 Oct 2013 23:56:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N),
- array($deL10N->n('%n hour ago', '%n hours ago', 1), new \DateTime('Wed, 02 Oct 2013 22:59:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N),
- array($deL10N->n('%n hour ago', '%n hours ago', 3), new \DateTime('Wed, 02 Oct 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N),
- array($deL10N->n('%n day ago', '%n days ago', 2), new \DateTime('Mon, 30 Sep 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N),
+ [$deL10N->t('seconds ago'), new \DateTime('Wed, 02 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N],
+ [$deL10N->n('%n minute ago', '%n minutes ago', 1), new \DateTime('Wed, 02 Oct 2013 23:58:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N],
+ [$deL10N->n('%n minute ago', '%n minutes ago', 3), new \DateTime('Wed, 02 Oct 2013 23:56:30 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N],
+ [$deL10N->n('%n hour ago', '%n hours ago', 1), new \DateTime('Wed, 02 Oct 2013 22:59:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N],
+ [$deL10N->n('%n hour ago', '%n hours ago', 3), new \DateTime('Wed, 02 Oct 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N],
+ [$deL10N->n('%n day ago', '%n days ago', 2), new \DateTime('Mon, 30 Sep 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N],
- );
+ ];
}
/**
@@ -85,60 +85,60 @@ class DateTimeFormatterTest extends TestCase {
public function formatDateSpanData() {
$time = 1416916800; // Use a fixed timestamp so we don't switch days/years with the getTimestampAgo
$deL10N = \OC::$server->getL10N('lib', 'de');
- return array(
+ return [
// Normal testing
- array('today', $this->getTimestampAgo($time, 30, 15), $time),
- array('yesterday', $this->getTimestampAgo($time, 0, 0, 0, 1), $time),
- array('tomorrow', $time, $this->getTimestampAgo($time, 0, 0, 0, 1)),
- array('4 days ago', $this->getTimestampAgo($time, 0, 0, 0, 4), $time),
- array('in 4 days', $time, $this->getTimestampAgo($time, 0, 0, 0, 4)),
- array('5 months ago', $this->getTimestampAgo($time, 0, 0, 0, 155), $time),
- array('next month', $time, $this->getTimestampAgo($time, 0, 0, 0, 32)),
- array('in 5 months', $time, $this->getTimestampAgo($time, 0, 0, 0, 155)),
- array('2 years ago', $this->getTimestampAgo($time, 0, 0, 0, 0, 2), $time),
- array('next year', $time, $this->getTimestampAgo($time, 0, 0, 0, 0, 1)),
- array('in 2 years', $time, $this->getTimestampAgo($time, 0, 0, 0, 0, 2)),
+ ['today', $this->getTimestampAgo($time, 30, 15), $time],
+ ['yesterday', $this->getTimestampAgo($time, 0, 0, 0, 1), $time],
+ ['tomorrow', $time, $this->getTimestampAgo($time, 0, 0, 0, 1)],
+ ['4 days ago', $this->getTimestampAgo($time, 0, 0, 0, 4), $time],
+ ['in 4 days', $time, $this->getTimestampAgo($time, 0, 0, 0, 4)],
+ ['5 months ago', $this->getTimestampAgo($time, 0, 0, 0, 155), $time],
+ ['next month', $time, $this->getTimestampAgo($time, 0, 0, 0, 32)],
+ ['in 5 months', $time, $this->getTimestampAgo($time, 0, 0, 0, 155)],
+ ['2 years ago', $this->getTimestampAgo($time, 0, 0, 0, 0, 2), $time],
+ ['next year', $time, $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
+ ['in 2 years', $time, $this->getTimestampAgo($time, 0, 0, 0, 0, 2)],
// Test with compare timestamp
- array('today', $this->getTimestampAgo($time, 0, 0, 0, 0, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)),
- array('yesterday', $this->getTimestampAgo($time, 30, 15, 3, 1, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)),
- array('4 days ago', $this->getTimestampAgo($time, 30, 15, 3, 4, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)),
- array('5 months ago', $this->getTimestampAgo($time, 30, 15, 3, 155, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)),
- array('2 years ago', $this->getTimestampAgo($time, 30, 15, 3, 35, 3), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)),
+ ['today', $this->getTimestampAgo($time, 0, 0, 0, 0, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
+ ['yesterday', $this->getTimestampAgo($time, 30, 15, 3, 1, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
+ ['4 days ago', $this->getTimestampAgo($time, 30, 15, 3, 4, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
+ ['5 months ago', $this->getTimestampAgo($time, 30, 15, 3, 155, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
+ ['2 years ago', $this->getTimestampAgo($time, 30, 15, 3, 35, 3), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
// Test translations
- array($deL10N->t('today'), new \DateTime('Wed, 02 Oct 2013 12:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N),
- array($deL10N->t('yesterday'), new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), $deL10N),
- array($deL10N->n('%n day ago', '%n days ago', 2), new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), $deL10N),
- array($deL10N->n('%n month ago', '%n months ago', 9), new \DateTime('Tue, 31 Dec 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000'), $deL10N),
- array($deL10N->n('%n year ago', '%n years ago', 2), new \DateTime('Sun, 01 Jan 2012 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000'), $deL10N),
+ [$deL10N->t('today'), new \DateTime('Wed, 02 Oct 2013 12:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N],
+ [$deL10N->t('yesterday'), new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), $deL10N],
+ [$deL10N->n('%n day ago', '%n days ago', 2), new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), $deL10N],
+ [$deL10N->n('%n month ago', '%n months ago', 9), new \DateTime('Tue, 31 Dec 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000'), $deL10N],
+ [$deL10N->n('%n year ago', '%n years ago', 2), new \DateTime('Sun, 01 Jan 2012 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000'), $deL10N],
// Test time
- array('today', new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('today', new \DateTime('Wed, 02 Oct 2013 12:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('today', new \DateTime('Wed, 02 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
+ ['today', new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['today', new \DateTime('Wed, 02 Oct 2013 12:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['today', new \DateTime('Wed, 02 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
// Test some special yesterdays
- array('yesterday', new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000')),
- array('yesterday', new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('yesterday', new \DateTime('Tue, 01 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000')),
- array('yesterday', new \DateTime('Tue, 01 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')),
- array('yesterday', new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000')),
- array('yesterday', new \DateTime('Mon, 31 Dec 2012 00:00:00 +0000'), new \DateTime('Tue, 01 Jan 2013 00:00:00 +0000')),
+ ['yesterday', new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000')],
+ ['yesterday', new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['yesterday', new \DateTime('Tue, 01 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000')],
+ ['yesterday', new \DateTime('Tue, 01 Oct 2013 23:59:58 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000')],
+ ['yesterday', new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000')],
+ ['yesterday', new \DateTime('Mon, 31 Dec 2012 00:00:00 +0000'), new \DateTime('Tue, 01 Jan 2013 00:00:00 +0000')],
// Test last month
- array('2 days ago', new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000')),
- array('last month', new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Tue, 31 Oct 2013 00:00:00 +0000')),
- array('last month', new \DateTime('Sun, 01 Sep 2013 00:00:00 +0000'), new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000')),
- array('last month', new \DateTime('Sun, 01 Sep 2013 00:00:00 +0000'), new \DateTime('Thu, 31 Oct 2013 00:00:00 +0000')),
+ ['2 days ago', new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000')],
+ ['last month', new \DateTime('Mon, 30 Sep 2013 00:00:00 +0000'), new \DateTime('Tue, 31 Oct 2013 00:00:00 +0000')],
+ ['last month', new \DateTime('Sun, 01 Sep 2013 00:00:00 +0000'), new \DateTime('Tue, 01 Oct 2013 00:00:00 +0000')],
+ ['last month', new \DateTime('Sun, 01 Sep 2013 00:00:00 +0000'), new \DateTime('Thu, 31 Oct 2013 00:00:00 +0000')],
// Test last year
- array('9 months ago', new \DateTime('Tue, 31 Dec 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')),
- array('11 months ago', new \DateTime('Thu, 03 Oct 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')),
- array('last year', new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')),
- array('last year', new \DateTime('Tue, 01 Jan 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')),
- array('2 years ago', new \DateTime('Sun, 01 Jan 2012 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')),
- );
+ ['9 months ago', new \DateTime('Tue, 31 Dec 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')],
+ ['11 months ago', new \DateTime('Thu, 03 Oct 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')],
+ ['last year', new \DateTime('Wed, 02 Oct 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')],
+ ['last year', new \DateTime('Tue, 01 Jan 2013 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')],
+ ['2 years ago', new \DateTime('Sun, 01 Jan 2012 00:00:00 +0000'), new \DateTime('Thu, 02 Oct 2014 00:00:00 +0000')],
+ ];
}
/**
@@ -149,9 +149,9 @@ class DateTimeFormatterTest extends TestCase {
}
public function formatDateData() {
- return array(
- array(1102831200, 'December 12, 2004'),
- );
+ return [
+ [1102831200, 'December 12, 2004'],
+ ];
}
/**
@@ -162,10 +162,10 @@ class DateTimeFormatterTest extends TestCase {
}
public function formatDateTimeData() {
- return array(
- array(1350129205, null, 'October 13, 2012 at 11:53:25 AM GMT+0'),
- array(1350129205, new \DateTimeZone('Europe/Berlin'), 'October 13, 2012 at 1:53:25 PM GMT+2'),
- );
+ return [
+ [1350129205, null, 'October 13, 2012 at 11:53:25 AM GMT+0'],
+ [1350129205, new \DateTimeZone('Europe/Berlin'), 'October 13, 2012 at 1:53:25 PM GMT+2'],
+ ];
}
/**
diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php
index b333729ef8..7e21fe881f 100644
--- a/tests/lib/Encryption/Keys/StorageTest.php
+++ b/tests/lib/Encryption/Keys/StorageTest.php
@@ -63,7 +63,7 @@ class StorageTest extends TestCase {
public function testSetFileKey() {
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturn(array('user1', '/files/foo.txt'));
+ ->willReturn(['user1', '/files/foo.txt']);
$this->util->expects($this->any())
->method('stripPartialFileExtension')
->willReturnArgument(0);
@@ -143,7 +143,7 @@ class StorageTest extends TestCase {
public function testSetFileKeySystemWide() {
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturn(array('user1', '/files/foo.txt'));
+ ->willReturn(['user1', '/files/foo.txt']);
$this->util->expects($this->any())
->method('isSystemWideMountPoint')
->willReturn(true);
@@ -164,7 +164,7 @@ class StorageTest extends TestCase {
public function testGetFileKeySystemWide() {
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturn(array('user1', '/files/foo.txt'));
+ ->willReturn(['user1', '/files/foo.txt']);
$this->util->expects($this->any())
->method('stripPartialFileExtension')
->willReturnArgument(0);
@@ -272,7 +272,7 @@ class StorageTest extends TestCase {
public function testDeleteFileKeySystemWide() {
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturn(array('user1', '/files/foo.txt'));
+ ->willReturn(['user1', '/files/foo.txt']);
$this->util->expects($this->any())
->method('stripPartialFileExtension')
->willReturnArgument(0);
@@ -296,7 +296,7 @@ class StorageTest extends TestCase {
public function testDeleteFileKey() {
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturn(array('user1', '/files/foo.txt'));
+ ->willReturn(['user1', '/files/foo.txt']);
$this->util->expects($this->any())
->method('stripPartialFileExtension')
->willReturnArgument(0);
@@ -335,7 +335,7 @@ class StorageTest extends TestCase {
->willReturn(true);
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturnCallback(array($this, 'getUidAndFilenameCallback'));
+ ->willReturnCallback([$this, 'getUidAndFilenameCallback']);
$this->util->expects($this->any())
->method('isSystemWideMountPoint')
->willReturnCallback(function($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) {
@@ -366,7 +366,7 @@ class StorageTest extends TestCase {
->willReturn(true);
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturnCallback(array($this, 'getUidAndFilenameCallback'));
+ ->willReturnCallback([$this, 'getUidAndFilenameCallback']);
$this->util->expects($this->any())
->method('isSystemWideMountPoint')
->willReturnCallback(function($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) {
@@ -385,37 +385,37 @@ class StorageTest extends TestCase {
$path = $args[0];
$parts = explode('/', $path);
- return array($parts[1], '/' . implode('/', array_slice($parts, 2)));
+ return [$parts[1], '/' . implode('/', array_slice($parts, 2))];
}
public function dataProviderCopyRename() {
- return array(
- array('/user1/files/source.txt', '/user1/files/target.txt', false, false,
- '/user1/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'),
- array('/user1/files/foo/source.txt', '/user1/files/target.txt', false, false,
- '/user1/files_encryption/keys/files/foo/source.txt/', '/user1/files_encryption/keys/files/target.txt/'),
- array('/user1/files/source.txt', '/user1/files/foo/target.txt', false, false,
- '/user1/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/foo/target.txt/'),
- array('/user1/files/source.txt', '/user1/files/foo/target.txt', true, true,
- '/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/foo/target.txt/'),
- array('/user1/files/source.txt', '/user1/files/target.txt', false, true,
- '/user1/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/target.txt/'),
- array('/user1/files/source.txt', '/user1/files/target.txt', true, false,
- '/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'),
+ return [
+ ['/user1/files/source.txt', '/user1/files/target.txt', false, false,
+ '/user1/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'],
+ ['/user1/files/foo/source.txt', '/user1/files/target.txt', false, false,
+ '/user1/files_encryption/keys/files/foo/source.txt/', '/user1/files_encryption/keys/files/target.txt/'],
+ ['/user1/files/source.txt', '/user1/files/foo/target.txt', false, false,
+ '/user1/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/foo/target.txt/'],
+ ['/user1/files/source.txt', '/user1/files/foo/target.txt', true, true,
+ '/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/foo/target.txt/'],
+ ['/user1/files/source.txt', '/user1/files/target.txt', false, true,
+ '/user1/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/target.txt/'],
+ ['/user1/files/source.txt', '/user1/files/target.txt', true, false,
+ '/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'],
- array('/user2/files/source.txt', '/user1/files/target.txt', false, false,
- '/user2/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'),
- array('/user2/files/foo/source.txt', '/user1/files/target.txt', false, false,
- '/user2/files_encryption/keys/files/foo/source.txt/', '/user1/files_encryption/keys/files/target.txt/'),
- array('/user2/files/source.txt', '/user1/files/foo/target.txt', false, false,
- '/user2/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/foo/target.txt/'),
- array('/user2/files/source.txt', '/user1/files/foo/target.txt', true, true,
- '/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/foo/target.txt/'),
- array('/user2/files/source.txt', '/user1/files/target.txt', false, true,
- '/user2/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/target.txt/'),
- array('/user2/files/source.txt', '/user1/files/target.txt', true, false,
- '/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'),
- );
+ ['/user2/files/source.txt', '/user1/files/target.txt', false, false,
+ '/user2/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'],
+ ['/user2/files/foo/source.txt', '/user1/files/target.txt', false, false,
+ '/user2/files_encryption/keys/files/foo/source.txt/', '/user1/files_encryption/keys/files/target.txt/'],
+ ['/user2/files/source.txt', '/user1/files/foo/target.txt', false, false,
+ '/user2/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/foo/target.txt/'],
+ ['/user2/files/source.txt', '/user1/files/foo/target.txt', true, true,
+ '/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/foo/target.txt/'],
+ ['/user2/files/source.txt', '/user1/files/target.txt', false, true,
+ '/user2/files_encryption/keys/files/source.txt/', '/files_encryption/keys/files/target.txt/'],
+ ['/user2/files/source.txt', '/user1/files/target.txt', true, false,
+ '/files_encryption/keys/files/source.txt/', '/user1/files_encryption/keys/files/target.txt/'],
+ ];
}
/**
@@ -432,7 +432,7 @@ class StorageTest extends TestCase {
$this->util->expects($this->any())
->method('getUidAndFilename')
- ->willReturnCallback(array($this, 'getUidAndFilenameCallback'));
+ ->willReturnCallback([$this, 'getUidAndFilenameCallback']);
$this->util->expects($this->any())
->method('isSystemWideMountPoint')
->willReturn($systemWideMountPoint);
@@ -460,15 +460,15 @@ class StorageTest extends TestCase {
->willReturn(false);
$this->view->expects($this->any())
->method('mkdir')
- ->willReturnCallback(array($this, 'mkdirCallback'));
+ ->willReturnCallback([$this, 'mkdirCallback']);
- $this->mkdirStack = array(
+ $this->mkdirStack = [
'/user1/files_encryption/keys/foo',
'/user1/files_encryption/keys',
'/user1/files_encryption',
- '/user1');
+ '/user1'];
- self::invokePrivate($this->storage, 'keySetPreparation', array('/user1/files_encryption/keys/foo'));
+ self::invokePrivate($this->storage, 'keySetPreparation', ['/user1/files_encryption/keys/foo']);
}
public function mkdirCallback() {
diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php
index 28d7ca8116..6328df3dc3 100644
--- a/tests/lib/Encryption/UpdateTest.php
+++ b/tests/lib/Encryption/UpdateTest.php
@@ -121,10 +121,10 @@ class UpdateTest extends TestCase {
* @return array
*/
public function dataTestUpdate() {
- return array(
- array('/user/files/foo', true, ['/user/files/foo/file1.txt', '/user/files/foo/file1.txt'], 2),
- array('/user/files/test.txt', false, [], 1),
- );
+ return [
+ ['/user/files/foo', true, ['/user/files/foo/file1.txt', '/user/files/foo/file1.txt'], 2],
+ ['/user/files/test.txt', false, [], 1],
+ ];
}
/**
@@ -168,14 +168,14 @@ class UpdateTest extends TestCase {
* @return array
*/
public function dataTestPostRename() {
- return array(
- array('/test.txt', '/testNew.txt', true),
- array('/test.txt', '/testNew.txt', false),
- array('/folder/test.txt', '/testNew.txt', true),
- array('/folder/test.txt', '/testNew.txt', false),
- array('/folder/test.txt', '/testNew.txt', true),
- array('/test.txt', '/folder/testNew.txt', false),
- );
+ return [
+ ['/test.txt', '/testNew.txt', true],
+ ['/test.txt', '/testNew.txt', false],
+ ['/folder/test.txt', '/testNew.txt', true],
+ ['/folder/test.txt', '/testNew.txt', false],
+ ['/folder/test.txt', '/testNew.txt', true],
+ ['/test.txt', '/folder/testNew.txt', false],
+ ];
}
@@ -208,10 +208,10 @@ class UpdateTest extends TestCase {
* @return array
*/
public function dataTestPostRestore() {
- return array(
- array(true),
- array(false),
- );
+ return [
+ [true],
+ [false],
+ ];
}
/**
diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php
index 2c5bd1a80f..0ac474faa0 100644
--- a/tests/lib/Encryption/UtilTest.php
+++ b/tests/lib/Encryption/UtilTest.php
@@ -101,7 +101,7 @@ class UtilTest extends TestCase {
$this->expectException(\OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException::class);
- $header = array('header1' => 1, 'header2' => 2, 'oc_encryption_module' => 'foo');
+ $header = ['header1' => 1, 'header2' => 2, 'oc_encryption_module' => 'foo'];
$em = $this->createMock(IEncryptionModule::class);
$em->expects($this->any())->method('getId')->willReturn('moduleId');
@@ -120,7 +120,7 @@ class UtilTest extends TestCase {
$this->userManager
->expects($this->any())
->method('userExists')
- ->willReturnCallback(array($this, 'isExcludedCallback'));
+ ->willReturnCallback([$this, 'isExcludedCallback']);
$this->assertSame($expected,
$this->util->isExcluded($path)
@@ -128,17 +128,17 @@ class UtilTest extends TestCase {
}
public function providePathsForTestIsExcluded() {
- return array(
- array('/files_encryption', '', true),
- array('files_encryption/foo.txt', '', true),
- array('test/foo.txt', '', false),
- array('/user1/files_encryption/foo.txt', '', true),
- array('/user1/files/foo.txt', '', false),
- array('/keyStorage/user1/files/foo.txt', 'keyStorage', true),
- array('/keyStorage/files_encryption', '/keyStorage', true),
- array('keyStorage/user1/files_encryption', '/keyStorage/', true),
+ return [
+ ['/files_encryption', '', true],
+ ['files_encryption/foo.txt', '', true],
+ ['test/foo.txt', '', false],
+ ['/user1/files_encryption/foo.txt', '', true],
+ ['/user1/files/foo.txt', '', false],
+ ['/keyStorage/user1/files/foo.txt', 'keyStorage', true],
+ ['/keyStorage/files_encryption', '/keyStorage', true],
+ ['keyStorage/user1/files_encryption', '/keyStorage/', true],
- );
+ ];
}
public function isExcludedCallback() {
@@ -160,15 +160,15 @@ class UtilTest extends TestCase {
}
public function dataTestIsFile() {
- return array(
- array('/user/files/test.txt', true),
- array('/user/files', true),
- array('/user/files_versions/test.txt', false),
- array('/user/foo/files/test.txt', false),
- array('/files/foo/files/test.txt', false),
- array('/user', false),
- array('/user/test.txt', false),
- );
+ return [
+ ['/user/files/test.txt', true],
+ ['/user/files', true],
+ ['/user/files_versions/test.txt', false],
+ ['/user/foo/files/test.txt', false],
+ ['/files/foo/files/test.txt', false],
+ ['/user', false],
+ ['/user/test.txt', false],
+ ];
}
/**
@@ -183,12 +183,12 @@ class UtilTest extends TestCase {
}
public function dataTestStripPartialFileExtension() {
- return array(
- array('/foo/test.txt', '/foo/test.txt'),
- array('/foo/test.txt.part', '/foo/test.txt'),
- array('/foo/test.txt.ocTransferId7567846853.part', '/foo/test.txt'),
- array('/foo/test.txt.ocTransferId7567.part', '/foo/test.txt'),
- );
+ return [
+ ['/foo/test.txt', '/foo/test.txt'],
+ ['/foo/test.txt.part', '/foo/test.txt'],
+ ['/foo/test.txt.ocTransferId7567846853.part', '/foo/test.txt'],
+ ['/foo/test.txt.ocTransferId7567.part', '/foo/test.txt'],
+ ];
}
}
diff --git a/tests/lib/ErrorHandlerTest.php b/tests/lib/ErrorHandlerTest.php
index aece7f146f..179b5c1212 100644
--- a/tests/lib/ErrorHandlerTest.php
+++ b/tests/lib/ErrorHandlerTest.php
@@ -29,13 +29,13 @@ class ErrorHandlerTest extends \Test\TestCase {
* @return array
*/
function passwordProvider() {
- return array(
- array('user', 'password'),
- array('user@owncloud.org', 'password'),
- array('user', 'pass@word'),
- array('us:er', 'password'),
- array('user', 'pass:word'),
- );
+ return [
+ ['user', 'password'],
+ ['user@owncloud.org', 'password'],
+ ['user', 'pass@word'],
+ ['us:er', 'password'],
+ ['user', 'pass:word'],
+ ];
}
diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php
index 247ed9ef9e..40d87214aa 100644
--- a/tests/lib/Files/Cache/CacheTest.php
+++ b/tests/lib/Files/Cache/CacheTest.php
@@ -55,8 +55,8 @@ class CacheTest extends \Test\TestCase {
public function testSimple() {
$file1 = 'foo';
$file2 = 'foo/bar';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder');
- $data2 = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder'];
+ $data2 = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
$this->assertFalse($this->cache->inCache($file1));
$this->assertEquals($this->cache->get($file1), null);
@@ -84,7 +84,7 @@ class CacheTest extends \Test\TestCase {
$this->assertEquals($id1, $this->cache->getParentId($file2));
$newSize = 1050;
- $newId2 = $this->cache->put($file2, array('size' => $newSize));
+ $newId2 = $this->cache->put($file2, ['size' => $newSize]);
$cacheData2 = $this->cache->get($file2);
$this->assertEquals($newId2, $id2);
$this->assertEquals($cacheData2['size'], $newSize);
@@ -101,14 +101,14 @@ class CacheTest extends \Test\TestCase {
public function testPartial() {
$file1 = 'foo';
- $this->cache->put($file1, array('size' => 10));
- $this->assertEquals(array('size' => 10), $this->cache->get($file1));
+ $this->cache->put($file1, ['size' => 10]);
+ $this->assertEquals(['size' => 10], $this->cache->get($file1));
- $this->cache->put($file1, array('mtime' => 15));
- $this->assertEquals(array('size' => 10, 'mtime' => 15), $this->cache->get($file1));
+ $this->cache->put($file1, ['mtime' => 15]);
+ $this->assertEquals(['size' => 10, 'mtime' => 15], $this->cache->get($file1));
- $this->cache->put($file1, array('size' => 12));
- $this->assertEquals(array('size' => 12, 'mtime' => 15), $this->cache->get($file1));
+ $this->cache->put($file1, ['size' => 12]);
+ $this->assertEquals(['size' => 12, 'mtime' => 15], $this->cache->get($file1));
}
/**
@@ -124,10 +124,10 @@ class CacheTest extends \Test\TestCase {
}
$file2 = $folder . '/bar';
$file3 = $folder . '/foo';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
- $fileData = array();
- $fileData['bar'] = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
- $fileData['foo'] = array('size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
+ $fileData = [];
+ $fileData['bar'] = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
+ $fileData['foo'] = ['size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($folder, $data1);
$this->cache->put($file2, $fileData['bar']);
@@ -143,12 +143,12 @@ class CacheTest extends \Test\TestCase {
}
$file4 = $folder . '/unkownSize';
- $fileData['unkownSize'] = array('size' => -1, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $fileData['unkownSize'] = ['size' => -1, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($file4, $fileData['unkownSize']);
$this->assertEquals(-1, $this->cache->calculateFolderSize($folder));
- $fileData['unkownSize'] = array('size' => 5, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $fileData['unkownSize'] = ['size' => 5, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($file4, $fileData['unkownSize']);
$this->assertEquals(1025, $this->cache->calculateFolderSize($folder));
@@ -164,8 +164,8 @@ class CacheTest extends \Test\TestCase {
}
public function testRemoveRecursive() {
- $folderData = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
- $fileData = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'text/plain');
+ $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
+ $fileData = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'text/plain'];
$folders = ['folder', 'folder/subfolder', 'folder/sub2', 'folder/sub2/sub3'];
$files = ['folder/foo.txt', 'folder/bar.txt', 'folder/subfolder/asd.txt', 'folder/sub2/qwerty.txt', 'folder/sub2/sub3/foo.txt'];
@@ -184,27 +184,27 @@ class CacheTest extends \Test\TestCase {
public function folderDataProvider() {
- return array(
- array('folder'),
+ return [
+ ['folder'],
// that was too easy, try something harder
- array('☺, WHITE SMILING FACE, UTF-8 hex E298BA'),
+ ['☺, WHITE SMILING FACE, UTF-8 hex E298BA'],
// what about 4 byte utf-8
- array('😐, NEUTRAL_FACE, UTF-8 hex F09F9890'),
+ ['😐, NEUTRAL_FACE, UTF-8 hex F09F9890'],
// now the crazy stuff
- array(', UNASSIGNED PRIVATE USE, UTF-8 hex EF9890'),
+ [', UNASSIGNED PRIVATE USE, UTF-8 hex EF9890'],
// and my favorite
- array('w͢͢͝h͡o͢͡ ̸͢k̵͟n̴͘ǫw̸̛s͘ ̀́w͘͢ḩ̵a҉̡͢t ̧̕h́o̵r͏̵rors̡ ̶͡͠lį̶e͟͟ ̶͝in͢ ͏t̕h̷̡͟e ͟͟d̛a͜r̕͡k̢̨ ͡h̴e͏a̷̢̡rt́͏ ̴̷͠ò̵̶f̸ u̧͘ní̛͜c͢͏o̷͏d̸͢e̡͝')
- );
+ ['w͢͢͝h͡o͢͡ ̸͢k̵͟n̴͘ǫw̸̛s͘ ̀́w͘͢ḩ̵a҉̡͢t ̧̕h́o̵r͏̵rors̡ ̶͡͠lį̶e͟͟ ̶͝in͢ ͏t̕h̷̡͟e ͟͟d̛a͜r̕͡k̢̨ ͡h̴e͏a̷̢̡rt́͏ ̴̷͠ò̵̶f̸ u̧͘ní̛͜c͢͏o̷͏d̸͢e̡͝']
+ ];
}
public function testEncryptedFolder() {
$file1 = 'folder';
$file2 = 'folder/bar';
$file3 = 'folder/foo';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
- $fileData = array();
- $fileData['bar'] = array('size' => 1000, 'encrypted' => 1, 'mtime' => 20, 'mimetype' => 'foo/file');
- $fileData['foo'] = array('size' => 20, 'encrypted' => 1, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
+ $fileData = [];
+ $fileData['bar'] = ['size' => 1000, 'encrypted' => 1, 'mtime' => 20, 'mimetype' => 'foo/file'];
+ $fileData['foo'] = ['size' => 20, 'encrypted' => 1, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($file1, $data1);
$this->cache->put($file2, $fileData['bar']);
@@ -217,12 +217,12 @@ class CacheTest extends \Test\TestCase {
}
$file4 = 'folder/unkownSize';
- $fileData['unkownSize'] = array('size' => -1, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $fileData['unkownSize'] = ['size' => -1, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($file4, $fileData['unkownSize']);
$this->assertEquals(-1, $this->cache->calculateFolderSize($file1));
- $fileData['unkownSize'] = array('size' => 5, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $fileData['unkownSize'] = ['size' => 5, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($file4, $fileData['unkownSize']);
$this->assertEquals(1025, $this->cache->calculateFolderSize($file1));
@@ -243,10 +243,10 @@ class CacheTest extends \Test\TestCase {
public function testRootFolderSizeForNonHomeStorage() {
$dir1 = 'knownsize';
$dir2 = 'unknownsize';
- $fileData = array();
- $fileData[''] = array('size' => -1, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory');
- $fileData[$dir1] = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory');
- $fileData[$dir2] = array('size' => -1, 'mtime' => 25, 'mimetype' => 'httpd/unix-directory');
+ $fileData = [];
+ $fileData[''] = ['size' => -1, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory'];
+ $fileData[$dir1] = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory'];
+ $fileData[$dir2] = ['size' => -1, 'mtime' => 25, 'mimetype' => 'httpd/unix-directory'];
$this->cache->put('', $fileData['']);
$this->cache->put($dir1, $fileData[$dir1]);
@@ -269,11 +269,11 @@ class CacheTest extends \Test\TestCase {
function testStatus() {
$this->assertEquals(\OC\Files\Cache\Cache::NOT_FOUND, $this->cache->getStatus('foo'));
- $this->cache->put('foo', array('size' => -1));
+ $this->cache->put('foo', ['size' => -1]);
$this->assertEquals(\OC\Files\Cache\Cache::PARTIAL, $this->cache->getStatus('foo'));
- $this->cache->put('foo', array('size' => -1, 'mtime' => 20, 'mimetype' => 'foo/file'));
+ $this->cache->put('foo', ['size' => -1, 'mtime' => 20, 'mimetype' => 'foo/file']);
$this->assertEquals(\OC\Files\Cache\Cache::SHALLOW, $this->cache->getStatus('foo'));
- $this->cache->put('foo', array('size' => 10));
+ $this->cache->put('foo', ['size' => 10]);
$this->assertEquals(\OC\Files\Cache\Cache::COMPLETE, $this->cache->getStatus('foo'));
}
@@ -292,7 +292,7 @@ class CacheTest extends \Test\TestCase {
public function testPutWithAllKindOfQuotes($fileName) {
$this->assertEquals(\OC\Files\Cache\Cache::NOT_FOUND, $this->cache->get($fileName));
- $this->cache->put($fileName, array('size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file', 'etag' => $fileName));
+ $this->cache->put($fileName, ['size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file', 'etag' => $fileName]);
$cacheEntry = $this->cache->get($fileName);
$this->assertEquals($fileName, $cacheEntry['etag']);
@@ -303,10 +303,10 @@ class CacheTest extends \Test\TestCase {
$file1 = 'folder';
$file2 = 'folder/foobar';
$file3 = 'folder/foo';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder');
- $fileData = array();
- $fileData['foobar'] = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
- $fileData['foo'] = array('size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder'];
+ $fileData = [];
+ $fileData['foobar'] = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
+ $fileData['foo'] = ['size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($file1, $data1);
$this->cache->put($file2, $fileData['foobar']);
@@ -339,12 +339,12 @@ class CacheTest extends \Test\TestCase {
$file3 = 'folder/foo';
$file4 = 'folder/foo2';
$file5 = 'folder/foo3';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder');
- $fileData = array();
- $fileData['foobar'] = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
- $fileData['foo'] = array('size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file');
- $fileData['foo2'] = array('size' => 25, 'mtime' => 28, 'mimetype' => 'foo/file');
- $fileData['foo3'] = array('size' => 88, 'mtime' => 34, 'mimetype' => 'foo/file');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder'];
+ $fileData = [];
+ $fileData['foobar'] = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
+ $fileData['foo'] = ['size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file'];
+ $fileData['foo2'] = ['size' => 25, 'mtime' => 28, 'mimetype' => 'foo/file'];
+ $fileData['foo3'] = ['size' => 88, 'mtime' => 34, 'mimetype' => 'foo/file'];
$id1 = $this->cache->put($file1, $data1);
$id2 = $this->cache->put($file2, $fileData['foobar']);
@@ -387,10 +387,10 @@ class CacheTest extends \Test\TestCase {
$file1 = 'folder';
$file2 = 'folder/foobar';
$file3 = 'folder/foo';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder');
- $fileData = array();
- $fileData['foobar'] = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
- $fileData['foo'] = array('size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder'];
+ $fileData = [];
+ $fileData['foobar'] = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
+ $fileData['foo'] = ['size' => 20, 'mtime' => 25, 'mimetype' => 'foo/file'];
$this->cache->put($file1, $data1);
$this->cache->put($file2, $fileData['foobar']);
@@ -430,8 +430,8 @@ class CacheTest extends \Test\TestCase {
* @dataProvider movePathProvider
*/
function testMove($sourceFolder, $targetFolder, $children) {
- $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'foo/bar');
- $folderData = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/bar'];
+ $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
// create folders
foreach ([$sourceFolder, $targetFolder] as $current) {
@@ -469,7 +469,7 @@ class CacheTest extends \Test\TestCase {
$file2 = 'folder2';
$file3 = 'folder3';
$file4 = 'folder4';
- $data = array('size' => 10, 'mtime' => 50, 'mimetype' => 'foo/bar');
+ $data = ['size' => 10, 'mtime' => 50, 'mimetype' => 'foo/bar'];
$this->cache->put($file1, $data);
$data['size'] = -1;
@@ -484,44 +484,44 @@ class CacheTest extends \Test\TestCase {
function testNonExisting() {
$this->assertFalse($this->cache->get('foo.txt'));
$this->assertFalse($this->cache->get(-1));
- $this->assertEquals(array(), $this->cache->getFolderContents('foo'));
+ $this->assertEquals([], $this->cache->getFolderContents('foo'));
}
function testGetById() {
$storageId = $this->storage->getId();
- $data = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
+ $data = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
$id = $this->cache->put('foo', $data);
if (strlen($storageId) > 64) {
$storageId = md5($storageId);
}
- $this->assertEquals(array($storageId, 'foo'), \OC\Files\Cache\Cache::getById($id));
+ $this->assertEquals([$storageId, 'foo'], \OC\Files\Cache\Cache::getById($id));
}
function testStorageMTime() {
- $data = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
+ $data = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
$this->cache->put('foo', $data);
$cachedData = $this->cache->get('foo');
$this->assertEquals($data['mtime'], $cachedData['storage_mtime']); //if no storage_mtime is saved, mtime should be used
- $this->cache->put('foo', array('storage_mtime' => 30)); //when setting storage_mtime, mtime is also set
+ $this->cache->put('foo', ['storage_mtime' => 30]); //when setting storage_mtime, mtime is also set
$cachedData = $this->cache->get('foo');
$this->assertEquals(30, $cachedData['storage_mtime']);
$this->assertEquals(30, $cachedData['mtime']);
- $this->cache->put('foo', array('mtime' => 25)); //setting mtime does not change storage_mtime
+ $this->cache->put('foo', ['mtime' => 25]); //setting mtime does not change storage_mtime
$cachedData = $this->cache->get('foo');
$this->assertEquals(30, $cachedData['storage_mtime']);
$this->assertEquals(25, $cachedData['mtime']);
}
function testLongId() {
- $storage = new LongId(array());
+ $storage = new LongId([]);
$cache = $storage->getCache();
$storageId = $storage->getId();
- $data = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file');
+ $data = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'];
$id = $cache->put('foo', $data);
- $this->assertEquals(array(md5($storageId), 'foo'), \OC\Files\Cache\Cache::getById($id));
+ $this->assertEquals([md5($storageId), 'foo'], \OC\Files\Cache\Cache::getById($id));
}
/**
@@ -546,7 +546,7 @@ class CacheTest extends \Test\TestCase {
->method('normalize')
->willReturnArgument(0);
- $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
// put root folder
$this->assertFalse($cacheMock->get('folder'));
@@ -586,7 +586,7 @@ class CacheTest extends \Test\TestCase {
// folder name "Schön" with U+0308 (un-normalized)
$folderWith0308 = "\x53\x63\x68\x6f\xcc\x88\x6e";
- $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
// put root folder
$this->assertFalse($this->cache->get('folder'));
@@ -611,12 +611,12 @@ class CacheTest extends \Test\TestCase {
}
function bogusPathNamesProvider() {
- return array(
- array('/bogus.txt', 'bogus.txt'),
- array('//bogus.txt', 'bogus.txt'),
- array('bogus/', 'bogus'),
- array('bogus//', 'bogus'),
- );
+ return [
+ ['/bogus.txt', 'bogus.txt'],
+ ['//bogus.txt', 'bogus.txt'],
+ ['bogus/', 'bogus'],
+ ['bogus//', 'bogus'],
+ ];
}
/**
@@ -625,7 +625,7 @@ class CacheTest extends \Test\TestCase {
* @dataProvider bogusPathNamesProvider
*/
public function testBogusPaths($bogusPath, $fixedBogusPath) {
- $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
// put root folder
$this->assertFalse($this->cache->get(''));
@@ -647,12 +647,12 @@ class CacheTest extends \Test\TestCase {
}
public function testNoReuseOfFileId() {
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain'];
$this->cache->put('somefile.txt', $data1);
$info = $this->cache->get('somefile.txt');
$fileId = $info['fileid'];
$this->cache->remove('somefile.txt');
- $data2 = array('size' => 200, 'mtime' => 100, 'mimetype' => 'text/plain');
+ $data2 = ['size' => 200, 'mtime' => 100, 'mimetype' => 'text/plain'];
$this->cache->put('anotherfile.txt', $data2);
$info2 = $this->cache->get('anotherfile.txt');
$fileId2 = $info2['fileid'];
@@ -672,7 +672,7 @@ class CacheTest extends \Test\TestCase {
* @dataProvider escapingProvider
*/
public function testEscaping($name) {
- $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain');
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain'];
$this->cache->put($name, $data);
$this->assertTrue($this->cache->inCache($name));
$retrievedData = $this->cache->get($name);
@@ -684,7 +684,7 @@ class CacheTest extends \Test\TestCase {
$this->assertTrue($this->cache->inCache($name . 'asd'));
$this->cache->remove($name . 'asd');
$this->assertFalse($this->cache->inCache($name . 'asd'));
- $folderData = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
$this->cache->put($name, $folderData);
$this->cache->put('other', $folderData);
$childs = ['asd', 'bar', 'foo', 'sub/folder'];
@@ -788,8 +788,8 @@ class CacheTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->storage = new \OC\Files\Storage\Temporary(array());
- $this->storage2 = new \OC\Files\Storage\Temporary(array());
+ $this->storage = new \OC\Files\Storage\Temporary([]);
+ $this->storage2 = new \OC\Files\Storage\Temporary([]);
$this->cache = new \OC\Files\Cache\Cache($this->storage);
$this->cache2 = new \OC\Files\Cache\Cache($this->storage2);
}
diff --git a/tests/lib/Files/Cache/HomeCacheTest.php b/tests/lib/Files/Cache/HomeCacheTest.php
index 51fc2e5bc9..aacb91c675 100644
--- a/tests/lib/Files/Cache/HomeCacheTest.php
+++ b/tests/lib/Files/Cache/HomeCacheTest.php
@@ -70,7 +70,7 @@ class HomeCacheTest extends \Test\TestCase {
parent::setUp();
$this->user = new DummyUser('foo', \OC::$server->getTempManager()->getTemporaryFolder());
- $this->storage = new \OC\Files\Storage\Home(array('user' => $this->user));
+ $this->storage = new \OC\Files\Storage\Home(['user' => $this->user]);
$this->cache = $this->storage->getCache();
}
@@ -82,11 +82,11 @@ class HomeCacheTest extends \Test\TestCase {
public function testRootFolderSizeIgnoresUnknownUpdate() {
$dir1 = 'files/knownsize';
$dir2 = 'files/unknownsize';
- $fileData = array();
- $fileData[''] = array('size' => -1, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory');
- $fileData['files'] = array('size' => -1, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory');
- $fileData[$dir1] = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory');
- $fileData[$dir2] = array('size' => -1, 'mtime' => 25, 'mimetype' => 'httpd/unix-directory');
+ $fileData = [];
+ $fileData[''] = ['size' => -1, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory'];
+ $fileData['files'] = ['size' => -1, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory'];
+ $fileData[$dir1] = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory'];
+ $fileData[$dir2] = ['size' => -1, 'mtime' => 25, 'mimetype' => 'httpd/unix-directory'];
$this->cache->put('', $fileData['']);
$this->cache->put('files', $fileData['files']);
@@ -114,10 +114,10 @@ class HomeCacheTest extends \Test\TestCase {
public function testRootFolderSizeIsFilesSize() {
$dir1 = 'files';
$afile = 'test.txt';
- $fileData = array();
- $fileData[''] = array('size' => 1500, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory');
- $fileData[$dir1] = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory');
- $fileData[$afile] = array('size' => 500, 'mtime' => 20);
+ $fileData = [];
+ $fileData[''] = ['size' => 1500, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory'];
+ $fileData[$dir1] = ['size' => 1000, 'mtime' => 20, 'mimetype' => 'httpd/unix-directory'];
+ $fileData[$afile] = ['size' => 500, 'mtime' => 20];
$this->cache->put('', $fileData['']);
$this->cache->put($dir1, $fileData[$dir1]);
diff --git a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php
index f93b95b5fe..6e1430d146 100644
--- a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php
+++ b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php
@@ -23,8 +23,8 @@ class MoveFromCacheTraitTest extends CacheTest {
protected function setUp(): void {
parent::setUp();
- $this->storage = new \OC\Files\Storage\Temporary(array());
- $this->storage2 = new \OC\Files\Storage\Temporary(array());
+ $this->storage = new \OC\Files\Storage\Temporary([]);
+ $this->storage2 = new \OC\Files\Storage\Temporary([]);
$this->cache = new FallBackCrossCacheMoveCache($this->storage);
$this->cache2 = new FallBackCrossCacheMoveCache($this->storage2);
}
diff --git a/tests/lib/Files/Cache/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php
index 6a025410cc..52f6697cc6 100644
--- a/tests/lib/Files/Cache/ScannerTest.php
+++ b/tests/lib/Files/Cache/ScannerTest.php
@@ -36,7 +36,7 @@ class ScannerTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->storage = new \OC\Files\Storage\Temporary(array());
+ $this->storage = new \OC\Files\Storage\Temporary([]);
$this->scanner = new \OC\Files\Cache\Scanner($this->storage);
$this->cache = new \OC\Files\Cache\Cache($this->storage);
}
@@ -247,7 +247,7 @@ class ScannerTest extends \Test\TestCase {
$this->scanner->scan('');
$oldData = $this->cache->get('');
$this->storage->unlink('folder/bar.txt');
- $this->cache->put('folder', array('mtime' => $this->storage->filemtime('folder'), 'storage_mtime' => $this->storage->filemtime('folder')));
+ $this->cache->put('folder', ['mtime' => $this->storage->filemtime('folder'), 'storage_mtime' => $this->storage->filemtime('folder')]);
$this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE);
$newData = $this->cache->get('');
$this->assertIsString($oldData['etag']);
@@ -345,7 +345,7 @@ class ScannerTest extends \Test\TestCase {
// delete the folder without removing the childs
$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?';
- \OC_DB::executeAudited($sql, array($oldFolderId));
+ \OC_DB::executeAudited($sql, [$oldFolderId]);
$cachedData = $this->cache->get('folder/bar.txt');
$this->assertEquals($oldFolderId, $cachedData['parent']);
@@ -369,7 +369,7 @@ class ScannerTest extends \Test\TestCase {
// delete the folder without removing the childs
$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?';
- \OC_DB::executeAudited($sql, array($oldFolderId));
+ \OC_DB::executeAudited($sql, [$oldFolderId]);
$cachedData = $this->cache->get('folder/bar.txt');
$this->assertEquals($oldFolderId, $cachedData['parent']);
diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php
index a3b1a428c2..6366a8eb7e 100644
--- a/tests/lib/Files/Cache/UpdaterLegacyTest.php
+++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php
@@ -40,7 +40,7 @@ class UpdaterLegacyTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->storage = new \OC\Files\Storage\Temporary(array());
+ $this->storage = new \OC\Files\Storage\Temporary([]);
$textData = "dummy file data\n";
$imgData = file_get_contents(\OC::$SERVERROOT . '/core/img/logo/logo.png');
$this->storage->mkdir('folder');
@@ -63,7 +63,7 @@ class UpdaterLegacyTest extends \Test\TestCase {
Filesystem::init(self::$user, '/' . self::$user . '/files');
Filesystem::clearMounts();
- Filesystem::mount($this->storage, array(), '/' . self::$user . '/files');
+ Filesystem::mount($this->storage, [], '/' . self::$user . '/files');
\OC_Hook::clear('OC_Filesystem');
}
@@ -85,7 +85,7 @@ class UpdaterLegacyTest extends \Test\TestCase {
public function testWrite() {
$textSize = strlen("dummy file data\n");
$imageSize = filesize(\OC::$SERVERROOT . '/core/img/logo/logo.png');
- $this->cache->put('foo.txt', array('mtime' => 100, 'storage_mtime' => 150));
+ $this->cache->put('foo.txt', ['mtime' => 100, 'storage_mtime' => 150]);
$rootCachedData = $this->cache->get('');
$this->assertEquals(3 * $textSize + $imageSize, $rootCachedData['size']);
@@ -118,10 +118,10 @@ class UpdaterLegacyTest extends \Test\TestCase {
}
public function testWriteWithMountPoints() {
- $storage2 = new \OC\Files\Storage\Temporary(array());
+ $storage2 = new \OC\Files\Storage\Temporary([]);
$storage2->getScanner()->scan(''); //initialize etags
$cache2 = $storage2->getCache();
- Filesystem::mount($storage2, array(), '/' . self::$user . '/files/folder/substorage');
+ Filesystem::mount($storage2, [], '/' . self::$user . '/files/folder/substorage');
$view = new View('/' . self::$user . '/files');
$folderCachedData = $view->getFileInfo('folder');
$substorageCachedData = $cache2->get('');
@@ -179,9 +179,9 @@ class UpdaterLegacyTest extends \Test\TestCase {
}
public function testDeleteWithMountPoints() {
- $storage2 = new \OC\Files\Storage\Temporary(array());
+ $storage2 = new \OC\Files\Storage\Temporary([]);
$cache2 = $storage2->getCache();
- Filesystem::mount($storage2, array(), '/' . self::$user . '/files/folder/substorage');
+ Filesystem::mount($storage2, [], '/' . self::$user . '/files/folder/substorage');
Filesystem::file_put_contents('folder/substorage/foo.txt', 'asd');
$view = new View('/' . self::$user . '/files');
$this->assertTrue($cache2->inCache('foo.txt'));
@@ -235,9 +235,9 @@ class UpdaterLegacyTest extends \Test\TestCase {
}
public function testRenameWithMountPoints() {
- $storage2 = new \OC\Files\Storage\Temporary(array());
+ $storage2 = new \OC\Files\Storage\Temporary([]);
$cache2 = $storage2->getCache();
- Filesystem::mount($storage2, array(), '/' . self::$user . '/files/folder/substorage');
+ Filesystem::mount($storage2, [], '/' . self::$user . '/files/folder/substorage');
Filesystem::file_put_contents('folder/substorage/foo.txt', 'asd');
$view = new View('/' . self::$user . '/files');
$this->assertTrue($cache2->inCache('foo.txt'));
diff --git a/tests/lib/Files/Cache/UpdaterTest.php b/tests/lib/Files/Cache/UpdaterTest.php
index 8dc5893007..f8880d0f2a 100644
--- a/tests/lib/Files/Cache/UpdaterTest.php
+++ b/tests/lib/Files/Cache/UpdaterTest.php
@@ -45,7 +45,7 @@ class UpdaterTest extends \Test\TestCase {
$this->loginAsUser();
- $this->storage = new Temporary(array());
+ $this->storage = new Temporary([]);
$this->updater = $this->storage->getUpdater();
$this->cache = $this->storage->getCache();
}
@@ -220,9 +220,9 @@ class UpdaterTest extends \Test\TestCase {
}
public function testMoveCrossStorage() {
- $storage2 = new Temporary(array());
+ $storage2 = new Temporary([]);
$cache2 = $storage2->getCache();
- Filesystem::mount($storage2, array(), '/bar');
+ Filesystem::mount($storage2, [], '/bar');
$this->storage->file_put_contents('foo.txt', 'qwerty');
$this->updater->update('foo.txt');
@@ -251,9 +251,9 @@ class UpdaterTest extends \Test\TestCase {
}
public function testMoveFolderCrossStorage() {
- $storage2 = new Temporary(array());
+ $storage2 = new Temporary([]);
$cache2 = $storage2->getCache();
- Filesystem::mount($storage2, array(), '/bar');
+ Filesystem::mount($storage2, [], '/bar');
$this->storage->mkdir('foo');
$this->storage->mkdir('foo/bar');
$this->storage->file_put_contents('foo/foo.txt', 'qwerty');
diff --git a/tests/lib/Files/Cache/WatcherTest.php b/tests/lib/Files/Cache/WatcherTest.php
index 18f0ebe98a..2a42a9e603 100644
--- a/tests/lib/Files/Cache/WatcherTest.php
+++ b/tests/lib/Files/Cache/WatcherTest.php
@@ -20,7 +20,7 @@ class WatcherTest extends \Test\TestCase {
/**
* @var \OC\Files\Storage\Storage[] $storages
*/
- private $storages = array();
+ private $storages = [];
protected function setUp(): void {
parent::setUp();
@@ -49,7 +49,7 @@ class WatcherTest extends \Test\TestCase {
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change
- $cache->put('', array('storage_mtime' => 10));
+ $cache->put('', ['storage_mtime' => 10]);
$this->assertTrue($cache->inCache('folder/bar.txt'));
$this->assertTrue($cache->inCache('folder/bar2.txt'));
@@ -61,7 +61,7 @@ class WatcherTest extends \Test\TestCase {
$cachedData = $cache->get('bar.test');
$this->assertEquals(3, $cachedData['size']);
- $cache->put('bar.test', array('storage_mtime' => 10));
+ $cache->put('bar.test', ['storage_mtime' => 10]);
$storage->file_put_contents('bar.test', 'test data');
// make sure that PHP can read the new size correctly
@@ -71,7 +71,7 @@ class WatcherTest extends \Test\TestCase {
$cachedData = $cache->get('bar.test');
$this->assertEquals(9, $cachedData['size']);
- $cache->put('folder', array('storage_mtime' => 10));
+ $cache->put('folder', ['storage_mtime' => 10]);
$storage->unlink('folder/bar2.txt');
$updater->checkUpdate('folder');
@@ -90,7 +90,7 @@ class WatcherTest extends \Test\TestCase {
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change
- $cache->put('', array('storage_mtime' => 10));
+ $cache->put('', ['storage_mtime' => 10]);
$storage->unlink('foo.txt');
$storage->rename('folder', 'foo.txt');
@@ -107,7 +107,7 @@ class WatcherTest extends \Test\TestCase {
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change
- $cache->put('foo.txt', array('storage_mtime' => 10));
+ $cache->put('foo.txt', ['storage_mtime' => 10]);
$storage->unlink('foo.txt');
$storage->rename('folder', 'foo.txt');
@@ -124,14 +124,14 @@ class WatcherTest extends \Test\TestCase {
$updater = $storage->getWatcher();
//set the mtime to the past so it can detect an mtime change
- $cache->put('foo.txt', array('storage_mtime' => 10));
+ $cache->put('foo.txt', ['storage_mtime' => 10]);
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_NEVER);
$storage->file_put_contents('foo.txt', 'q');
$this->assertFalse($updater->checkUpdate('foo.txt'));
- $cache->put('foo.txt', array('storage_mtime' => 20));
+ $cache->put('foo.txt', ['storage_mtime' => 20]);
$storage->file_put_contents('foo.txt', 'w');
$this->assertFalse($updater->checkUpdate('foo.txt'));
}
@@ -142,14 +142,14 @@ class WatcherTest extends \Test\TestCase {
$updater = $storage->getWatcher();
//set the mtime to the past so it can detect an mtime change
- $cache->put('foo.txt', array('storage_mtime' => 10));
+ $cache->put('foo.txt', ['storage_mtime' => 10]);
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
$storage->file_put_contents('foo.txt', 'q');
$this->assertTrue($updater->checkUpdate('foo.txt'));
- $cache->put('foo.txt', array('storage_mtime' => 20));
+ $cache->put('foo.txt', ['storage_mtime' => 20]);
$storage->file_put_contents('foo.txt', 'w');
$this->assertFalse($updater->checkUpdate('foo.txt'));
}
@@ -160,14 +160,14 @@ class WatcherTest extends \Test\TestCase {
$updater = $storage->getWatcher();
//set the mtime to the past so it can detect an mtime change
- $cache->put('foo.txt', array('storage_mtime' => 10));
+ $cache->put('foo.txt', ['storage_mtime' => 10]);
$updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ALWAYS);
$storage->file_put_contents('foo.txt', 'q');
$this->assertTrue($updater->checkUpdate('foo.txt'));
- $cache->put('foo.txt', array('storage_mtime' => 20));
+ $cache->put('foo.txt', ['storage_mtime' => 20]);
$storage->file_put_contents('foo.txt', 'w');
$this->assertTrue($updater->checkUpdate('foo.txt'));
}
@@ -177,7 +177,7 @@ class WatcherTest extends \Test\TestCase {
* @return \OC\Files\Storage\Storage
*/
private function getTestStorage($scan = true) {
- $storage = new \OC\Files\Storage\Temporary(array());
+ $storage = new \OC\Files\Storage\Temporary([]);
$textData = "dummy file data\n";
$imgData = file_get_contents(\OC::$SERVERROOT . '/core/img/logo/logo.png');
$storage->mkdir('folder');
diff --git a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
index 9c1a8c1410..5d7e9f8ec0 100644
--- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
+++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
@@ -34,7 +34,7 @@ class CacheJailTest extends CacheTest {
function testSearchOutsideJail() {
$file1 = 'foo/foobar';
$file2 = 'folder/foobar';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder'];
$this->sourceCache->put($file1, $data1);
$this->sourceCache->put($file2, $data1);
@@ -50,7 +50,7 @@ class CacheJailTest extends CacheTest {
$file1 = 'foo/foobar';
$file2 = 'foo/foobar/asd';
$file3 = 'folder/foobar';
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
$this->sourceCache->put('foo', $data1);
$this->sourceCache->put($file1, $data1);
@@ -64,7 +64,7 @@ class CacheJailTest extends CacheTest {
}
function testGetById() {
- $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
$id = $this->sourceCache->put('foo/bar', $data1);
// path from jailed foo of foo/bar is bar
@@ -83,7 +83,7 @@ class CacheJailTest extends CacheTest {
}
function testMoveFromJail() {
- $folderData = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
$this->sourceCache->put('source', $folderData);
$this->sourceCache->put('source/foo', $folderData);
@@ -99,7 +99,7 @@ class CacheJailTest extends CacheTest {
}
function testMoveToJail() {
- $folderData = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
$this->sourceCache->put('source', $folderData);
$this->sourceCache->put('source/foo', $folderData);
@@ -115,7 +115,7 @@ class CacheJailTest extends CacheTest {
}
function testMoveBetweenJail() {
- $folderData = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');
+ $folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
$this->sourceCache->put('source', $folderData);
$this->sourceCache->put('source/foo', $folderData);
diff --git a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php
index 9883fc1da2..20c20974c0 100644
--- a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php
+++ b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php
@@ -36,12 +36,12 @@ class CachePermissionsMaskTest extends CacheTest {
}
public function maskProvider() {
- return array(
- array(Constants::PERMISSION_ALL),
- array(Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE),
- array(Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE),
- array(Constants::PERMISSION_READ)
- );
+ return [
+ [Constants::PERMISSION_ALL],
+ [Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE],
+ [Constants::PERMISSION_ALL - Constants::PERMISSION_UPDATE],
+ [Constants::PERMISSION_READ]
+ ];
}
/**
@@ -50,12 +50,12 @@ class CachePermissionsMaskTest extends CacheTest {
*/
public function testGetMasked($mask) {
$cache = $this->getMaskedCached($mask);
- $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'permissions' => Constants::PERMISSION_ALL);
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'permissions' => Constants::PERMISSION_ALL];
$this->sourceCache->put('foo', $data);
$result = $cache->get('foo');
$this->assertEquals($mask, $result['permissions']);
- $data = array('size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'permissions' => Constants::PERMISSION_ALL - Constants::PERMISSION_DELETE);
+ $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'permissions' => Constants::PERMISSION_ALL - Constants::PERMISSION_DELETE];
$this->sourceCache->put('bar', $data);
$result = $cache->get('bar');
$this->assertEquals($mask & ~Constants::PERMISSION_DELETE, $result['permissions']);
diff --git a/tests/lib/Files/EtagTest.php b/tests/lib/Files/EtagTest.php
index d3b372fe13..8c6dd1964a 100644
--- a/tests/lib/Files/EtagTest.php
+++ b/tests/lib/Files/EtagTest.php
@@ -67,7 +67,7 @@ class EtagTest extends \Test\TestCase {
Filesystem::file_put_contents('/folder/bar.txt', 'fgh');
Filesystem::file_put_contents('/folder/subfolder/qwerty.txt', 'jkl');
- $files = array('/foo.txt', '/folder/bar.txt', '/folder/subfolder', '/folder/subfolder/qwerty.txt');
+ $files = ['/foo.txt', '/folder/bar.txt', '/folder/subfolder', '/folder/subfolder/qwerty.txt'];
$originalEtags = $this->getEtags($files);
$scanner = new \OC\Files\Utils\Scanner($user1, \OC::$server->getDatabaseConnection(), \OC::$server->query(IEventDispatcher::class), \OC::$server->getLogger());
@@ -84,7 +84,7 @@ class EtagTest extends \Test\TestCase {
* @param string[] $files
*/
private function getEtags($files) {
- $etags = array();
+ $etags = [];
foreach ($files as $file) {
$info = Filesystem::getFileInfo($file);
$etags[$file] = $info['etag'];
diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php
index 6d0362772c..d98256501b 100644
--- a/tests/lib/Files/FilesystemTest.php
+++ b/tests/lib/Files/FilesystemTest.php
@@ -66,7 +66,7 @@ class FilesystemTest extends \Test\TestCase {
/**
* @var array tmpDirs
*/
- private $tmpDirs = array();
+ private $tmpDirs = [];
/**
* @return array
@@ -74,7 +74,7 @@ class FilesystemTest extends \Test\TestCase {
private function getStorageData() {
$dir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->tmpDirs[] = $dir;
- return array('datadir' => $dir);
+ return ['datadir' => $dir];
}
protected function setUp(): void {
@@ -225,29 +225,29 @@ class FilesystemTest extends \Test\TestCase {
}
public function isValidPathData() {
- return array(
- array('/', true),
- array('/path', true),
- array('/foo/bar', true),
- array('/foo//bar/', true),
- array('/foo////bar', true),
- array('/foo//\///bar', true),
- array('/foo/bar/.', true),
- array('/foo/bar/./', true),
- array('/foo/bar/./.', true),
- array('/foo/bar/././', true),
- array('/foo/bar/././..bar', true),
- array('/foo/bar/././..bar/a', true),
- array('/foo/bar/././..', false),
- array('/foo/bar/././../', false),
- array('/foo/bar/.././', false),
- array('/foo/bar/../../', false),
- array('/foo/bar/../..\\', false),
- array('..', false),
- array('../', false),
- array('../foo/bar', false),
- array('..\foo/bar', false),
- );
+ return [
+ ['/', true],
+ ['/path', true],
+ ['/foo/bar', true],
+ ['/foo//bar/', true],
+ ['/foo////bar', true],
+ ['/foo//\///bar', true],
+ ['/foo/bar/.', true],
+ ['/foo/bar/./', true],
+ ['/foo/bar/./.', true],
+ ['/foo/bar/././', true],
+ ['/foo/bar/././..bar', true],
+ ['/foo/bar/././..bar/a', true],
+ ['/foo/bar/././..', false],
+ ['/foo/bar/././../', false],
+ ['/foo/bar/.././', false],
+ ['/foo/bar/../../', false],
+ ['/foo/bar/../..\\', false],
+ ['..', false],
+ ['../', false],
+ ['../foo/bar', false],
+ ['..\foo/bar', false],
+ ];
}
/**
@@ -258,18 +258,18 @@ class FilesystemTest extends \Test\TestCase {
}
public function isFileBlacklistedData() {
- return array(
- array('/etc/foo/bar/foo.txt', false),
- array('\etc\foo/bar\foo.txt', false),
- array('.htaccess', true),
- array('.htaccess/', true),
- array('.htaccess\\', true),
- array('/etc/foo\bar/.htaccess\\', true),
- array('/etc/foo\bar/.htaccess/', true),
- array('/etc/foo\bar/.htaccess/foo', false),
- array('//foo//bar/\.htaccess/', true),
- array('\foo\bar\.HTAccess', true),
- );
+ return [
+ ['/etc/foo/bar/foo.txt', false],
+ ['\etc\foo/bar\foo.txt', false],
+ ['.htaccess', true],
+ ['.htaccess/', true],
+ ['.htaccess\\', true],
+ ['/etc/foo\bar/.htaccess\\', true],
+ ['/etc/foo\bar/.htaccess/', true],
+ ['/etc/foo\bar/.htaccess/foo', false],
+ ['//foo//bar/\.htaccess/', true],
+ ['\foo\bar\.HTAccess', true],
+ ];
}
/**
@@ -304,7 +304,7 @@ class FilesystemTest extends \Test\TestCase {
\OC_Hook::clear('OC_Filesystem');
\OC_Hook::connect('OC_Filesystem', 'post_write', $this, 'dummyHook');
- \OC\Files\Filesystem::mount('OC\Files\Storage\Temporary', array(), '/');
+ \OC\Files\Filesystem::mount('OC\Files\Storage\Temporary', [], '/');
$rootView = new \OC\Files\View('');
$rootView->mkdir('/' . $user);
diff --git a/tests/lib/Files/Mount/ManagerTest.php b/tests/lib/Files/Mount/ManagerTest.php
index f3cdc4264e..1e80ec17ea 100644
--- a/tests/lib/Files/Mount/ManagerTest.php
+++ b/tests/lib/Files/Mount/ManagerTest.php
@@ -30,39 +30,39 @@ class ManagerTest extends \Test\TestCase {
public function testFind() {
$this->assertNull($this->manager->find('/'));
- $rootMount = new \OC\Files\Mount\MountPoint(new Temporary(array()), '/');
+ $rootMount = new \OC\Files\Mount\MountPoint(new Temporary([]), '/');
$this->manager->addMount($rootMount);
$this->assertEquals($rootMount, $this->manager->find('/'));
$this->assertEquals($rootMount, $this->manager->find('/foo/bar'));
- $storage = new Temporary(array());
+ $storage = new Temporary([]);
$mount1 = new \OC\Files\Mount\MountPoint($storage, '/foo');
$this->manager->addMount($mount1);
$this->assertEquals($rootMount, $this->manager->find('/'));
$this->assertEquals($mount1, $this->manager->find('/foo/bar'));
$this->assertEquals(1, count($this->manager->findIn('/')));
- $mount2 = new \OC\Files\Mount\MountPoint(new Temporary(array()), '/bar');
+ $mount2 = new \OC\Files\Mount\MountPoint(new Temporary([]), '/bar');
$this->manager->addMount($mount2);
$this->assertEquals(2, count($this->manager->findIn('/')));
$id = $mount1->getStorageId();
- $this->assertEquals(array($mount1), $this->manager->findByStorageId($id));
+ $this->assertEquals([$mount1], $this->manager->findByStorageId($id));
$mount3 = new \OC\Files\Mount\MountPoint($storage, '/foo/bar');
$this->manager->addMount($mount3);
- $this->assertEquals(array($mount1, $mount3), $this->manager->findByStorageId($id));
+ $this->assertEquals([$mount1, $mount3], $this->manager->findByStorageId($id));
}
public function testLong() {
- $storage = new LongId(array());
+ $storage = new LongId([]);
$mount = new \OC\Files\Mount\MountPoint($storage, '/foo');
$this->manager->addMount($mount);
$id = $mount->getStorageId();
$storageId = $storage->getId();
- $this->assertEquals(array($mount), $this->manager->findByStorageId($id));
- $this->assertEquals(array($mount), $this->manager->findByStorageId($storageId));
- $this->assertEquals(array($mount), $this->manager->findByStorageId(md5($storageId)));
+ $this->assertEquals([$mount], $this->manager->findByStorageId($id));
+ $this->assertEquals([$mount], $this->manager->findByStorageId($storageId));
+ $this->assertEquals([$mount], $this->manager->findByStorageId(md5($storageId)));
}
}
diff --git a/tests/lib/Files/Mount/MountTest.php b/tests/lib/Files/Mount/MountTest.php
index f21095f2fa..160545e784 100644
--- a/tests/lib/Files/Mount/MountTest.php
+++ b/tests/lib/Files/Mount/MountTest.php
@@ -31,7 +31,7 @@ class MountTest extends \Test\TestCase {
$wrapper = function ($mountPoint, $storage) use (&$test) {
$test->assertEquals('/foo/', $mountPoint);
$test->assertInstanceOf('\OC\Files\Storage\Storage', $storage);
- return new Wrapper(array('storage' => $storage));
+ return new Wrapper(['storage' => $storage]);
};
$loader = new StorageFactory();
@@ -40,7 +40,7 @@ class MountTest extends \Test\TestCase {
$storage = $this->getMockBuilder('\OC\Files\Storage\Temporary')
->disableOriginalConstructor()
->getMock();
- $mount = new \OC\Files\Mount\MountPoint($storage, '/foo', array(), $loader);
+ $mount = new \OC\Files\Mount\MountPoint($storage, '/foo', [], $loader);
$this->assertInstanceOf('\OC\Files\Storage\Wrapper\Wrapper', $mount->getStorage());
}
}
diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php
index 69d31b28a9..c6f468b796 100644
--- a/tests/lib/Files/Node/FileTest.php
+++ b/tests/lib/Files/Node/FileTest.php
@@ -53,7 +53,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_READ]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$this->assertEquals('bar', $node->getContent());
@@ -75,7 +75,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => 0)));
+ ->willReturn($this->getFileInfo(['permissions' => 0]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$node->getContent();
@@ -94,7 +94,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL]));
$this->view->expects($this->once())
->method('file_put_contents')
@@ -117,7 +117,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_READ]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$node->putContent('bar');
@@ -132,7 +132,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('mimetype' => 'text/plain')));
+ ->willReturn($this->getFileInfo(['mimetype' => 'text/plain']));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$this->assertEquals('text/plain', $node->getMimeType());
@@ -167,7 +167,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$fh = $node->fopen('r');
@@ -202,7 +202,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$fh = $node->fopen('w');
@@ -232,7 +232,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => 0)));
+ ->willReturn($this->getFileInfo(['permissions' => 0]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$node->fopen('r');
@@ -257,7 +257,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_UPDATE)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_UPDATE]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$node->fopen('w');
@@ -282,7 +282,7 @@ class FileTest extends NodeTest {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_READ]));
$node = new \OC\Files\Node\File($root, $this->view, '/bar/foo');
$node->fopen('w');
diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php
index 979c7fd6da..83ebc47837 100644
--- a/tests/lib/Files/Node/FolderTest.php
+++ b/tests/lib/Files/Node/FolderTest.php
@@ -64,10 +64,10 @@ class FolderTest extends NodeTest {
$view->expects($this->any())
->method('getDirectoryContent')
->with('/bar/foo')
- ->willReturn(array(
+ ->willReturn([
new FileInfo('/bar/foo/asd', null, 'foo/asd', ['fileid' => 2, 'path' => '/bar/foo/asd', 'name' => 'asd', 'size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain'], null),
new FileInfo('/bar/foo/qwerty', null, 'foo/qwerty', ['fileid' => 3, 'path' => '/bar/foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'httpd/unix-directory'], null)
- ));
+ ]);
$node = new \OC\Files\Node\Folder($root, $view, '/bar/foo');
$children = $node->getDirectoryListing();
@@ -163,7 +163,7 @@ class FolderTest extends NodeTest {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL]));
$view->expects($this->once())
->method('mkdir')
@@ -195,7 +195,7 @@ class FolderTest extends NodeTest {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_READ]));
$node = new \OC\Files\Node\Folder($root, $view, '/bar/foo');
$node->newFolder('asd');
@@ -217,7 +217,7 @@ class FolderTest extends NodeTest {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL]));
$view->expects($this->once())
->method('touch')
@@ -249,7 +249,7 @@ class FolderTest extends NodeTest {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_READ]));
$node = new \OC\Files\Node\Folder($root, $view, '/bar/foo');
$node->newFile('asd');
@@ -308,14 +308,14 @@ class FolderTest extends NodeTest {
$cache->expects($this->once())
->method('search')
->with('%qw%')
- ->willReturn(array(
- array('fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain')
- ));
+ ->willReturn([
+ ['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ ]);
$root->expects($this->once())
->method('getMountsIn')
->with('/bar/foo')
- ->willReturn(array());
+ ->willReturn([]);
$root->expects($this->once())
->method('getMount')
@@ -361,15 +361,15 @@ class FolderTest extends NodeTest {
$cache->expects($this->once())
->method('search')
->with('%qw%')
- ->willReturn(array(
- array('fileid' => 3, 'path' => 'files/foo', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'),
- array('fileid' => 3, 'path' => 'files_trashbin/foo2.d12345', 'name' => 'foo2.d12345', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'),
- ));
+ ->willReturn([
+ ['fileid' => 3, 'path' => 'files/foo', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'],
+ ['fileid' => 3, 'path' => 'files_trashbin/foo2.d12345', 'name' => 'foo2.d12345', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'],
+ ]);
$root->expects($this->once())
->method('getMountsIn')
->with('')
- ->willReturn(array());
+ ->willReturn([]);
$root->expects($this->once())
->method('getMount')
@@ -412,14 +412,14 @@ class FolderTest extends NodeTest {
$cache->expects($this->once())
->method('search')
->with('%qw%')
- ->willReturn(array(
- array('fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain')
- ));
+ ->willReturn([
+ ['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ ]);
$root->expects($this->once())
->method('getMountsIn')
->with('/bar')
- ->willReturn(array());
+ ->willReturn([]);
$root->expects($this->once())
->method('getMount')
@@ -478,21 +478,21 @@ class FolderTest extends NodeTest {
$cache->expects($this->once())
->method('search')
->with('%qw%')
- ->willReturn(array(
- array('fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain')
- ));
+ ->willReturn([
+ ['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ ]);
$subCache->expects($this->once())
->method('search')
->with('%qw%')
- ->willReturn(array(
- array('fileid' => 4, 'path' => 'asd/qweasd', 'name' => 'qweasd', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain')
- ));
+ ->willReturn([
+ ['fileid' => 4, 'path' => 'asd/qweasd', 'name' => 'qweasd', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ ]);
$root->expects($this->once())
->method('getMountsIn')
->with('/bar/foo')
- ->willReturn(array($subMount));
+ ->willReturn([$subMount]);
$root->expects($this->once())
->method('getMount')
@@ -556,7 +556,7 @@ class FolderTest extends NodeTest {
$root->expects($this->once())
->method('getMountsIn')
->with('/bar/foo')
- ->willReturn(array());
+ ->willReturn([]);
$root->expects($this->once())
->method('getMount')
@@ -659,7 +659,7 @@ class FolderTest extends NodeTest {
$root->expects($this->once())
->method('getMountsIn')
->with('/bar/foo')
- ->willReturn(array());
+ ->willReturn([]);
$root->expects($this->once())
->method('getMount')
@@ -727,7 +727,7 @@ class FolderTest extends NodeTest {
$root->expects($this->any())
->method('getMountsIn')
->with('/bar/foo')
- ->willReturn(array($mount2));
+ ->willReturn([$mount2]);
$root->expects($this->once())
->method('getMount')
diff --git a/tests/lib/Files/Node/IntegrationTest.php b/tests/lib/Files/Node/IntegrationTest.php
index 2a542a1097..26cdf398d9 100644
--- a/tests/lib/Files/Node/IntegrationTest.php
+++ b/tests/lib/Files/Node/IntegrationTest.php
@@ -57,8 +57,8 @@ class IntegrationTest extends \Test\TestCase {
$this->createMock(ILogger::class),
$this->createMock(IUserManager::class)
);
- $storage = new Temporary(array());
- $subStorage = new Temporary(array());
+ $storage = new Temporary([]);
+ $subStorage = new Temporary([]);
$this->storages[] = $storage;
$this->storages[] = $subStorage;
$this->root->mount($storage, '/');
diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php
index 18cc4d8057..b963a39556 100644
--- a/tests/lib/Files/Node/NodeTest.php
+++ b/tests/lib/Files/Node/NodeTest.php
@@ -203,13 +203,13 @@ abstract class NodeTest extends \Test\TestCase {
->method('getUser')
->willReturn($this->user);
- $stat = array(
+ $stat = [
'fileid' => 1,
'size' => 100,
'etag' => 'qwerty',
'mtime' => 50,
'permissions' => 0
- );
+ ];
$this->view->expects($this->once())
->method('stat')
@@ -225,12 +225,12 @@ abstract class NodeTest extends \Test\TestCase {
->method('getUser')
->willReturn($this->user);
- $stat = $this->getFileInfo(array(
+ $stat = $this->getFileInfo([
'fileid' => 1,
'size' => 100,
'etag' => 'qwerty',
'mtime' => 50
- ));
+ ]);
$this->view->expects($this->once())
->method('getFileInfo')
@@ -247,12 +247,12 @@ abstract class NodeTest extends \Test\TestCase {
->willReturn($this->user);
- $stat = $this->getFileInfo(array(
+ $stat = $this->getFileInfo([
'fileid' => 1,
'size' => 100,
'etag' => 'qwerty',
'mtime' => 50
- ));
+ ]);
$this->view->expects($this->once())
->method('getFileInfo')
@@ -268,12 +268,12 @@ abstract class NodeTest extends \Test\TestCase {
->method('getUser')
->willReturn($this->user);
- $stat = $this->getFileInfo(array(
+ $stat = $this->getFileInfo([
'fileid' => 1,
'size' => 100,
'etag' => 'qwerty',
'mtime' => 50
- ));
+ ]);
$this->view->expects($this->once())
->method('getFileInfo')
@@ -289,12 +289,12 @@ abstract class NodeTest extends \Test\TestCase {
->method('getUser')
->willReturn($this->user);
- $stat = $this->getFileInfo(array(
+ $stat = $this->getFileInfo([
'fileid' => 1,
'size' => 100,
'etag' => 'qwerty',
'mtime' => 50
- ));
+ ]);
$this->view->expects($this->once())
->method('getFileInfo')
@@ -319,7 +319,7 @@ abstract class NodeTest extends \Test\TestCase {
$this->view->expects($this->once())
->method('resolvePath')
->with('/bar/foo')
- ->willReturn(array($storage, 'foo'));
+ ->willReturn([$storage, 'foo']);
$node = $this->createTestNode($this->root, $this->view, '/bar/foo');
@@ -349,7 +349,7 @@ abstract class NodeTest extends \Test\TestCase {
$this->view->expects($this->once())
->method('resolvePath')
->with('/bar/foo')
- ->willReturn(array($storage, 'foo'));
+ ->willReturn([$storage, 'foo']);
$node = $this->createTestNode($this->root, $this->view, '/bar/foo');
@@ -378,7 +378,7 @@ abstract class NodeTest extends \Test\TestCase {
$this->view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL]));
$node = $this->createTestNode($this->root, $this->view, '/bar/foo');
$node->touch(100);
@@ -425,12 +425,12 @@ abstract class NodeTest extends \Test\TestCase {
$this->view->expects($this->any())
->method('resolvePath')
->with('/bar/foo')
- ->willReturn(array(null, 'foo'));
+ ->willReturn([null, 'foo']);
$this->view->expects($this->any())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL]));
$node = $this->createTestNode($root, $this->view, '/bar/foo');
$node->touch(100);
@@ -448,7 +448,7 @@ abstract class NodeTest extends \Test\TestCase {
$this->view->expects($this->any())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ)));
+ ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_READ]));
$node = $this->createTestNode($this->root, $this->view, '/bar/foo');
$node->touch(100);
diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php
index 6c4189bdec..c78bef0762 100644
--- a/tests/lib/Files/Node/RootTest.php
+++ b/tests/lib/Files/Node/RootTest.php
@@ -79,7 +79,7 @@ class RootTest extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->willReturn($this->getFileInfo(array('fileid' => 10, 'path' => 'bar/foo', 'name', 'mimetype' => 'text/plain')));
+ ->willReturn($this->getFileInfo(['fileid' => 10, 'path' => 'bar/foo', 'name', 'mimetype' => 'text/plain']));
$root->mount($storage, '');
$node = $root->get('/bar/foo');
diff --git a/tests/lib/Files/ObjectStore/NoopScannerTest.php b/tests/lib/Files/ObjectStore/NoopScannerTest.php
index 8b879e8ab3..570fc16ee9 100644
--- a/tests/lib/Files/ObjectStore/NoopScannerTest.php
+++ b/tests/lib/Files/ObjectStore/NoopScannerTest.php
@@ -22,7 +22,7 @@ class NoopScannerTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->storage = new \OC\Files\Storage\Temporary(array());
+ $this->storage = new \OC\Files\Storage\Temporary([]);
$this->scanner = new \OC\Files\ObjectStore\NoopScanner($this->storage);
}
diff --git a/tests/lib/Files/ObjectStore/S3Test.php b/tests/lib/Files/ObjectStore/S3Test.php
index 91b24d8b61..b56978f4fe 100644
--- a/tests/lib/Files/ObjectStore/S3Test.php
+++ b/tests/lib/Files/ObjectStore/S3Test.php
@@ -34,11 +34,11 @@ class MultiPartUploadS3 extends S3 {
class NonSeekableStream extends Wrapper {
public static function wrap($source) {
- $context = stream_context_create(array(
- 'nonseek' => array(
+ $context = stream_context_create([
+ 'nonseek' => [
'source' => $source
- )
- ));
+ ]
+ ]);
return Wrapper::wrapSource($source, $context, 'nonseek', self::class);
}
diff --git a/tests/lib/Files/Storage/HomeTest.php b/tests/lib/Files/Storage/HomeTest.php
index 6075e9af29..d5feb40840 100644
--- a/tests/lib/Files/Storage/HomeTest.php
+++ b/tests/lib/Files/Storage/HomeTest.php
@@ -73,7 +73,7 @@ class HomeTest extends Storage {
$this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->userId = $this->getUniqueID('user_');
$this->user = new DummyUser($this->userId, $this->tmpDir);
- $this->instance = new \OC\Files\Storage\Home(array('user' => $this->user));
+ $this->instance = new \OC\Files\Storage\Home(['user' => $this->user]);
}
protected function tearDown(): void {
diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php
index 23738a25c2..4678481124 100644
--- a/tests/lib/Files/Storage/LocalTest.php
+++ b/tests/lib/Files/Storage/LocalTest.php
@@ -39,7 +39,7 @@ class LocalTest extends Storage {
parent::setUp();
$this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
- $this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
+ $this->instance = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]);
}
protected function tearDown(): void {
diff --git a/tests/lib/Files/Storage/Storage.php b/tests/lib/Files/Storage/Storage.php
index a25a3f74f9..736cbfff4f 100644
--- a/tests/lib/Files/Storage/Storage.php
+++ b/tests/lib/Files/Storage/Storage.php
@@ -80,13 +80,13 @@ abstract class Storage extends \Test\TestCase {
$this->assertTrue($this->instance->isUpdatable('/' . $directory));
$dh = $this->instance->opendir('/');
- $content = array();
+ $content = [];
while ($file = readdir($dh)) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
}
- $this->assertEquals(array($directory), $content);
+ $this->assertEquals([$directory], $content);
$this->assertFalse($this->instance->mkdir('/' . $directory)); //can't create existing folders
$this->assertTrue($this->instance->rmdir('/' . $directory));
@@ -97,13 +97,13 @@ abstract class Storage extends \Test\TestCase {
$this->assertFalse($this->instance->rmdir('/' . $directory)); //can't remove non existing folders
$dh = $this->instance->opendir('/');
- $content = array();
+ $content = [];
while ($file = readdir($dh)) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
}
- $this->assertEquals(array(), $content);
+ $this->assertEquals([], $content);
}
public function fileNameProvider() {
@@ -130,12 +130,12 @@ abstract class Storage extends \Test\TestCase {
function loremFileProvider() {
$root = \OC::$SERVERROOT . '/tests/data/';
- return array(
+ return [
// small file
- array($root . 'lorem.txt'),
+ [$root . 'lorem.txt'],
// bigger file (> 8 KB which is the standard PHP block size)
- array($root . 'lorem-big.txt')
- );
+ [$root . 'lorem-big.txt']
+ ];
}
/**
@@ -413,11 +413,11 @@ abstract class Storage extends \Test\TestCase {
}
public function hashProvider() {
- return array(
- array('Foobar', 'md5'),
- array('Foobar', 'sha1'),
- array('Foobar', 'sha256'),
- );
+ return [
+ ['Foobar', 'md5'],
+ ['Foobar', 'sha1'],
+ ['Foobar', 'sha256'],
+ ];
}
/**
@@ -438,14 +438,14 @@ abstract class Storage extends \Test\TestCase {
$this->assertEquals('data', $this->instance->file_get_contents('#foo/test.txt'));
$dh = $this->instance->opendir('#foo');
- $content = array();
+ $content = [];
while ($file = readdir($dh)) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
}
- $this->assertEquals(array('test.txt'), $content);
+ $this->assertEquals(['test.txt'], $content);
}
public function testCopyOverWriteFile() {
diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
index a9d678e76e..ac3880309c 100644
--- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
@@ -148,7 +148,7 @@ class EncryptionTest extends Storage {
$this->logger = $this->createMock(Log::class);
- $this->sourceStorage = new Temporary(array());
+ $this->sourceStorage = new Temporary([]);
$this->keyStore = $this->getMockBuilder('\OC\Encryption\Keys\Storage')
->disableOriginalConstructor()->getMock();
@@ -458,13 +458,13 @@ class EncryptionTest extends Storage {
* @return array
*/
public function dataTestCopyAndRename() {
- return array(
- array('source', 'target', true, false, false),
- array('source', 'target', true, true, false),
- array('source', '/subFolder/target', true, false, false),
- array('source', '/subFolder/target', true, true, true),
- array('source', '/subFolder/target', false, true, false),
- );
+ return [
+ ['source', 'target', true, false, false],
+ ['source', 'target', true, true, false],
+ ['source', '/subFolder/target', true, false, false],
+ ['source', '/subFolder/target', true, true, true],
+ ['source', '/subFolder/target', false, true, false],
+ ];
}
public function testIsLocal() {
@@ -512,16 +512,16 @@ class EncryptionTest extends Storage {
}
public function dataTestRmdir() {
- return array(
- array('/file.txt', true, true, true),
- array('/file.txt', false, true, true),
- array('/file.txt', true, false, true),
- array('/file.txt', false, false, true),
- array('/file.txt', true, true, false),
- array('/file.txt', false, true, false),
- array('/file.txt', true, false, false),
- array('/file.txt', false, false, false),
- );
+ return [
+ ['/file.txt', true, true, true],
+ ['/file.txt', false, true, true],
+ ['/file.txt', true, false, true],
+ ['/file.txt', false, false, true],
+ ['/file.txt', true, true, false],
+ ['/file.txt', false, true, false],
+ ['/file.txt', true, false, false],
+ ['/file.txt', false, false, false],
+ ];
}
/**
@@ -547,10 +547,10 @@ class EncryptionTest extends Storage {
}
public function dataTestCopyKeys() {
- return array(
- array(true, false),
- array(false, true),
- );
+ return [
+ [true, false],
+ [false, true],
+ ];
}
/**
@@ -613,13 +613,13 @@ class EncryptionTest extends Storage {
}
public function dataTestGetHeader() {
- return array(
- array('/foo/bar.txt', false, '/foo/bar.txt'),
- array('/foo/bar.txt.part', false, '/foo/bar.txt'),
- array('/foo/bar.txt.ocTransferId7437493.part', false, '/foo/bar.txt'),
- array('/foo/bar.txt.part', true, '/foo/bar.txt'),
- array('/foo/bar.txt.ocTransferId7437493.part', true, '/foo/bar.txt'),
- );
+ return [
+ ['/foo/bar.txt', false, '/foo/bar.txt'],
+ ['/foo/bar.txt.part', false, '/foo/bar.txt'],
+ ['/foo/bar.txt.ocTransferId7437493.part', false, '/foo/bar.txt'],
+ ['/foo/bar.txt.part', true, '/foo/bar.txt'],
+ ['/foo/bar.txt.ocTransferId7437493.part', true, '/foo/bar.txt'],
+ ];
}
/**
diff --git a/tests/lib/Files/Storage/Wrapper/JailTest.php b/tests/lib/Files/Storage/Wrapper/JailTest.php
index cb7003cb7e..6c8905af76 100644
--- a/tests/lib/Files/Storage/Wrapper/JailTest.php
+++ b/tests/lib/Files/Storage/Wrapper/JailTest.php
@@ -17,24 +17,24 @@ class JailTest extends \Test\Files\Storage\Storage {
protected function setUp(): void {
parent::setUp();
- $this->sourceStorage = new \OC\Files\Storage\Temporary(array());
+ $this->sourceStorage = new \OC\Files\Storage\Temporary([]);
$this->sourceStorage->mkdir('foo');
- $this->instance = new \OC\Files\Storage\Wrapper\Jail(array(
+ $this->instance = new \OC\Files\Storage\Wrapper\Jail([
'storage' => $this->sourceStorage,
'root' => 'foo'
- ));
+ ]);
}
protected function tearDown(): void {
// test that nothing outside our jail is touched
- $contents = array();
+ $contents = [];
$dh = $this->sourceStorage->opendir('');
while ($file = readdir($dh)) {
if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
$contents[] = $file;
}
}
- $this->assertEquals(array('foo'), $contents);
+ $this->assertEquals(['foo'], $contents);
$this->sourceStorage->cleanUp();
parent::tearDown();
}
diff --git a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php
index bfdd3d3ddb..1e69ee7165 100644
--- a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php
+++ b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php
@@ -24,7 +24,7 @@ class PermissionsMaskTest extends \Test\Files\Storage\Storage {
protected function setUp(): void {
parent::setUp();
- $this->sourceStorage = new \OC\Files\Storage\Temporary(array());
+ $this->sourceStorage = new \OC\Files\Storage\Temporary([]);
$this->instance = $this->getMaskedStorage(Constants::PERMISSION_ALL);
}
@@ -34,10 +34,10 @@ class PermissionsMaskTest extends \Test\Files\Storage\Storage {
}
protected function getMaskedStorage($mask) {
- return new \OC\Files\Storage\Wrapper\PermissionsMask(array(
+ return new \OC\Files\Storage\Wrapper\PermissionsMask([
'storage' => $this->sourceStorage,
'mask' => $mask
- ));
+ ]);
}
public function testMkdirNoCreate() {
@@ -129,10 +129,10 @@ class PermissionsMaskTest extends \Test\Files\Storage\Storage {
public function testScanNewFilesNested() {
$storage = $this->getMaskedStorage(Constants::PERMISSION_READ + Constants::PERMISSION_CREATE + Constants::PERMISSION_UPDATE);
- $nestedStorage = new \OC\Files\Storage\Wrapper\PermissionsMask(array(
+ $nestedStorage = new \OC\Files\Storage\Wrapper\PermissionsMask([
'storage' => $storage,
'mask' => Constants::PERMISSION_READ + Constants::PERMISSION_CREATE
- ));
+ ]);
$wrappedStorage = new Wrapper(['storage' => $nestedStorage]);
$wrappedStorage->file_put_contents('foo', 'bar');
$wrappedStorage->getScanner()->scan('');
diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
index 164541b670..65cfe30eb1 100644
--- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php
+++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
@@ -31,8 +31,8 @@ class QuotaTest extends \Test\Files\Storage\Storage {
parent::setUp();
$this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
- $storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
- $this->instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 10000000));
+ $storage = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]);
+ $this->instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => 10000000]);
}
protected function tearDown(): void {
@@ -44,10 +44,10 @@ class QuotaTest extends \Test\Files\Storage\Storage {
* @param integer $limit
*/
protected function getLimitedStorage($limit) {
- $storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
+ $storage = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]);
$storage->mkdir('files');
$storage->getScanner()->scan('');
- return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $limit));
+ return new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => $limit]);
}
public function testFilePutContentsNotEnoughSpace() {
@@ -70,7 +70,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
public function testFreeSpaceWithUsedSpace() {
$instance = $this->getLimitedStorage(9);
$instance->getCache()->put(
- '', array('size' => 3)
+ '', ['size' => 3]
);
$this->assertEquals(6, $instance->free_space(''));
}
@@ -85,9 +85,9 @@ class QuotaTest extends \Test\Files\Storage\Storage {
->willReturn(-2);
$storage->getScanner()->scan('');
- $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 9));
+ $instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => 9]);
$instance->getCache()->put(
- '', array('size' => 3)
+ '', ['size' => 3]
);
$this->assertEquals(6, $instance->free_space(''));
}
@@ -95,7 +95,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
public function testFreeSpaceWithUsedSpaceAndEncryption() {
$instance = $this->getLimitedStorage(9);
$instance->getCache()->put(
- '', array('size' => 7)
+ '', ['size' => 7]
);
$this->assertEquals(2, $instance->free_space(''));
}
@@ -140,7 +140,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
->method('fopen')
->willReturn(false);
- $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $failStorage, 'quota' => 1000));
+ $instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $failStorage, 'quota' => 1000]);
$this->assertFalse($instance->fopen('failedfopen', 'r'));
}
@@ -198,7 +198,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
->with('files')
->willReturn(new CacheEntry(['size' => 50]));
- $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 1024, 'root' => 'files'));
+ $instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => 1024, 'root' => 'files']);
$this->assertEquals(1024 - 50, $instance->free_space(''));
}
diff --git a/tests/lib/Files/Storage/Wrapper/WrapperTest.php b/tests/lib/Files/Storage/Wrapper/WrapperTest.php
index 2477b361bc..b9bb54e09b 100644
--- a/tests/lib/Files/Storage/Wrapper/WrapperTest.php
+++ b/tests/lib/Files/Storage/Wrapper/WrapperTest.php
@@ -18,8 +18,8 @@ class WrapperTest extends \Test\Files\Storage\Storage {
parent::setUp();
$this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
- $storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
- $this->instance = new \OC\Files\Storage\Wrapper\Wrapper(array('storage' => $storage));
+ $storage = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]);
+ $this->instance = new \OC\Files\Storage\Wrapper\Wrapper(['storage' => $storage]);
}
protected function tearDown(): void {
diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php
index e55dae98cb..43114ff70f 100644
--- a/tests/lib/Files/Stream/EncryptionTest.php
+++ b/tests/lib/Files/Stream/EncryptionTest.php
@@ -101,7 +101,7 @@ class EncryptionTest extends \Test\TestCase {
$fileMock->expects($this->once())->method('getAccessList')
->willReturnCallback(function ($sharePath) use ($expectedSharePath) {
$this->assertSame($expectedSharePath, $sharePath);
- return array();
+ return [];
});
}
$utilMock = $this->getMockBuilder('\OC\Encryption\Util')
@@ -138,7 +138,7 @@ class EncryptionTest extends \Test\TestCase {
$fullPathP->setAccessible(false);
$header = $stream->getProperty('header');
$header->setAccessible(true);
- $header->setValue($streamWrapper, array());
+ $header->setValue($streamWrapper, []);
$header->setAccessible(false);
$this->invokePrivate($streamWrapper, 'signed', [true]);
diff --git a/tests/lib/Files/Utils/ScannerTest.php b/tests/lib/Files/Utils/ScannerTest.php
index 9d82e4ae1e..c5183ac392 100644
--- a/tests/lib/Files/Utils/ScannerTest.php
+++ b/tests/lib/Files/Utils/ScannerTest.php
@@ -21,7 +21,7 @@ class TestScanner extends \OC\Files\Utils\Scanner {
/**
* @var \OC\Files\Mount\MountPoint[] $mounts
*/
- private $mounts = array();
+ private $mounts = [];
/**
* @param \OC\Files\Mount\MountPoint $mount
@@ -63,7 +63,7 @@ class ScannerTest extends \Test\TestCase {
}
public function testReuseExistingRoot() {
- $storage = new Temporary(array());
+ $storage = new Temporary([]);
$mount = new MountPoint($storage, '');
Filesystem::getMountManager()->addMount($mount);
$cache = $storage->getCache();
@@ -85,7 +85,7 @@ class ScannerTest extends \Test\TestCase {
}
public function testReuseExistingFile() {
- $storage = new Temporary(array());
+ $storage = new Temporary([]);
$mount = new MountPoint($storage, '');
Filesystem::getMountManager()->addMount($mount);
$cache = $storage->getCache();
@@ -112,7 +112,7 @@ class ScannerTest extends \Test\TestCase {
$mountProvider = $this->createMock(IMountProvider::class);
- $storage = new Temporary(array());
+ $storage = new Temporary([]);
$mount = new MountPoint($storage, '/' . $uid . '/files/foo');
$mountProvider->expects($this->any())
@@ -169,7 +169,7 @@ class ScannerTest extends \Test\TestCase {
}
public function testPropagateEtag() {
- $storage = new Temporary(array());
+ $storage = new Temporary([]);
$mount = new MountPoint($storage, '');
Filesystem::getMountManager()->addMount($mount);
$cache = $storage->getCache();
@@ -213,7 +213,7 @@ class ScannerTest extends \Test\TestCase {
}
public function testShallow() {
- $storage = new Temporary(array());
+ $storage = new Temporary([]);
$mount = new MountPoint($storage, '');
Filesystem::getMountManager()->addMount($mount);
$cache = $storage->getCache();
diff --git a/tests/lib/Group/Backend.php b/tests/lib/Group/Backend.php
index f702d94b2b..541ed78719 100644
--- a/tests/lib/Group/Backend.php
+++ b/tests/lib/Group/Backend.php
@@ -108,15 +108,15 @@ abstract class Backend extends \Test\TestCase {
$this->assertFalse($this->backend->addToGroup($user1, $group1));
- $this->assertEquals(array($user1), $this->backend->usersInGroup($group1));
- $this->assertEquals(array(), $this->backend->usersInGroup($group2));
+ $this->assertEquals([$user1], $this->backend->usersInGroup($group1));
+ $this->assertEquals([], $this->backend->usersInGroup($group2));
- $this->assertEquals(array($group1), $this->backend->getUserGroups($user1));
- $this->assertEquals(array(), $this->backend->getUserGroups($user2));
+ $this->assertEquals([$group1], $this->backend->getUserGroups($user1));
+ $this->assertEquals([], $this->backend->getUserGroups($user2));
$this->backend->deleteGroup($group1);
- $this->assertEquals(array(), $this->backend->getUserGroups($user1));
- $this->assertEquals(array(), $this->backend->usersInGroup($group1));
+ $this->assertEquals([], $this->backend->getUserGroups($user1));
+ $this->assertEquals([], $this->backend->usersInGroup($group1));
$this->assertFalse($this->backend->inGroup($user1, $group1));
}
diff --git a/tests/lib/Group/DatabaseTest.php b/tests/lib/Group/DatabaseTest.php
index 4af8b1cd43..586d77e0ec 100644
--- a/tests/lib/Group/DatabaseTest.php
+++ b/tests/lib/Group/DatabaseTest.php
@@ -31,7 +31,7 @@ namespace Test\Group;
* @group DB
*/
class DatabaseTest extends Backend {
- private $groups = array();
+ private $groups = [];
/**
* get a new unique group name
diff --git a/tests/lib/Group/GroupTest.php b/tests/lib/Group/GroupTest.php
index 554432a2c8..fe44216887 100644
--- a/tests/lib/Group/GroupTest.php
+++ b/tests/lib/Group/GroupTest.php
@@ -56,11 +56,11 @@ class GroupTest extends \Test\TestCase {
$user3 = $this->newUser('user3', $backend);
$userManager->expects($this->any())
->method('get')
- ->willReturnMap(array(
- array('user1', $user1),
- array('user2', $user2),
- array('user3', $user3)
- ));
+ ->willReturnMap([
+ ['user1', $user1],
+ ['user2', $user2],
+ ['user3', $user3]
+ ]);
return $userManager;
}
@@ -69,12 +69,12 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('usersInGroup')
->with('group1')
- ->willReturn(array('user1', 'user2'));
+ ->willReturn(['user1', 'user2']);
$users = $group->getUsers();
@@ -93,17 +93,17 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend1, $backend2), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1, $backend2], $this->dispatcher, $userManager);
$backend1->expects($this->once())
->method('usersInGroup')
->with('group1')
- ->willReturn(array('user1', 'user2'));
+ ->willReturn(['user1', 'user2']);
$backend2->expects($this->once())
->method('usersInGroup')
->with('group1')
- ->willReturn(array('user2', 'user3'));
+ ->willReturn(['user2', 'user3']);
$users = $group->getUsers();
@@ -124,7 +124,7 @@ class GroupTest extends \Test\TestCase {
$userBackend = $this->getMockBuilder('\OC\User\Backend')
->disableOriginalConstructor()
->getMock();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('inGroup')
@@ -145,7 +145,7 @@ class GroupTest extends \Test\TestCase {
$userBackend = $this->getMockBuilder(\OC\User\Backend::class)
->disableOriginalConstructor()
->getMock();
- $group = new \OC\Group\Group('group1', array($backend1, $backend2), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1, $backend2], $this->dispatcher, $userManager);
$backend1->expects($this->once())
->method('inGroup')
@@ -168,7 +168,7 @@ class GroupTest extends \Test\TestCase {
$userBackend = $this->getMockBuilder('\OC\User\Backend')
->disableOriginalConstructor()
->getMock();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('inGroup')
@@ -193,7 +193,7 @@ class GroupTest extends \Test\TestCase {
$userBackend = $this->getMockBuilder('\OC\User\Backend')
->disableOriginalConstructor()
->getMock();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('inGroup')
@@ -217,7 +217,7 @@ class GroupTest extends \Test\TestCase {
$userBackend = $this->getMockBuilder('\OC\User\Backend')
->disableOriginalConstructor()
->getMock();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('inGroup')
@@ -242,7 +242,7 @@ class GroupTest extends \Test\TestCase {
$userBackend = $this->getMockBuilder(\OC\User\Backend::class)
->disableOriginalConstructor()
->getMock();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('inGroup')
@@ -269,7 +269,7 @@ class GroupTest extends \Test\TestCase {
$userBackend = $this->getMockBuilder('\OC\User\Backend')
->disableOriginalConstructor()
->getMock();
- $group = new \OC\Group\Group('group1', array($backend1, $backend2), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1, $backend2], $this->dispatcher, $userManager);
$backend1->expects($this->once())
->method('inGroup')
@@ -303,12 +303,12 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('usersInGroup')
->with('group1', '2')
- ->willReturn(array('user2'));
+ ->willReturn(['user2']);
$users = $group->searchUsers('2');
@@ -325,16 +325,16 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend1, $backend2), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1, $backend2], $this->dispatcher, $userManager);
$backend1->expects($this->once())
->method('usersInGroup')
->with('group1', '2')
- ->willReturn(array('user2'));
+ ->willReturn(['user2']);
$backend2->expects($this->once())
->method('usersInGroup')
->with('group1', '2')
- ->willReturn(array('user2'));
+ ->willReturn(['user2']);
$users = $group->searchUsers('2');
@@ -348,12 +348,12 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('usersInGroup')
->with('group1', 'user', 1, 1)
- ->willReturn(array('user2'));
+ ->willReturn(['user2']);
$users = $group->searchUsers('user', 1, 1);
@@ -370,16 +370,16 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend1, $backend2), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1, $backend2], $this->dispatcher, $userManager);
$backend1->expects($this->once())
->method('usersInGroup')
->with('group1', 'user', 2, 1)
- ->willReturn(array('user2'));
+ ->willReturn(['user2']);
$backend2->expects($this->once())
->method('usersInGroup')
->with('group1', 'user', 2, 1)
- ->willReturn(array('user1'));
+ ->willReturn(['user1']);
$users = $group->searchUsers('user', 2, 1);
@@ -395,7 +395,7 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend1), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1], $this->dispatcher, $userManager);
$backend1->expects($this->once())
->method('countUsersInGroup')
@@ -419,7 +419,7 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend1, $backend2), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1, $backend2], $this->dispatcher, $userManager);
$backend1->expects($this->once())
->method('countUsersInGroup')
@@ -447,7 +447,7 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend1), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend1], $this->dispatcher, $userManager);
$backend1->expects($this->never())
->method('countUsersInGroup');
@@ -465,7 +465,7 @@ class GroupTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
$userManager = $this->getUserManager();
- $group = new \OC\Group\Group('group1', array($backend), $this->dispatcher, $userManager);
+ $group = new \OC\Group\Group('group1', [$backend], $this->dispatcher, $userManager);
$backend->expects($this->once())
->method('deleteGroup')
diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php
index 8385c924ed..73b315ac29 100644
--- a/tests/lib/Group/ManagerTest.php
+++ b/tests/lib/Group/ManagerTest.php
@@ -255,7 +255,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getGroups')
->with('1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend->expects($this->once())
->method('groupExists')
->with('group1')
@@ -278,7 +278,7 @@ class ManagerTest extends TestCase {
$backend1->expects($this->once())
->method('getGroups')
->with('1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -290,7 +290,7 @@ class ManagerTest extends TestCase {
$backend2->expects($this->once())
->method('getGroups')
->with('1')
- ->willReturn(array('group12', 'group1'));
+ ->willReturn(['group12', 'group1']);
$backend2->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -315,7 +315,7 @@ class ManagerTest extends TestCase {
$backend1->expects($this->once())
->method('getGroups')
->with('1', 2, 1)
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -327,7 +327,7 @@ class ManagerTest extends TestCase {
$backend2->expects($this->once())
->method('getGroups')
->with('1', 2, 1)
- ->willReturn(array('group12'));
+ ->willReturn(['group12']);
$backend2->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -374,7 +374,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend->expects($this->any())
->method('groupExists')
->with('group1')
@@ -421,7 +421,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend->expects($this->any())
->method('groupExists')
->with('group1')
@@ -448,7 +448,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'admin', 'group2'));
+ ->willReturn(['group1', 'admin', 'group2']);
$backend->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -467,7 +467,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'admin', 'group2'));
+ ->willReturn(['group1', 'admin', 'group2']);
$backend->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -486,7 +486,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'group2'));
+ ->willReturn(['group1', 'group2']);
$backend->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -505,7 +505,7 @@ class ManagerTest extends TestCase {
$backend1->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -517,7 +517,7 @@ class ManagerTest extends TestCase {
$backend2->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'group2'));
+ ->willReturn(['group1', 'group2']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -730,7 +730,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('usersInGroup')
->with('testgroup', '', -1, 0)
- ->willReturn(array('user2', 'user33'));
+ ->willReturn(['user2', 'user33']);
$this->userManager->expects($this->any())
->method('get')
@@ -769,7 +769,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('usersInGroup')
->with('testgroup', '', 1, 0)
- ->willReturn(array('user2'));
+ ->willReturn(['user2']);
$this->userManager->expects($this->any())
->method('get')
@@ -808,7 +808,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('usersInGroup')
->with('testgroup', '', 1, 1)
- ->willReturn(array('user33'));
+ ->willReturn(['user33']);
$this->userManager->expects($this->any())
->method('get')
@@ -857,7 +857,7 @@ class ManagerTest extends TestCase {
// prime cache
$user1 = $this->getTestUser('user1');
$groups = $manager->getUserGroups($user1);
- $this->assertEquals(array(), $groups);
+ $this->assertEquals([], $groups);
// add user
$group = $manager->get('group1');
@@ -907,7 +907,7 @@ class ManagerTest extends TestCase {
// remove user
$group = $manager->get('group1');
$group->removeUser($user1);
- $expectedGroups = array();
+ $expectedGroups = [];
// check result
$groups = $manager->getUserGroups($user1);
diff --git a/tests/lib/HelperStorageTest.php b/tests/lib/HelperStorageTest.php
index 29250109d0..606a527f5c 100644
--- a/tests/lib/HelperStorageTest.php
+++ b/tests/lib/HelperStorageTest.php
@@ -46,7 +46,7 @@ class HelperStorageTest extends \Test\TestCase {
$this->storageMock = null;
}
\OC\Files\Filesystem::tearDown();
- \OC\Files\Filesystem::mount($this->storage, array(), '/');
+ \OC\Files\Filesystem::mount($this->storage, [], '/');
\OC_User::setUserId('');
$user = \OC::$server->getUserManager()->get($this->user);
@@ -80,7 +80,7 @@ class HelperStorageTest extends \Test\TestCase {
*/
function testGetStorageInfo() {
$homeStorage = $this->getStorageMock(12);
- \OC\Files\Filesystem::mount($homeStorage, array(), '/' . $this->user . '/files');
+ \OC\Files\Filesystem::mount($homeStorage, [], '/' . $this->user . '/files');
$homeStorage->file_put_contents('test.txt', '01234');
$storageInfo = \OC_Helper::getStorageInfo('');
@@ -94,14 +94,14 @@ class HelperStorageTest extends \Test\TestCase {
*/
function testGetStorageInfoExcludingExtStorage() {
$homeStorage = $this->getStorageMock(12);
- \OC\Files\Filesystem::mount($homeStorage, array(), '/' . $this->user . '/files');
+ \OC\Files\Filesystem::mount($homeStorage, [], '/' . $this->user . '/files');
$homeStorage->file_put_contents('test.txt', '01234');
- $extStorage = new \OC\Files\Storage\Temporary(array());
+ $extStorage = new \OC\Files\Storage\Temporary([]);
$extStorage->file_put_contents('extfile.txt', 'abcdefghijklmnopq');
$extStorage->getScanner()->scan(''); // update root size
- \OC\Files\Filesystem::mount($extStorage, array(), '/' . $this->user . '/files/ext');
+ \OC\Files\Filesystem::mount($extStorage, [], '/' . $this->user . '/files/ext');
$storageInfo = \OC_Helper::getStorageInfo('');
$this->assertEquals(12, $storageInfo['free']);
@@ -113,15 +113,15 @@ class HelperStorageTest extends \Test\TestCase {
* Test getting the storage info, including extra mount points
*/
function testGetStorageInfoIncludingExtStorage() {
- $homeStorage = new \OC\Files\Storage\Temporary(array());
- \OC\Files\Filesystem::mount($homeStorage, array(), '/' . $this->user . '/files');
+ $homeStorage = new \OC\Files\Storage\Temporary([]);
+ \OC\Files\Filesystem::mount($homeStorage, [], '/' . $this->user . '/files');
$homeStorage->file_put_contents('test.txt', '01234');
- $extStorage = new \OC\Files\Storage\Temporary(array());
+ $extStorage = new \OC\Files\Storage\Temporary([]);
$extStorage->file_put_contents('extfile.txt', 'abcdefghijklmnopq');
$extStorage->getScanner()->scan(''); // update root size
- \OC\Files\Filesystem::mount($extStorage, array(), '/' . $this->user . '/files/ext');
+ \OC\Files\Filesystem::mount($extStorage, [], '/' . $this->user . '/files/ext');
$config = \OC::$server->getConfig();
$oldConfig = $config->getSystemValue('quota_include_external_storage', false);
@@ -145,14 +145,14 @@ class HelperStorageTest extends \Test\TestCase {
*/
function testGetStorageInfoIncludingExtStorageWithNoUserQuota() {
$homeStorage = $this->getStorageMock(12);
- \OC\Files\Filesystem::mount($homeStorage, array(), '/' . $this->user . '/files');
+ \OC\Files\Filesystem::mount($homeStorage, [], '/' . $this->user . '/files');
$homeStorage->file_put_contents('test.txt', '01234');
- $extStorage = new \OC\Files\Storage\Temporary(array());
+ $extStorage = new \OC\Files\Storage\Temporary([]);
$extStorage->file_put_contents('extfile.txt', 'abcdefghijklmnopq');
$extStorage->getScanner()->scan(''); // update root size
- \OC\Files\Filesystem::mount($extStorage, array(), '/' . $this->user . '/files/ext');
+ \OC\Files\Filesystem::mount($extStorage, [], '/' . $this->user . '/files/ext');
$config = \OC::$server->getConfig();
$oldConfig = $config->getSystemValue('quota_include_external_storage', false);
@@ -174,12 +174,12 @@ class HelperStorageTest extends \Test\TestCase {
$homeStorage = $this->getStorageMock(12);
$homeStorage->file_put_contents('test.txt', '01234');
$homeStorage = new \OC\Files\Storage\Wrapper\Quota(
- array(
+ [
'storage' => $homeStorage,
'quota' => 7
- )
+ ]
);
- \OC\Files\Filesystem::mount($homeStorage, array(), '/' . $this->user . '/files');
+ \OC\Files\Filesystem::mount($homeStorage, [], '/' . $this->user . '/files');
$storageInfo = \OC_Helper::getStorageInfo('');
$this->assertEquals(2, $storageInfo['free']);
@@ -194,12 +194,12 @@ class HelperStorageTest extends \Test\TestCase {
$homeStorage = $this->getStorageMock(12);
$homeStorage->file_put_contents('test.txt', '0123456789');
$homeStorage = new \OC\Files\Storage\Wrapper\Quota(
- array(
+ [
'storage' => $homeStorage,
'quota' => 7
- )
+ ]
);
- \OC\Files\Filesystem::mount($homeStorage, array(), '/' . $this->user . '/files');
+ \OC\Files\Filesystem::mount($homeStorage, [], '/' . $this->user . '/files');
$storageInfo = \OC_Helper::getStorageInfo('');
$this->assertEquals(0, $storageInfo['free']);
@@ -216,12 +216,12 @@ class HelperStorageTest extends \Test\TestCase {
$homeStorage = $this->getStorageMock(12);
$homeStorage->file_put_contents('test.txt', '01234');
$homeStorage = new \OC\Files\Storage\Wrapper\Quota(
- array(
+ [
'storage' => $homeStorage,
'quota' => 18
- )
+ ]
);
- \OC\Files\Filesystem::mount($homeStorage, array(), '/' . $this->user . '/files');
+ \OC\Files\Filesystem::mount($homeStorage, [], '/' . $this->user . '/files');
$storageInfo = \OC_Helper::getStorageInfo('');
$this->assertEquals(12, $storageInfo['free']);
diff --git a/tests/lib/HookHelper.php b/tests/lib/HookHelper.php
index f1cce83147..5e040724d9 100644
--- a/tests/lib/HookHelper.php
+++ b/tests/lib/HookHelper.php
@@ -62,45 +62,45 @@ class HookHelper {
}
public static function createCallback($params) {
- self::$hookCalls[] = array(
+ self::$hookCalls[] = [
'signal' => Filesystem::signal_create,
'params' => $params
- );
+ ];
}
public static function updateCallback($params) {
- self::$hookCalls[] = array(
+ self::$hookCalls[] = [
'signal' => Filesystem::signal_update,
'params' => $params
- );
+ ];
}
public static function writeCallback($params) {
- self::$hookCalls[] = array(
+ self::$hookCalls[] = [
'signal' => Filesystem::signal_write,
'params' => $params
- );
+ ];
}
public static function postCreateCallback($params) {
- self::$hookCalls[] = array(
+ self::$hookCalls[] = [
'signal' => Filesystem::signal_post_create,
'params' => $params
- );
+ ];
}
public static function postUpdateCallback($params) {
- self::$hookCalls[] = array(
+ self::$hookCalls[] = [
'signal' => Filesystem::signal_post_update,
'params' => $params
- );
+ ];
}
public static function postWriteCallback($params) {
- self::$hookCalls[] = array(
+ self::$hookCalls[] = [
'signal' => Filesystem::signal_post_write,
'params' => $params
- );
+ ];
}
/**
diff --git a/tests/lib/Hooks/BasicEmitterTest.php b/tests/lib/Hooks/BasicEmitterTest.php
index 1f88dee103..01ae4d4f28 100644
--- a/tests/lib/Hooks/BasicEmitterTest.php
+++ b/tests/lib/Hooks/BasicEmitterTest.php
@@ -16,7 +16,7 @@ namespace Test\Hooks;
* @package Test\Hooks
*/
class DummyEmitter extends \OC\Hooks\BasicEmitter {
- public function emitEvent($scope, $method, $arguments = array()) {
+ public function emitEvent($scope, $method, $arguments = []) {
$this->emit($scope, $method, $arguments);
}
}
@@ -64,7 +64,7 @@ class BasicEmitterTest extends \Test\TestCase {
public function testStaticCallback() {
$this->expectException(\Test\Hooks\EmittedException::class);
- $this->emitter->listen('Test', 'test', array('\Test\Hooks\BasicEmitterTest', 'staticCallBack'));
+ $this->emitter->listen('Test', 'test', ['\Test\Hooks\BasicEmitterTest', 'staticCallBack']);
$this->emitter->emitEvent('Test', 'test');
}
@@ -72,7 +72,7 @@ class BasicEmitterTest extends \Test\TestCase {
public function testNonStaticCallback() {
$this->expectException(\Test\Hooks\EmittedException::class);
- $this->emitter->listen('Test', 'test', array($this, 'nonStaticCallBack'));
+ $this->emitter->listen('Test', 'test', [$this, 'nonStaticCallBack']);
$this->emitter->emitEvent('Test', 'test');
}
@@ -134,7 +134,7 @@ class BasicEmitterTest extends \Test\TestCase {
throw new EmittedException;
}
});
- $this->emitter->emitEvent('Test', 'test', array('foo', 'bar'));
+ $this->emitter->emitEvent('Test', 'test', ['foo', 'bar']);
}
@@ -146,7 +146,7 @@ class BasicEmitterTest extends \Test\TestCase {
throw new EmittedException;
}
});
- $this->emitter->emitEvent('Test', 'test', array('foo' => 'foo', 'bar' => 'bar'));
+ $this->emitter->emitEvent('Test', 'test', ['foo' => 'foo', 'bar' => 'bar']);
}
public function testRemoveAllSpecified() {
diff --git a/tests/lib/Hooks/ForwardingEmitterTest.php b/tests/lib/Hooks/ForwardingEmitterTest.php
index ea8ee5c412..9b0a51d1bd 100644
--- a/tests/lib/Hooks/ForwardingEmitterTest.php
+++ b/tests/lib/Hooks/ForwardingEmitterTest.php
@@ -10,7 +10,7 @@ namespace Test\Hooks;
use OC\Hooks\PublicEmitter;
class DummyForwardingEmitter extends \OC\Hooks\ForwardingEmitter {
- public function emitEvent($scope, $method, $arguments = array()) {
+ public function emitEvent($scope, $method, $arguments = []) {
$this->emit($scope, $method, $arguments);
}
diff --git a/tests/lib/Hooks/LegacyEmitterTest.php b/tests/lib/Hooks/LegacyEmitterTest.php
index 32c923d801..3b9eb26ec5 100644
--- a/tests/lib/Hooks/LegacyEmitterTest.php
+++ b/tests/lib/Hooks/LegacyEmitterTest.php
@@ -16,7 +16,7 @@ namespace Test\Hooks;
* @package Test\Hooks
*/
class DummyLegacyEmitter extends \OC\Hooks\LegacyEmitter {
- public function emitEvent($scope, $method, $arguments = array()) {
+ public function emitEvent($scope, $method, $arguments = []) {
$this->emit($scope, $method, $arguments);
}
}
@@ -51,7 +51,7 @@ class LegacyEmitterTest extends BasicEmitterTest {
public function testLegacyArguments() {
\OC_Hook::connect('Test', 'test', '\Test\Hooks\LegacyEmitterTest', 'staticLegacyArgumentsCallBack');
- $this->emitter->emitEvent('Test', 'test', array('foo' => 'foo', 'bar' => 'bar'));
+ $this->emitter->emitEvent('Test', 'test', ['foo' => 'foo', 'bar' => 'bar']);
$this->assertEquals(true, self::$emitted);
}
}
diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php
index 34fcf0e004..3858945d19 100644
--- a/tests/lib/ImageTest.php
+++ b/tests/lib/ImageTest.php
@@ -345,11 +345,11 @@ class ImageTest extends \Test\TestCase {
}
function convertDataProvider() {
- return array(
- array( 'image/gif'),
- array( 'image/jpeg'),
- array( 'image/png'),
- );
+ return [
+ [ 'image/gif'],
+ [ 'image/jpeg'],
+ [ 'image/png'],
+ ];
}
/**
diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php
index 22b026eaae..7d99316f47 100644
--- a/tests/lib/IntegrityCheck/CheckerTest.php
+++ b/tests/lib/IntegrityCheck/CheckerTest.php
@@ -780,7 +780,7 @@ class CheckerTest extends TestCase {
->expects($this->once())
->method('getOnlyDefaultAliases')
->willReturn(
- array (
+ [
'_comment' => 'Array of mimetype aliases.',
'_comment2' => 'Any changes you make here will be overwritten on an update of Nextcloud.',
'_comment3' => 'Put any custom mappings in a new file mimetypealiases.json in the config/ folder of Nextcloud',
@@ -881,13 +881,13 @@ class CheckerTest extends TestCase {
'text/x-shellscript' => 'text/code',
'web' => 'text/code',
'application/internet-shortcut' => 'link',
- ));
+ ]);
$this->mimeTypeDetector
->expects($this->once())
->method('getAllAliases')
->willReturn(
- array (
+ [
'_comment' => 'Array of mimetype aliases.',
'_comment2' => 'Any changes you make here will be overwritten on an update of Nextcloud.',
'_comment3' => 'Put any custom mappings in a new file mimetypealiases.json in the config/ folder of Nextcloud',
@@ -989,7 +989,7 @@ class CheckerTest extends TestCase {
'text/x-shellscript' => 'text/code',
'web' => 'text/code',
'application/internet-shortcut' => 'link',
- ));
+ ]);
$this->environmentHelper
->expects($this->any())
diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php
index dd0fa000b7..b2e7d5ebfc 100644
--- a/tests/lib/L10N/L10nTest.php
+++ b/tests/lib/L10N/L10nTest.php
@@ -78,39 +78,39 @@ class L10nTest extends TestCase {
}
public function localizationData() {
- return array(
+ return [
// timestamp as string
- array('February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', '1234567890'),
- array('13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', '1234567890'),
- array('February 13, 2009', 'en', 'en_US', 'date', '1234567890'),
- array('13. Februar 2009', 'de', 'de_DE', 'date', '1234567890'),
- array('11:31:30 PM GMT+0', 'en', 'en_US', 'time', '1234567890'),
- array('23:31:30 GMT+0', 'de', 'de_DE', 'time', '1234567890'),
+ ['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', '1234567890'],
+ ['13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', '1234567890'],
+ ['February 13, 2009', 'en', 'en_US', 'date', '1234567890'],
+ ['13. Februar 2009', 'de', 'de_DE', 'date', '1234567890'],
+ ['11:31:30 PM GMT+0', 'en', 'en_US', 'time', '1234567890'],
+ ['23:31:30 GMT+0', 'de', 'de_DE', 'time', '1234567890'],
// timestamp as int
- array('February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', 1234567890),
- array('13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', 1234567890),
- array('February 13, 2009', 'en', 'en_US', 'date', 1234567890),
- array('13. Februar 2009', 'de', 'de_DE', 'date', 1234567890),
- array('11:31:30 PM GMT+0', 'en', 'en_US', 'time', 1234567890),
- array('23:31:30 GMT+0', 'de', 'de_DE', 'time', 1234567890),
+ ['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', 1234567890],
+ ['13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', 1234567890],
+ ['February 13, 2009', 'en', 'en_US', 'date', 1234567890],
+ ['13. Februar 2009', 'de', 'de_DE', 'date', 1234567890],
+ ['11:31:30 PM GMT+0', 'en', 'en_US', 'time', 1234567890],
+ ['23:31:30 GMT+0', 'de', 'de_DE', 'time', 1234567890],
// DateTime object
- array('February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', new DateTime('@1234567890')),
- array('13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', new DateTime('@1234567890')),
- array('February 13, 2009', 'en', 'en_US', 'date', new DateTime('@1234567890')),
- array('13. Februar 2009', 'de', 'de_DE', 'date', new DateTime('@1234567890')),
- array('11:31:30 PM GMT+0', 'en', 'en_US', 'time', new DateTime('@1234567890')),
- array('23:31:30 GMT+0', 'de', 'de_DE', 'time', new DateTime('@1234567890')),
+ ['February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', new DateTime('@1234567890')],
+ ['13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', new DateTime('@1234567890')],
+ ['February 13, 2009', 'en', 'en_US', 'date', new DateTime('@1234567890')],
+ ['13. Februar 2009', 'de', 'de_DE', 'date', new DateTime('@1234567890')],
+ ['11:31:30 PM GMT+0', 'en', 'en_US', 'time', new DateTime('@1234567890')],
+ ['23:31:30 GMT+0', 'de', 'de_DE', 'time', new DateTime('@1234567890')],
// en_GB
- array('13 February 2009 at 23:31:30 GMT+0', 'en_GB', 'en_GB', 'datetime', new DateTime('@1234567890')),
- array('13 February 2009', 'en_GB', 'en_GB', 'date', new DateTime('@1234567890')),
- array('23:31:30 GMT+0', 'en_GB', 'en_GB', 'time', new DateTime('@1234567890')),
- array('13 February 2009 at 23:31:30 GMT+0', 'en-GB', 'en_GB', 'datetime', new DateTime('@1234567890')),
- array('13 February 2009', 'en-GB', 'en_GB', 'date', new DateTime('@1234567890')),
- array('23:31:30 GMT+0', 'en-GB', 'en_GB', 'time', new DateTime('@1234567890')),
- );
+ ['13 February 2009 at 23:31:30 GMT+0', 'en_GB', 'en_GB', 'datetime', new DateTime('@1234567890')],
+ ['13 February 2009', 'en_GB', 'en_GB', 'date', new DateTime('@1234567890')],
+ ['23:31:30 GMT+0', 'en_GB', 'en_GB', 'time', new DateTime('@1234567890')],
+ ['13 February 2009 at 23:31:30 GMT+0', 'en-GB', 'en_GB', 'datetime', new DateTime('@1234567890')],
+ ['13 February 2009', 'en-GB', 'en_GB', 'date', new DateTime('@1234567890')],
+ ['23:31:30 GMT+0', 'en-GB', 'en_GB', 'time', new DateTime('@1234567890')],
+ ];
}
/**
@@ -122,10 +122,10 @@ class L10nTest extends TestCase {
}
public function firstDayData() {
- return array(
- array(1, 'de', 'de_DE'),
- array(0, 'en', 'en_US'),
- );
+ return [
+ [1, 'de', 'de_DE'],
+ [0, 'en', 'en_US'],
+ ];
}
/**
@@ -140,10 +140,10 @@ class L10nTest extends TestCase {
}
public function jsDateData() {
- return array(
- array('dd.MM.yy', 'de', 'de_DE'),
- array('M/d/yy', 'en', 'en_US'),
- );
+ return [
+ ['dd.MM.yy', 'de', 'de_DE'],
+ ['M/d/yy', 'en', 'en_US'],
+ ];
}
/**
diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php
index e023819a08..f6e85ea188 100644
--- a/tests/lib/LegacyHelperTest.php
+++ b/tests/lib/LegacyHelperTest.php
@@ -35,15 +35,15 @@ class LegacyHelperTest extends \Test\TestCase {
public function humanFileSizeProvider()
{
- return array(
- array('0 B', 0),
- array('1 KB', 1024),
- array('9.5 MB', 10000000),
- array('1.3 GB', 1395864371),
- array('465.7 GB', 500000000000),
- array('454.7 TB', 500000000000000),
- array('444.1 PB', 500000000000000000),
- );
+ return [
+ ['0 B', 0],
+ ['1 KB', 1024],
+ ['9.5 MB', 10000000],
+ ['1.3 GB', 1395864371],
+ ['465.7 GB', 500000000000],
+ ['454.7 TB', 500000000000000],
+ ['444.1 PB', 500000000000000000],
+ ];
}
/**
@@ -66,36 +66,36 @@ class LegacyHelperTest extends \Test\TestCase {
}
function testMb_array_change_key_case() {
- $arrayStart = array(
+ $arrayStart = [
"Foo" => "bar",
"Bar" => "foo",
- );
- $arrayResult = array(
+ ];
+ $arrayResult = [
"foo" => "bar",
"bar" => "foo",
- );
+ ];
$result = OC_Helper::mb_array_change_key_case($arrayStart);
$expected = $arrayResult;
$this->assertEquals($result, $expected);
- $arrayStart = array(
+ $arrayStart = [
"foo" => "bar",
"bar" => "foo",
- );
- $arrayResult = array(
+ ];
+ $arrayResult = [
"FOO" => "bar",
"BAR" => "foo",
- );
+ ];
$result = OC_Helper::mb_array_change_key_case($arrayStart, MB_CASE_UPPER);
$expected = $arrayResult;
$this->assertEquals($result, $expected);
}
function testRecursiveArraySearch() {
- $haystack = array(
+ $haystack = [
"Foo" => "own",
"Bar" => "Cloud",
- );
+ ];
$result = OC_Helper::recursiveArraySearch($haystack, "own");
$expected = "Foo";
@@ -192,12 +192,12 @@ class LegacyHelperTest extends \Test\TestCase {
function streamCopyDataProvider() {
- return array(
- array(0, false, false, false),
- array(0, false, \OC::$SERVERROOT . '/tests/data/lorem.txt', false),
- array(filesize(\OC::$SERVERROOT . '/tests/data/lorem.txt'), true, \OC::$SERVERROOT . '/tests/data/lorem.txt', \OC::$SERVERROOT . '/tests/data/lorem-copy.txt'),
- array(3670, true, \OC::$SERVERROOT . '/tests/data/testimage.png', \OC::$SERVERROOT . '/tests/data/testimage-copy.png'),
- );
+ return [
+ [0, false, false, false],
+ [0, false, \OC::$SERVERROOT . '/tests/data/lorem.txt', false],
+ [filesize(\OC::$SERVERROOT . '/tests/data/lorem.txt'), true, \OC::$SERVERROOT . '/tests/data/lorem.txt', \OC::$SERVERROOT . '/tests/data/lorem-copy.txt'],
+ [3670, true, \OC::$SERVERROOT . '/tests/data/testimage.png', \OC::$SERVERROOT . '/tests/data/testimage-copy.png'],
+ ];
}
/**
@@ -234,7 +234,7 @@ class LegacyHelperTest extends \Test\TestCase {
* @return mixed
* @deprecated Please extend \Test\TestCase and use self::invokePrivate() then
*/
- public static function invokePrivate($object, $methodName, array $parameters = array()) {
+ public static function invokePrivate($object, $methodName, array $parameters = []) {
return parent::invokePrivate($object, $methodName, $parameters);
}
}
diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php
index fa4e481ac4..fd695c8c68 100644
--- a/tests/lib/LoggerTest.php
+++ b/tests/lib/LoggerTest.php
@@ -37,9 +37,9 @@ class LoggerTest extends TestCase implements IWriter {
public function testInterpolation() {
$logger = $this->logger;
- $logger->warning('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar'));
+ $logger->warning('{Message {nothing} {user} {foo.bar} a}', ['user' => 'Bob', 'foo.bar' => 'Bar']);
- $expected = array('2 {Message {nothing} Bob Bar a}');
+ $expected = ['2 {Message {nothing} Bob Bar a}'];
$this->assertEquals($expected, $this->getLogs());
}
diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php
index 19ab04fd52..173d9414cd 100644
--- a/tests/lib/Mail/MessageTest.php
+++ b/tests/lib/Mail/MessageTest.php
@@ -23,22 +23,22 @@ class MessageTest extends TestCase {
* @return array
*/
public function mailAddressProvider() {
- return array(
- array(array('lukas@owncloud.com' => 'Lukas Reschke'), array('lukas@owncloud.com' => 'Lukas Reschke')),
- array(array('lukas@owncloud.com' => 'Lukas Reschke', 'lukas@öwnclöüd.com', 'lukäs@owncloud.örg' => 'Lükäs Réschke'),
- array('lukas@owncloud.com' => 'Lukas Reschke', 'lukas@xn--wncld-iuae2c.com', 'lukäs@owncloud.xn--rg-eka' => 'Lükäs Réschke')),
- array(array('lukas@öwnclöüd.com'), array('lukas@xn--wncld-iuae2c.com')),
- );
+ return [
+ [['lukas@owncloud.com' => 'Lukas Reschke'], ['lukas@owncloud.com' => 'Lukas Reschke']],
+ [['lukas@owncloud.com' => 'Lukas Reschke', 'lukas@öwnclöüd.com', 'lukäs@owncloud.örg' => 'Lükäs Réschke'],
+ ['lukas@owncloud.com' => 'Lukas Reschke', 'lukas@xn--wncld-iuae2c.com', 'lukäs@owncloud.xn--rg-eka' => 'Lükäs Réschke']],
+ [['lukas@öwnclöüd.com'], ['lukas@xn--wncld-iuae2c.com']],
+ ];
}
/**
* @return array
*/
public function getMailAddressProvider() {
- return array(
- array(null, array()),
- array(array('lukas@owncloud.com' => 'Lukas Reschke'), array('lukas@owncloud.com' => 'Lukas Reschke')),
- );
+ return [
+ [null, []],
+ [['lukas@owncloud.com' => 'Lukas Reschke'], ['lukas@owncloud.com' => 'Lukas Reschke']],
+ ];
}
protected function setUp(): void {
@@ -58,15 +58,15 @@ class MessageTest extends TestCase {
* @param string $expected
*/
public function testConvertAddresses($unconverted, $expected) {
- $this->assertSame($expected, self::invokePrivate($this->message, 'convertAddresses', array($unconverted)));
+ $this->assertSame($expected, self::invokePrivate($this->message, 'convertAddresses', [$unconverted]));
}
public function testSetFrom() {
$this->swiftMessage
->expects($this->once())
->method('setFrom')
- ->with(array('lukas@owncloud.com'));
- $this->message->setFrom(array('lukas@owncloud.com'));
+ ->with(['lukas@owncloud.com']);
+ $this->message->setFrom(['lukas@owncloud.com']);
}
@@ -106,8 +106,8 @@ class MessageTest extends TestCase {
$this->swiftMessage
->expects($this->once())
->method('setTo')
- ->with(array('lukas@owncloud.com'));
- $this->message->setTo(array('lukas@owncloud.com'));
+ ->with(['lukas@owncloud.com']);
+ $this->message->setTo(['lukas@owncloud.com']);
}
/**
@@ -126,8 +126,8 @@ class MessageTest extends TestCase {
$this->swiftMessage
->expects($this->once())
->method('setCc')
- ->with(array('lukas@owncloud.com'));
- $this->message->setCc(array('lukas@owncloud.com'));
+ ->with(['lukas@owncloud.com']);
+ $this->message->setCc(['lukas@owncloud.com']);
}
/**
@@ -146,8 +146,8 @@ class MessageTest extends TestCase {
$this->swiftMessage
->expects($this->once())
->method('setBcc')
- ->with(array('lukas@owncloud.com'));
- $this->message->setBcc(array('lukas@owncloud.com'));
+ ->with(['lukas@owncloud.com']);
+ $this->message->setBcc(['lukas@owncloud.com']);
}
/**
diff --git a/tests/lib/NaturalSortTest.php b/tests/lib/NaturalSortTest.php
index 50c2d0be9f..1408a64dad 100644
--- a/tests/lib/NaturalSortTest.php
+++ b/tests/lib/NaturalSortTest.php
@@ -20,7 +20,7 @@ class NaturalSortTest extends \Test\TestCase {
return;
}
$comparator = \OC\NaturalSort::getInstance();
- usort($array, array($comparator, 'compare'));
+ usort($array, [$comparator, 'compare']);
$this->assertEquals($sorted, $array);
}
@@ -30,7 +30,7 @@ class NaturalSortTest extends \Test\TestCase {
public function testDefaultCollatorCompare($array, $sorted)
{
$comparator = new \OC\NaturalSort(new \OC\NaturalSort_DefaultCollator());
- usort($array, array($comparator, 'compare'));
+ usort($array, [$comparator, 'compare']);
$this->assertEquals($sorted, $array);
}
@@ -41,28 +41,28 @@ class NaturalSortTest extends \Test\TestCase {
*/
public function naturalSortDataProvider()
{
- return array(
+ return [
// different casing
- array(
+ [
// unsorted
- array(
+ [
'aaa',
'bbb',
'BBB',
'AAA'
- ),
+ ],
// sorted
- array(
+ [
'aaa',
'AAA',
'bbb',
'BBB'
- )
- ),
+ ]
+ ],
// numbers
- array(
+ [
// unsorted
- array(
+ [
'124.txt',
'abc1',
'123.txt',
@@ -85,9 +85,9 @@ class NaturalSortTest extends \Test\TestCase {
'zz',
'15.txt',
'15b.txt',
- ),
+ ],
// sorted
- array(
+ [
'15.txt',
'15b.txt',
'123.txt',
@@ -110,12 +110,12 @@ class NaturalSortTest extends \Test\TestCase {
'z',
'za',
'zz',
- )
- ),
+ ]
+ ],
// chinese characters
- array(
+ [
// unsorted
- array(
+ [
'十.txt',
'一.txt',
'二.txt',
@@ -134,9 +134,9 @@ class NaturalSortTest extends \Test\TestCase {
'莫.txt',
'啊.txt',
'123.txt',
- ),
+ ],
// sorted
- array(
+ [
'123.txt',
'abc.txt',
'一.txt',
@@ -155,12 +155,12 @@ class NaturalSortTest extends \Test\TestCase {
'波.txt',
'破.txt',
'莫.txt',
- )
- ),
+ ]
+ ],
// with umlauts
- array(
+ [
// unsorted
- array(
+ [
'öh.txt',
'Äh.txt',
'oh.txt',
@@ -171,9 +171,9 @@ class NaturalSortTest extends \Test\TestCase {
'uh.txt',
'üh.txt',
'äh.txt',
- ),
+ ],
// sorted
- array(
+ [
'ah.txt',
'äh.txt',
'Äh.txt',
@@ -184,9 +184,9 @@ class NaturalSortTest extends \Test\TestCase {
'üh.txt',
'Üh.txt',
'Üh 2.txt',
- )
- ),
- );
+ ]
+ ],
+ ];
}
/**
@@ -196,28 +196,28 @@ class NaturalSortTest extends \Test\TestCase {
*/
public function defaultCollatorDataProvider()
{
- return array(
+ return [
// different casing
- array(
+ [
// unsorted
- array(
+ [
'aaa',
'bbb',
'BBB',
'AAA'
- ),
+ ],
// sorted
- array(
+ [
'aaa',
'AAA',
'bbb',
'BBB'
- )
- ),
+ ]
+ ],
// numbers
- array(
+ [
// unsorted
- array(
+ [
'124.txt',
'abc1',
'123.txt',
@@ -240,9 +240,9 @@ class NaturalSortTest extends \Test\TestCase {
'zz',
'15.txt',
'15b.txt',
- ),
+ ],
// sorted
- array(
+ [
'15.txt',
'15b.txt',
'123.txt',
@@ -265,8 +265,8 @@ class NaturalSortTest extends \Test\TestCase {
'z',
'za',
'zz',
- )
- ),
- );
+ ]
+ ],
+ ];
}
}
diff --git a/tests/lib/Repair/RepairSqliteAutoincrementTest.php b/tests/lib/Repair/RepairSqliteAutoincrementTest.php
index c7008179a0..66b30ca033 100644
--- a/tests/lib/Repair/RepairSqliteAutoincrementTest.php
+++ b/tests/lib/Repair/RepairSqliteAutoincrementTest.php
@@ -65,7 +65,7 @@ class RepairSqliteAutoincrementTest extends \Test\TestCase {
protected function checkAutoincrement() {
$this->connection->executeUpdate('INSERT INTO ' . $this->tableName . ' ("text") VALUES ("test")');
$insertId = $this->connection->lastInsertId();
- $this->connection->executeUpdate('DELETE FROM ' . $this->tableName . ' WHERE "someid" = ?', array($insertId));
+ $this->connection->executeUpdate('DELETE FROM ' . $this->tableName . ' WHERE "someid" = ?', [$insertId]);
// insert again
$this->connection->executeUpdate('INSERT INTO ' . $this->tableName . ' ("text") VALUES ("test2")');
diff --git a/tests/lib/RepairStepTest.php b/tests/lib/RepairStepTest.php
index bc1671d917..00506e5dba 100644
--- a/tests/lib/RepairStepTest.php
+++ b/tests/lib/RepairStepTest.php
@@ -64,10 +64,10 @@ class RepairTest extends TestCase {
$this->repair->run();
$this->assertEquals(
- array(
+ [
'step: Test Name',
'info: Simulated info',
- ),
+ ],
$this->outputArray
);
}
@@ -78,10 +78,10 @@ class RepairTest extends TestCase {
$this->repair->run();
$this->assertEquals(
- array(
+ [
'step: Test Name',
'warning: Simulated warning',
- ),
+ ],
$this->outputArray
);
}
@@ -109,9 +109,9 @@ class RepairTest extends TestCase {
$this->assertTrue($thrown);
// jump out after exception
$this->assertEquals(
- array(
+ [
'step: Exception Test',
- ),
+ ],
$this->outputArray
);
}
@@ -122,12 +122,12 @@ class RepairTest extends TestCase {
$this->repair->run();
$this->assertEquals(
- array(
+ [
'step: Test Name',
'warning: Simulated warning',
'step: Test Name',
'info: Simulated info',
- ),
+ ],
$this->outputArray
);
}
diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php
index 136c316041..f7196373c0 100644
--- a/tests/lib/Security/CertificateManagerTest.php
+++ b/tests/lib/Security/CertificateManagerTest.php
@@ -79,11 +79,11 @@ class CertificateManagerTest extends \Test\TestCase {
function testListCertificates() {
// Test empty certificate bundle
- $this->assertSame(array(), $this->certificateManager->listCertificates());
+ $this->assertSame([], $this->certificateManager->listCertificates());
// Add some certificates
$this->certificateManager->addCertificate(file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
- $certificateStore = array();
+ $certificateStore = [];
$certificateStore[] = new \OC\Security\Certificate(file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
$this->assertEqualsArrays($certificateStore, $this->certificateManager->listCertificates());
diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php
index a2c8055750..5e079c8018 100644
--- a/tests/lib/Security/CryptoTest.php
+++ b/tests/lib/Security/CryptoTest.php
@@ -14,11 +14,11 @@ class CryptoTest extends \Test\TestCase {
public function defaultEncryptionProvider()
{
- return array(
- array('Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.'),
- array(''),
- array('我看这本书。 我看這本書')
- );
+ return [
+ ['Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.'],
+ [''],
+ ['我看这本书。 我看這本書']
+ ];
}
/** @var Crypto */
diff --git a/tests/lib/Security/SecureRandomTest.php b/tests/lib/Security/SecureRandomTest.php
index 71839115a3..6898c1d8b0 100644
--- a/tests/lib/Security/SecureRandomTest.php
+++ b/tests/lib/Security/SecureRandomTest.php
@@ -13,23 +13,23 @@ use OC\Security\SecureRandom;
class SecureRandomTest extends \Test\TestCase {
public function stringGenerationProvider() {
- return array(
- array(0, 0),
- array(1, 1),
- array(128, 128),
- array(256, 256),
- array(1024, 1024),
- array(2048, 2048),
- array(64000, 64000),
- );
+ return [
+ [0, 0],
+ [1, 1],
+ [128, 128],
+ [256, 256],
+ [1024, 1024],
+ [2048, 2048],
+ [64000, 64000],
+ ];
}
public static function charCombinations() {
- return array(
- array('CHAR_LOWER', '[a-z]'),
- array('CHAR_UPPER', '[A-Z]'),
- array('CHAR_DIGITS', '[0-9]'),
- );
+ return [
+ ['CHAR_LOWER', '[a-z]'],
+ ['CHAR_UPPER', '[A-Z]'],
+ ['CHAR_DIGITS', '[0-9]'],
+ ];
}
/** @var SecureRandom */
diff --git a/tests/lib/Share/Backend.php b/tests/lib/Share/Backend.php
index 13a86bfae3..1a443229df 100644
--- a/tests/lib/Share/Backend.php
+++ b/tests/lib/Share/Backend.php
@@ -49,7 +49,7 @@ class Backend implements \OCP\Share_Backend {
$shares = \OC\Share\Share::getItemsSharedWithUser('test', $shareWith);
- $knownTargets = array();
+ $knownTargets = [];
foreach ($shares as $share) {
$knownTargets[] = $share['item_target'];
}
@@ -73,7 +73,7 @@ class Backend implements \OCP\Share_Backend {
}
public function formatItems($items, $format, $parameters = null) {
- $testItems = array();
+ $testItems = [];
foreach ($items as $item) {
if ($format === self::FORMAT_SOURCE) {
$testItems[] = $item['item_source'];
diff --git a/tests/lib/Share/HelperTest.php b/tests/lib/Share/HelperTest.php
index dc2d26509e..2056e6bd1e 100644
--- a/tests/lib/Share/HelperTest.php
+++ b/tests/lib/Share/HelperTest.php
@@ -28,24 +28,24 @@ namespace Test\Share;
class HelperTest extends \Test\TestCase {
public function expireDateProvider() {
- return array(
+ return [
// no default expire date, we take the users expire date
- array(array('defaultExpireDateSet' => false), 2000000000, 2000010000, 2000010000),
+ [['defaultExpireDateSet' => false], 2000000000, 2000010000, 2000010000],
// no default expire date and no user defined expire date, return false
- array(array('defaultExpireDateSet' => false), 2000000000, null, false),
+ [['defaultExpireDateSet' => false], 2000000000, null, false],
// unenforced expire data and no user defined expire date, return false (because the default is not enforced)
- array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false), 2000000000, null, false),
+ [['defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false], 2000000000, null, false],
// enforced expire date and no user defined expire date, take default expire date
- array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true), 2000000000, null, 2000086400),
+ [['defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true], 2000000000, null, 2000086400],
// unenforced expire date and user defined date > default expire date, take users expire date
- array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false), 2000000000, 2000100000, 2000100000),
+ [['defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false], 2000000000, 2000100000, 2000100000],
// unenforced expire date and user expire date < default expire date, take users expire date
- array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false), 2000000000, 2000010000, 2000010000),
+ [['defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => false], 2000000000, 2000010000, 2000010000],
// enforced expire date and user expire date < default expire date, take users expire date
- array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true), 2000000000, 2000010000, 2000010000),
+ [['defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true], 2000000000, 2000010000, 2000010000],
// enforced expire date and users expire date > default expire date, take default expire date
- array(array('defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true), 2000000000, 2000100000, 2000086400),
- );
+ [['defaultExpireDateSet' => true, 'expireAfterDays' => 1, 'enforceExpireDate' => true], 2000000000, 2000100000, 2000086400],
+ ];
}
/**
@@ -101,21 +101,21 @@ class HelperTest extends \Test\TestCase {
}
public function dataTestSplitUserRemoteError() {
- return array(
+ return [
// Invalid path
- array('user@'),
+ ['user@'],
// Invalid user
- array('@server'),
- array('us/er@server'),
- array('us:er@server'),
+ ['@server'],
+ ['us/er@server'],
+ ['us:er@server'],
// Invalid splitting
- array('user'),
- array(''),
- array('us/erserver'),
- array('us:erserver'),
- );
+ ['user'],
+ [''],
+ ['us/erserver'],
+ ['us:erserver'],
+ ];
}
/**
diff --git a/tests/lib/Share/SearchResultSorterTest.php b/tests/lib/Share/SearchResultSorterTest.php
index 7feccdd82f..1786943642 100644
--- a/tests/lib/Share/SearchResultSorterTest.php
+++ b/tests/lib/Share/SearchResultSorterTest.php
@@ -26,14 +26,14 @@ class SearchResultSorterTest extends \Test\TestCase {
$search = 'lin';
$sorter = new \OC\Share\SearchResultSorter($search, 'foobar');
- $result = array(
- array('foobar' => 'woot'),
- array('foobar' => 'linux'),
- array('foobar' => 'Linus'),
- array('foobar' => 'Bicyclerepairwoman'),
- );
+ $result = [
+ ['foobar' => 'woot'],
+ ['foobar' => 'linux'],
+ ['foobar' => 'Linus'],
+ ['foobar' => 'Bicyclerepairwoman'],
+ ];
- usort($result, array($sorter, 'sort'));
+ usort($result, [$sorter, 'sort']);
$this->assertTrue($result[0]['foobar'] === 'Linus');
$this->assertTrue($result[1]['foobar'] === 'linux');
$this->assertTrue($result[2]['foobar'] === 'Bicyclerepairwoman');
diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php
index af05d0c4bd..9b20744edb 100644
--- a/tests/lib/Share/ShareTest.php
+++ b/tests/lib/Share/ShareTest.php
@@ -115,7 +115,7 @@ class ShareTest extends \Test\TestCase {
protected function tearDown(): void {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `item_type` = ?');
- $query->execute(array('test'));
+ $query->execute(['test']);
\OC::$server->getConfig()->setAppValue('core', 'shareapi_allow_resharing', $this->resharing);
$this->user1->delete();
@@ -141,37 +141,37 @@ class ShareTest extends \Test\TestCase {
$query = \OC_DB::prepare('INSERT INTO `*PREFIX*share` ('
.' `item_type`, `item_source`, `item_target`, `share_type`,'
.' `share_with`, `uid_owner`) VALUES (?,?,?,?,?,?)');
- $args = array('test', 99, 'target1', \OCP\Share::SHARE_TYPE_USER, $this->user2->getUID(), $this->user1->getUID());
+ $args = ['test', 99, 'target1', \OCP\Share::SHARE_TYPE_USER, $this->user2->getUID(), $this->user1->getUID()];
$query->execute($args);
- $args = array('test', 99, 'target2', \OCP\Share::SHARE_TYPE_USER, $this->user4->getUID(), $this->user1->getUID());
+ $args = ['test', 99, 'target2', \OCP\Share::SHARE_TYPE_USER, $this->user4->getUID(), $this->user1->getUID()];
$query->execute($args);
- $args = array('test', 99, 'target3', \OCP\Share::SHARE_TYPE_USER, $this->user3->getUID(), $this->user2->getUID());
+ $args = ['test', 99, 'target3', \OCP\Share::SHARE_TYPE_USER, $this->user3->getUID(), $this->user2->getUID()];
$query->execute($args);
- $args = array('test', 99, 'target4', \OCP\Share::SHARE_TYPE_USER, $this->user3->getUID(), $this->user4->getUID());
+ $args = ['test', 99, 'target4', \OCP\Share::SHARE_TYPE_USER, $this->user3->getUID(), $this->user4->getUID()];
$query->execute($args);
- $args = array('test', 99, 'target4', \OCP\Share::SHARE_TYPE_USER, $this->user6->getUID(), $this->user4->getUID());
+ $args = ['test', 99, 'target4', \OCP\Share::SHARE_TYPE_USER, $this->user6->getUID(), $this->user4->getUID()];
$query->execute($args);
$result1 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user2->getUID(), $this->user1->getUID());
$this->assertSame(1, count($result1));
- $this->verifyResult($result1, array('target1'));
+ $this->verifyResult($result1, ['target1']);
$result2 = \OCP\Share::getItemSharedWithUser('test', 99, null, $this->user1->getUID());
$this->assertSame(2, count($result2));
- $this->verifyResult($result2, array('target1', 'target2'));
+ $this->verifyResult($result2, ['target1', 'target2']);
$result3 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user3->getUID());
$this->assertSame(2, count($result3));
- $this->verifyResult($result3, array('target3', 'target4'));
+ $this->verifyResult($result3, ['target3', 'target4']);
$result4 = \OCP\Share::getItemSharedWithUser('test', 99, null, null);
$this->assertSame(5, count($result4)); // 5 because target4 appears twice
- $this->verifyResult($result4, array('target1', 'target2', 'target3', 'target4'));
+ $this->verifyResult($result4, ['target1', 'target2', 'target3', 'target4']);
$result6 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user6->getUID(), null);
$this->assertSame(1, count($result6));
- $this->verifyResult($result6, array('target4'));
+ $this->verifyResult($result6, ['target4']);
}
public function testGetItemSharedWithUserFromGroupShare() {
@@ -181,32 +181,32 @@ class ShareTest extends \Test\TestCase {
$query = \OC_DB::prepare('INSERT INTO `*PREFIX*share` ('
.' `item_type`, `item_source`, `item_target`, `share_type`,'
.' `share_with`, `uid_owner`) VALUES (?,?,?,?,?,?)');
- $args = array('test', 99, 'target1', \OCP\Share::SHARE_TYPE_GROUP, $this->group1->getGID(), $this->user1->getUID());
+ $args = ['test', 99, 'target1', \OCP\Share::SHARE_TYPE_GROUP, $this->group1->getGID(), $this->user1->getUID()];
$query->execute($args);
- $args = array('test', 99, 'target2', \OCP\Share::SHARE_TYPE_GROUP, $this->group2->getGID(), $this->user1->getUID());
+ $args = ['test', 99, 'target2', \OCP\Share::SHARE_TYPE_GROUP, $this->group2->getGID(), $this->user1->getUID()];
$query->execute($args);
- $args = array('test', 99, 'target3', \OCP\Share::SHARE_TYPE_GROUP, $this->group1->getGID(), $this->user2->getUID());
+ $args = ['test', 99, 'target3', \OCP\Share::SHARE_TYPE_GROUP, $this->group1->getGID(), $this->user2->getUID()];
$query->execute($args);
- $args = array('test', 99, 'target4', \OCP\Share::SHARE_TYPE_GROUP, $this->group1->getGID(), $this->user4->getUID());
+ $args = ['test', 99, 'target4', \OCP\Share::SHARE_TYPE_GROUP, $this->group1->getGID(), $this->user4->getUID()];
$query->execute($args);
// user2 is in group1 and group2
$result1 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user2->getUID(), $this->user1->getUID());
$this->assertSame(2, count($result1));
- $this->verifyResult($result1, array('target1', 'target2'));
+ $this->verifyResult($result1, ['target1', 'target2']);
$result2 = \OCP\Share::getItemSharedWithUser('test', 99, null, $this->user1->getUID());
$this->assertSame(2, count($result2));
- $this->verifyResult($result2, array('target1', 'target2'));
+ $this->verifyResult($result2, ['target1', 'target2']);
// user3 is in group1 and group2
$result3 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user3->getUID());
$this->assertSame(3, count($result3));
- $this->verifyResult($result3, array('target1', 'target3', 'target4'));
+ $this->verifyResult($result3, ['target1', 'target3', 'target4']);
$result4 = \OCP\Share::getItemSharedWithUser('test', 99, null, null);
$this->assertSame(4, count($result4));
- $this->verifyResult($result4, array('target1', 'target2', 'target3', 'target4'));
+ $this->verifyResult($result4, ['target1', 'target2', 'target3', 'target4']);
$result6 = \OCP\Share::getItemSharedWithUser('test', 99, $this->user6->getUID(), null);
$this->assertSame(0, count($result6));
@@ -229,16 +229,16 @@ class ShareTest extends \Test\TestCase {
*/
function testRemoveProtocolFromUrl($url, $expectedResult) {
$share = new \OC\Share\Share();
- $result = self::invokePrivate($share, 'removeProtocolFromUrl', array($url));
+ $result = self::invokePrivate($share, 'removeProtocolFromUrl', [$url]);
$this->assertSame($expectedResult, $result);
}
function urls() {
- return array(
- array('http://owncloud.org', 'owncloud.org'),
- array('https://owncloud.org', 'owncloud.org'),
- array('owncloud.org', 'owncloud.org'),
- );
+ return [
+ ['http://owncloud.org', 'owncloud.org'],
+ ['https://owncloud.org', 'owncloud.org'],
+ ['owncloud.org', 'owncloud.org'],
+ ];
}
/**
@@ -265,57 +265,57 @@ class ShareTest extends \Test\TestCase {
}
function dataProviderTestGroupItems() {
- return array(
+ return [
// one array with one share
- array(
- array( // input
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_ALL, 'item_target' => 't1')),
- array( // expected result
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_ALL, 'item_target' => 't1'))),
+ [
+ [ // input
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_ALL, 'item_target' => 't1']],
+ [ // expected result
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_ALL, 'item_target' => 't1']]],
// two shares both point to the same source
- array(
- array( // input
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'),
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'),
- ),
- array( // expected result
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1',
- 'grouped' => array(
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'),
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'),
- )
- ),
- )
- ),
+ [
+ [ // input
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'],
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'],
+ ],
+ [ // expected result
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1',
+ 'grouped' => [
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'],
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'],
+ ]
+ ],
+ ]
+ ],
// two shares both point to the same source but with different targets
- array(
- array( // input
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'),
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'),
- ),
- array( // expected result
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'),
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'),
- )
- ),
+ [
+ [ // input
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'],
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'],
+ ],
+ [ // expected result
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'],
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't2'],
+ ]
+ ],
// three shares two point to the same source
- array(
- array( // input
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'),
- array('item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'),
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'),
- ),
- array( // expected result
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1',
- 'grouped' => array(
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'),
- array('item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'),
- )
- ),
- array('item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'),
- )
- ),
- );
+ [
+ [ // input
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'],
+ ['item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'],
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'],
+ ],
+ [ // expected result
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1',
+ 'grouped' => [
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_READ, 'item_target' => 't1'],
+ ['item_source' => 1, 'permissions' => \OCP\Constants::PERMISSION_UPDATE, 'item_target' => 't1'],
+ ]
+ ],
+ ['item_source' => 2, 'permissions' => \OCP\Constants::PERMISSION_CREATE, 'item_target' => 't2'],
+ ]
+ ],
+ ];
}
}
diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php
index ad41c928de..463ec5809d 100644
--- a/tests/lib/TagsTest.php
+++ b/tests/lib/TagsTest.php
@@ -84,7 +84,7 @@ class TagsTest extends \Test\TestCase {
}
public function testInstantiateWithDefaults() {
- $defaultTags = array('Friends', 'Family', 'Work', 'Other');
+ $defaultTags = ['Friends', 'Family', 'Work', 'Other'];
$tagger = $this->tagMgr->load($this->objectType, $defaultTags);
@@ -92,7 +92,7 @@ class TagsTest extends \Test\TestCase {
}
public function testAddTags() {
- $tags = array('Friends', 'Family', 'Work', 'Other');
+ $tags = ['Friends', 'Family', 'Work', 'Other'];
$tagger = $this->tagMgr->load($this->objectType);
@@ -109,7 +109,7 @@ class TagsTest extends \Test\TestCase {
}
public function testAddMultiple() {
- $tags = array('Friends', 'Family', 'Work', 'Other');
+ $tags = ['Friends', 'Family', 'Work', 'Other'];
$tagger = $this->tagMgr->load($this->objectType);
@@ -169,37 +169,37 @@ class TagsTest extends \Test\TestCase {
}
public function testGetTagsForObjects() {
- $defaultTags = array('Friends', 'Family', 'Work', 'Other');
+ $defaultTags = ['Friends', 'Family', 'Work', 'Other'];
$tagger = $this->tagMgr->load($this->objectType, $defaultTags);
$tagger->tagAs(1, 'Friends');
$tagger->tagAs(1, 'Other');
$tagger->tagAs(2, 'Family');
- $tags = $tagger->getTagsForObjects(array(1));
+ $tags = $tagger->getTagsForObjects([1]);
$this->assertEquals(1, count($tags));
$tags = current($tags);
sort($tags);
- $this->assertSame(array('Friends', 'Other'), $tags);
+ $this->assertSame(['Friends', 'Other'], $tags);
- $tags = $tagger->getTagsForObjects(array(1, 2));
+ $tags = $tagger->getTagsForObjects([1, 2]);
$this->assertEquals(2, count($tags));
$tags1 = $tags[1];
sort($tags1);
- $this->assertSame(array('Friends', 'Other'), $tags1);
- $this->assertSame(array('Family'), $tags[2]);
+ $this->assertSame(['Friends', 'Other'], $tags1);
+ $this->assertSame(['Family'], $tags[2]);
$this->assertEquals(
- array(),
- $tagger->getTagsForObjects(array(4))
+ [],
+ $tagger->getTagsForObjects([4])
);
$this->assertEquals(
- array(),
- $tagger->getTagsForObjects(array(4, 5))
+ [],
+ $tagger->getTagsForObjects([4, 5])
);
}
public function testGetTagsForObjectsMassiveResults() {
- $defaultTags = array('tag1');
+ $defaultTags = ['tag1'];
$tagger = $this->tagMgr->load($this->objectType, $defaultTags);
$tagData = $tagger->getTags();
$tagId = $tagData[0]['id'];
@@ -213,9 +213,9 @@ class TagsTest extends \Test\TestCase {
);
// insert lots of entries
- $idsArray = array();
+ $idsArray = [];
for($i = 1; $i <= 1500; $i++) {
- $statement->execute(array($i, $tagId, $tagType));
+ $statement->execute([$i, $tagId, $tagType]);
$idsArray[] = $i;
}
@@ -224,7 +224,7 @@ class TagsTest extends \Test\TestCase {
}
public function testDeleteTags() {
- $defaultTags = array('Friends', 'Family', 'Work', 'Other');
+ $defaultTags = ['Friends', 'Family', 'Work', 'Other'];
$tagger = $this->tagMgr->load($this->objectType, $defaultTags);
$this->assertEquals(4, count($tagger->getTags()));
@@ -232,12 +232,12 @@ class TagsTest extends \Test\TestCase {
$tagger->delete('family');
$this->assertEquals(3, count($tagger->getTags()));
- $tagger->delete(array('Friends', 'Work', 'Other'));
+ $tagger->delete(['Friends', 'Work', 'Other']);
$this->assertEquals(0, count($tagger->getTags()));
}
public function testRenameTag() {
- $defaultTags = array('Friends', 'Family', 'Wrok', 'Other');
+ $defaultTags = ['Friends', 'Family', 'Wrok', 'Other'];
$tagger = $this->tagMgr->load($this->objectType, $defaultTags);
$this->assertTrue($tagger->rename('Wrok', 'Work'));
@@ -248,7 +248,7 @@ class TagsTest extends \Test\TestCase {
}
public function testTagAs() {
- $objids = array(1, 2, 3, 4, 5, 6, 7, 8, 9);
+ $objids = [1, 2, 3, 4, 5, 6, 7, 8, 9];
$tagger = $this->tagMgr->load($this->objectType);
@@ -264,7 +264,7 @@ class TagsTest extends \Test\TestCase {
* @depends testTagAs
*/
public function testUnTag() {
- $objIds = array(1, 2, 3, 4, 5, 6, 7, 8, 9);
+ $objIds = [1, 2, 3, 4, 5, 6, 7, 8, 9];
// Is this "legal"?
$this->testTagAs();
@@ -283,9 +283,9 @@ class TagsTest extends \Test\TestCase {
public function testFavorite() {
$tagger = $this->tagMgr->load($this->objectType);
$this->assertTrue($tagger->addToFavorites(1));
- $this->assertEquals(array(1), $tagger->getFavorites());
+ $this->assertEquals([1], $tagger->getFavorites());
$this->assertTrue($tagger->removeFromFavorites(1));
- $this->assertEquals(array(), $tagger->getFavorites());
+ $this->assertEquals([], $tagger->getFavorites());
}
public function testShareTags() {
@@ -318,7 +318,7 @@ class TagsTest extends \Test\TestCase {
\OC\Share\Share::shareItem('test', 1, \OCP\Share::SHARE_TYPE_USER, $otherUserId, \OCP\Constants::PERMISSION_READ);
\OC_User::setUserId($otherUserId);
- $otherTagger = $otherTagMgr->load('test', array(), true); // Update tags, load shared ones.
+ $otherTagger = $otherTagMgr->load('test', [], true); // Update tags, load shared ones.
$this->assertTrue($otherTagger->hasTag($testTag));
$this->assertContains(1, $otherTagger->getIdsForTag($testTag));
}
diff --git a/tests/lib/TempManagerTest.php b/tests/lib/TempManagerTest.php
index 6262bd5a00..f43573c1e3 100644
--- a/tests/lib/TempManagerTest.php
+++ b/tests/lib/TempManagerTest.php
@@ -17,7 +17,7 @@ class NullLogger extends Log {
//disable original constructor
}
- public function log(int $level, string $message, array $context = array()) {
+ public function log(int $level, string $message, array $context = []) {
//noop
}
}
diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php
index 7c9f358503..7aa1eb177d 100644
--- a/tests/lib/Template/CSSResourceLocatorTest.php
+++ b/tests/lib/Template/CSSResourceLocatorTest.php
@@ -85,14 +85,14 @@ class CSSResourceLocatorTest extends \Test\TestCase {
return new CSSResourceLocator(
$this->logger,
'theme',
- array('core'=>'map'),
- array('3rd'=>'party'),
+ ['core'=>'map'],
+ ['3rd'=>'party'],
$scssCacher
);
}
private function rrmdir($directory) {
- $files = array_diff(scandir($directory), array('.','..'));
+ $files = array_diff(scandir($directory), ['.','..']);
foreach ($files as $file) {
if (is_dir($directory . '/' . $file)) {
$this->rrmdir($directory . '/' . $file);
@@ -111,10 +111,10 @@ class CSSResourceLocatorTest extends \Test\TestCase {
$locator = $this->cssResourceLocator();
$this->assertAttributeEquals('theme', 'theme', $locator);
$this->assertAttributeEquals('core', 'serverroot', $locator);
- $this->assertAttributeEquals(array('core'=>'map','3rd'=>'party'), 'mapping', $locator);
+ $this->assertAttributeEquals(['core'=>'map','3rd'=>'party'], 'mapping', $locator);
$this->assertAttributeEquals('3rd', 'thirdpartyroot', $locator);
$this->assertAttributeEquals('map', 'webroot', $locator);
- $this->assertAttributeEquals(array(), 'resources', $locator);
+ $this->assertAttributeEquals([], 'resources', $locator);
}
public function testFindWithAppPathSymlink() {
@@ -136,7 +136,7 @@ class CSSResourceLocatorTest extends \Test\TestCase {
];
$locator = $this->cssResourceLocator();
- $locator->find(array('test-css-app/test-file'));
+ $locator->find(['test-css-app/test-file']);
$resources = $locator->getResources();
$this->assertCount(1, $resources);
diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php
index 8e36426393..f7d7f7b57e 100644
--- a/tests/lib/Template/IconsCacherTest.php
+++ b/tests/lib/Template/IconsCacherTest.php
@@ -90,9 +90,9 @@ class IconsCacherTest extends \Test\TestCase {
}
";
$actual = self::invokePrivate($this->iconsCacher, 'getIconsFromCss', [$css]);
- $expected = array(
+ $expected = [
'icon-test' => '/svg/core/actions/add/000?v=1'
- );
+ ];
$this->assertEquals($expected, $actual);
}
diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php
index 38c5fc0ead..8c8fc99c96 100644
--- a/tests/lib/Template/JSResourceLocatorTest.php
+++ b/tests/lib/Template/JSResourceLocatorTest.php
@@ -64,14 +64,14 @@ class JSResourceLocatorTest extends \Test\TestCase {
return new JSResourceLocator(
$this->logger,
'theme',
- array('core'=>'map'),
- array('3rd'=>'party'),
+ ['core'=>'map'],
+ ['3rd'=>'party'],
$jsCombiner
);
}
private function rrmdir($directory) {
- $files = array_diff(scandir($directory), array('.','..'));
+ $files = array_diff(scandir($directory), ['.','..']);
foreach ($files as $file) {
if (is_dir($directory . '/' . $file)) {
$this->rrmdir($directory . '/' . $file);
@@ -91,10 +91,10 @@ class JSResourceLocatorTest extends \Test\TestCase {
$locator = $this->jsResourceLocator();
$this->assertAttributeEquals('theme', 'theme', $locator);
$this->assertAttributeEquals('core', 'serverroot', $locator);
- $this->assertAttributeEquals(array('core'=>'map','3rd'=>'party'), 'mapping', $locator);
+ $this->assertAttributeEquals(['core'=>'map','3rd'=>'party'], 'mapping', $locator);
$this->assertAttributeEquals('3rd', 'thirdpartyroot', $locator);
$this->assertAttributeEquals('map', 'webroot', $locator);
- $this->assertAttributeEquals(array(), 'resources', $locator);
+ $this->assertAttributeEquals([], 'resources', $locator);
}
public function testFindWithAppPathSymlink() {
@@ -116,7 +116,7 @@ class JSResourceLocatorTest extends \Test\TestCase {
];
$locator = $this->jsResourceLocator();
- $locator->find(array('test-js-app/test-file'));
+ $locator->find(['test-js-app/test-file']);
$resources = $locator->getResources();
$this->assertCount(1, $resources);
diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php
index 90488071b4..f0fa818668 100644
--- a/tests/lib/Template/ResourceLocatorTest.php
+++ b/tests/lib/Template/ResourceLocatorTest.php
@@ -29,24 +29,24 @@ class ResourceLocatorTest extends \Test\TestCase {
*/
public function getResourceLocator($theme, $core_map, $party_map, $appsRoots) {
return $this->getMockForAbstractClass('OC\Template\ResourceLocator',
- array($this->logger, $theme, $core_map, $party_map, $appsRoots ),
- '', true, true, true, array());
+ [$this->logger, $theme, $core_map, $party_map, $appsRoots ],
+ '', true, true, true, []);
}
public function testConstructor() {
$locator = $this->getResourceLocator('theme',
- array('core'=>'map'), array('3rd'=>'party'), array('foo'=>'bar'));
+ ['core'=>'map'], ['3rd'=>'party'], ['foo'=>'bar']);
$this->assertAttributeEquals('theme', 'theme', $locator);
$this->assertAttributeEquals('core', 'serverroot', $locator);
- $this->assertAttributeEquals(array('core'=>'map','3rd'=>'party'), 'mapping', $locator);
+ $this->assertAttributeEquals(['core'=>'map','3rd'=>'party'], 'mapping', $locator);
$this->assertAttributeEquals('3rd', 'thirdpartyroot', $locator);
$this->assertAttributeEquals('map', 'webroot', $locator);
- $this->assertAttributeEquals(array(), 'resources', $locator);
+ $this->assertAttributeEquals([], 'resources', $locator);
}
public function testFind() {
$locator = $this->getResourceLocator('theme',
- array('core' => 'map'), array('3rd' => 'party'), array('foo' => 'bar'));
+ ['core' => 'map'], ['3rd' => 'party'], ['foo' => 'bar']);
$locator->expects($this->once())
->method('doFind')
->with('foo');
@@ -54,12 +54,12 @@ class ResourceLocatorTest extends \Test\TestCase {
->method('doFindTheme')
->with('foo');
/** @var \OC\Template\ResourceLocator $locator */
- $locator->find(array('foo'));
+ $locator->find(['foo']);
}
public function testFindNotFound() {
$locator = $this->getResourceLocator('theme',
- array('core'=>'map'), array('3rd'=>'party'), array('foo'=>'bar'));
+ ['core'=>'map'], ['3rd'=>'party'], ['foo'=>'bar']);
$locator->expects($this->once())
->method('doFind')
->with('foo')
@@ -72,25 +72,25 @@ class ResourceLocatorTest extends \Test\TestCase {
->method('debug')
->with($this->stringContains('map/foo'));
/** @var \OC\Template\ResourceLocator $locator */
- $locator->find(array('foo'));
+ $locator->find(['foo']);
}
public function testAppendIfExist() {
$locator = $this->getResourceLocator('theme',
- array(__DIR__=>'map'), array('3rd'=>'party'), array('foo'=>'bar'));
+ [__DIR__=>'map'], ['3rd'=>'party'], ['foo'=>'bar']);
/** @var \OC\Template\ResourceLocator $locator */
$method = new \ReflectionMethod($locator, 'appendIfExist');
$method->setAccessible(true);
$method->invoke($locator, __DIR__, basename(__FILE__), 'webroot');
- $resource1 = array(__DIR__, 'webroot', basename(__FILE__));
- $this->assertEquals(array($resource1), $locator->getResources());
+ $resource1 = [__DIR__, 'webroot', basename(__FILE__)];
+ $this->assertEquals([$resource1], $locator->getResources());
$method->invoke($locator, __DIR__, basename(__FILE__));
- $resource2 = array(__DIR__, 'map', basename(__FILE__));
- $this->assertEquals(array($resource1, $resource2), $locator->getResources());
+ $resource2 = [__DIR__, 'map', basename(__FILE__)];
+ $this->assertEquals([$resource1, $resource2], $locator->getResources());
$method->invoke($locator, __DIR__, 'does-not-exist');
- $this->assertEquals(array($resource1, $resource2), $locator->getResources());
+ $this->assertEquals([$resource1, $resource2], $locator->getResources());
}
}
diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php
index 9e8c30961f..446821e62f 100644
--- a/tests/lib/Template/SCSSCacherTest.php
+++ b/tests/lib/Template/SCSSCacherTest.php
@@ -471,7 +471,7 @@ class SCSSCacherTest extends \Test\TestCase {
}
private function rrmdir($directory) {
- $files = array_diff(scandir($directory), array('.','..'));
+ $files = array_diff(scandir($directory), ['.','..']);
foreach ($files as $file) {
if (is_dir($directory . '/' . $file)) {
$this->rrmdir($directory . '/' . $file);
diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php
index b76105e934..be4a7ade78 100644
--- a/tests/lib/TestCase.php
+++ b/tests/lib/TestCase.php
@@ -194,7 +194,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
* @param array $parameters
* @return mixed
*/
- protected static function invokePrivate($object, $methodName, array $parameters = array()) {
+ protected static function invokePrivate($object, $methodName, array $parameters = []) {
if (is_string($object)) {
$className = $object;
} else {
@@ -297,14 +297,14 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
* @param string $dataDir
*/
static protected function tearDownAfterClassCleanStrayDataFiles($dataDir) {
- $knownEntries = array(
+ $knownEntries = [
'nextcloud.log' => true,
'audit.log' => true,
'owncloud.db' => true,
'.ocdata' => true,
'..' => true,
'.' => true,
- );
+ ];
if ($dh = opendir($dataDir)) {
while (($file = readdir($dh)) !== false) {
@@ -479,7 +479,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
$l10n
->expects($this->any())
->method('t')
- ->willReturnCallback(function($text, $parameters = array()) {
+ ->willReturnCallback(function($text, $parameters = []) {
return vsprintf($text, $parameters);
});
diff --git a/tests/lib/Traits/EncryptionTrait.php b/tests/lib/Traits/EncryptionTrait.php
index ad98ba9121..8799ce72fd 100644
--- a/tests/lib/Traits/EncryptionTrait.php
+++ b/tests/lib/Traits/EncryptionTrait.php
@@ -75,7 +75,7 @@ trait EncryptionTrait {
\OC::$server->getLogger()
);
- $this->registerStorageWrapper('oc_encryption', array($encryptionWrapper, 'wrapStorage'));
+ $this->registerStorageWrapper('oc_encryption', [$encryptionWrapper, 'wrapStorage']);
}
protected function setUpEncryptionTrait() {
diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php
index 1dc0182a96..3d53301b32 100644
--- a/tests/lib/User/ManagerTest.php
+++ b/tests/lib/User/ManagerTest.php
@@ -245,7 +245,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUsers')
->with($this->equalTo('fo'))
- ->willReturn(array('foo', 'afoo', 'Afoo1', 'Bfoo'));
+ ->willReturn(['foo', 'afoo', 'Afoo1', 'Bfoo']);
$backend->expects($this->never())
->method('loginName2UserName');
@@ -268,7 +268,7 @@ class ManagerTest extends TestCase {
$backend1->expects($this->once())
->method('getUsers')
->with($this->equalTo('fo'), $this->equalTo(3), $this->equalTo(1))
- ->willReturn(array('foo1', 'foo2'));
+ ->willReturn(['foo1', 'foo2']);
$backend1->expects($this->never())
->method('loginName2UserName');
@@ -279,7 +279,7 @@ class ManagerTest extends TestCase {
$backend2->expects($this->once())
->method('getUsers')
->with($this->equalTo('fo'), $this->equalTo(3), $this->equalTo(1))
- ->willReturn(array('foo3'));
+ ->willReturn(['foo3']);
$backend2->expects($this->never())
->method('loginName2UserName');
diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php
index c96a07eb9a..f7aba18960 100644
--- a/tests/lib/User/SessionTest.php
+++ b/tests/lib/User/SessionTest.php
@@ -814,10 +814,10 @@ class SessionTest extends \Test\TestCase {
}
public function testActiveUserAfterSetSession() {
- $users = array(
+ $users = [
'foo' => new User('foo', null, $this->createMock(EventDispatcherInterface::class)),
'bar' => new User('bar', null, $this->createMock(EventDispatcherInterface::class))
- );
+ ];
$manager = $this->getMockBuilder('\OC\User\Manager')
->disableOriginalConstructor()
diff --git a/tests/lib/Util/Group/Dummy.php b/tests/lib/Util/Group/Dummy.php
index 0681a317c2..f75aef5737 100644
--- a/tests/lib/Util/Group/Dummy.php
+++ b/tests/lib/Util/Group/Dummy.php
@@ -35,7 +35,7 @@ use OC\Group\Backend;
* dummy group backend, does not keep state, only for testing use
*/
class Dummy extends Backend {
- private $groups=array();
+ private $groups=[];
/**
* Try to create a new group
* @param string $gid The name of the group to create
@@ -46,7 +46,7 @@ class Dummy extends Backend {
*/
public function createGroup($gid) {
if(!isset($this->groups[$gid])) {
- $this->groups[$gid]=array();
+ $this->groups[$gid]=[];
return true;
}else{
return false;
@@ -136,7 +136,7 @@ class Dummy extends Backend {
* if the user exists at all.
*/
public function getUserGroups($uid) {
- $groups=array();
+ $groups=[];
$allGroups=array_keys($this->groups);
foreach($allGroups as $group) {
if($this->inGroup($uid, $group)) {
@@ -157,7 +157,7 @@ class Dummy extends Backend {
if(empty($search)) {
return array_keys($this->groups);
}
- $result = array();
+ $result = [];
foreach(array_keys($this->groups) as $group) {
if(stripos($group, $search) !== false) {
$result[] = $group;
@@ -180,7 +180,7 @@ class Dummy extends Backend {
$length = $limit < 0 ? null : $limit;
return array_slice($this->groups[$gid], $offset, $length);
}
- $result = array();
+ $result = [];
foreach($this->groups[$gid] as $user) {
if(stripos($user, $search) !== false) {
$result[] = $user;
@@ -188,7 +188,7 @@ class Dummy extends Backend {
}
return $result;
}else{
- return array();
+ return [];
}
}
diff --git a/tests/lib/Util/User/Dummy.php b/tests/lib/Util/User/Dummy.php
index 4771983e9b..1d3c2d57b4 100644
--- a/tests/lib/Util/User/Dummy.php
+++ b/tests/lib/Util/User/Dummy.php
@@ -33,8 +33,8 @@ use OC\User\Backend;
* dummy user backend, does not keep state, only for testing use
*/
class Dummy extends Backend implements \OCP\IUserBackend {
- private $users = array();
- private $displayNames = array();
+ private $users = [];
+ private $displayNames = [];
/**
* Create a new user
@@ -127,7 +127,7 @@ class Dummy extends Backend implements \OCP\IUserBackend {
if (empty($search)) {
return array_keys($this->users);
}
- $result = array();
+ $result = [];
foreach (array_keys($this->users) as $user) {
if (stripos($user, $search) !== false) {
$result[] = $user;
diff --git a/tests/lib/UtilCheckServerTest.php b/tests/lib/UtilCheckServerTest.php
index 9cba59beb4..e822c39493 100644
--- a/tests/lib/UtilCheckServerTest.php
+++ b/tests/lib/UtilCheckServerTest.php
@@ -55,9 +55,9 @@ class UtilCheckServerTest extends \Test\TestCase {
* Test that checkServer() returns no errors in the regular case.
*/
public function testCheckServer() {
- $result = \OC_Util::checkServer($this->getConfig(array(
+ $result = \OC_Util::checkServer($this->getConfig([
'installed' => true
- )));
+ ]));
$this->assertEmpty($result);
}
@@ -72,9 +72,9 @@ class UtilCheckServerTest extends \Test\TestCase {
// even though ".ocdata" is missing, the error isn't
// triggered to allow setup to run
- $result = \OC_Util::checkServer($this->getConfig(array(
+ $result = \OC_Util::checkServer($this->getConfig([
'installed' => false
- )));
+ ]));
$this->assertEmpty($result);
}
@@ -91,14 +91,14 @@ class UtilCheckServerTest extends \Test\TestCase {
$oldCurrentVersion = $session->get('OC_Version');
// upgrade condition to simulate needUpgrade() === true
- $session->set('OC_Version', array(6, 0, 0, 2));
+ $session->set('OC_Version', [6, 0, 0, 2]);
// even though ".ocdata" is missing, the error isn't
// triggered to allow for upgrade
- $result = \OC_Util::checkServer($this->getConfig(array(
+ $result = \OC_Util::checkServer($this->getConfig([
'installed' => true,
'version' => '6.0.0.1'
- )));
+ ]));
$this->assertEmpty($result);
// restore versions
@@ -123,10 +123,10 @@ class UtilCheckServerTest extends \Test\TestCase {
$result = \OC_Util::checkDataDirectoryValidity($this->datadir);
$this->assertEquals(1, count($result));
- $result = \OC_Util::checkServer($this->getConfig(array(
+ $result = \OC_Util::checkServer($this->getConfig([
'installed' => true,
'version' => implode('.', \OCP\Util::getVersion())
- )));
+ ]));
$this->assertCount(1, $result);
}
@@ -134,10 +134,10 @@ class UtilCheckServerTest extends \Test\TestCase {
* Tests that no error is given when the datadir is writable
*/
public function testDataDirWritable() {
- $result = \OC_Util::checkServer($this->getConfig(array(
+ $result = \OC_Util::checkServer($this->getConfig([
'installed' => true,
'version' => implode('.', \OCP\Util::getVersion())
- )));
+ ]));
$this->assertEmpty($result);
}
@@ -148,10 +148,10 @@ class UtilCheckServerTest extends \Test\TestCase {
$this->markTestSkipped('TODO: Disable because fails on drone');
chmod($this->datadir, 0300);
- $result = \OC_Util::checkServer($this->getConfig(array(
+ $result = \OC_Util::checkServer($this->getConfig([
'installed' => true,
'version' => implode('.', \OCP\Util::getVersion())
- )));
+ ]));
$this->assertCount(1, $result);
}
@@ -160,10 +160,10 @@ class UtilCheckServerTest extends \Test\TestCase {
*/
public function testDataDirNotWritableSetup() {
chmod($this->datadir, 0300);
- $result = \OC_Util::checkServer($this->getConfig(array(
+ $result = \OC_Util::checkServer($this->getConfig([
'installed' => false,
'version' => implode('.', \OCP\Util::getVersion())
- )));
+ ]));
chmod($this->datadir, 0700); //needed for cleanup
$this->assertEmpty($result);
}
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index 94ac17ce34..4d8432294f 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -206,16 +206,16 @@ class UtilTest extends \Test\TestCase {
}
public function dataProviderForTestIsSharingDisabledForUser() {
- return array(
+ return [
// existing groups, groups the user belong to, groups excluded from sharing, expected result
- array(array('g1', 'g2', 'g3'), array(), array('g1'), false),
- array(array('g1', 'g2', 'g3'), array(), array(), false),
- array(array('g1', 'g2', 'g3'), array('g2'), array('g1'), false),
- array(array('g1', 'g2', 'g3'), array('g2'), array(), false),
- array(array('g1', 'g2', 'g3'), array('g1', 'g2'), array('g1'), false),
- array(array('g1', 'g2', 'g3'), array('g1', 'g2'), array('g1', 'g2'), true),
- array(array('g1', 'g2', 'g3'), array('g1', 'g2'), array('g1', 'g2', 'g3'), true),
- );
+ [['g1', 'g2', 'g3'], [], ['g1'], false],
+ [['g1', 'g2', 'g3'], [], [], false],
+ [['g1', 'g2', 'g3'], ['g2'], ['g1'], false],
+ [['g1', 'g2', 'g3'], ['g2'], [], false],
+ [['g1', 'g2', 'g3'], ['g1', 'g2'], ['g1'], false],
+ [['g1', 'g2', 'g3'], ['g1', 'g2'], ['g1', 'g2'], true],
+ [['g1', 'g2', 'g3'], ['g1', 'g2'], ['g1', 'g2', 'g3'], true],
+ ];
}
/**
@@ -250,32 +250,32 @@ class UtilTest extends \Test\TestCase {
}
function defaultAppsProvider() {
- return array(
+ return [
// none specified, default to files
- array(
+ [
'',
'index.php/apps/files/',
- array('files'),
- ),
+ ['files'],
+ ],
// unexisting or inaccessible app specified, default to files
- array(
+ [
'unexist',
'index.php/apps/files/',
- array('files'),
- ),
+ ['files'],
+ ],
// non-standard app
- array(
+ [
'calendar',
'index.php/apps/calendar/',
- array('files', 'calendar'),
- ),
+ ['files', 'calendar'],
+ ],
// non-standard app with fallback
- array(
+ [
'contacts,calendar',
'index.php/apps/calendar/',
- array('files', 'calendar'),
- ),
- );
+ ['files', 'calendar'],
+ ],
+ ];
}
public function testGetDefaultPageUrlWithRedirectUrlWithoutFrontController() {
@@ -319,14 +319,14 @@ class UtilTest extends \Test\TestCase {
$this->assertFalse(\OCP\Util::needUpgrade());
$config->setSystemValue('version', '7.0.0.0');
- \OC::$server->getSession()->set('OC_Version', array(7, 0, 0, 1));
- self::invokePrivate(new \OCP\Util, 'needUpgradeCache', array(null));
+ \OC::$server->getSession()->set('OC_Version', [7, 0, 0, 1]);
+ self::invokePrivate(new \OCP\Util, 'needUpgradeCache', [null]);
$this->assertTrue(\OCP\Util::needUpgrade());
$config->setSystemValue('version', $oldConfigVersion);
\OC::$server->getSession()->set('OC_Version', $oldSessionVersion);
- self::invokePrivate(new \OCP\Util, 'needUpgradeCache', array(null));
+ self::invokePrivate(new \OCP\Util, 'needUpgradeCache', [null]);
$this->assertFalse(\OCP\Util::needUpgrade());
}
diff --git a/tests/preseed-config.php b/tests/preseed-config.php
index 2d88d93915..6831ec66f6 100644
--- a/tests/preseed-config.php
+++ b/tests/preseed-config.php
@@ -21,7 +21,7 @@ if (is_dir(OC::$SERVERROOT.'/apps2')) {
if (getenv('OBJECT_STORE') === 's3') {
$CONFIG['objectstore'] = [
'class' => 'OC\\Files\\ObjectStore\\S3',
- 'arguments' => array(
+ 'arguments' => [
'bucket' => 'nextcloud',
'autocreate' => true,
'key' => 'dummy',
@@ -31,7 +31,7 @@ if (getenv('OBJECT_STORE') === 's3') {
'use_ssl' => false,
// required for some non amazon s3 implementations
'use_path_style' => true
- )
+ ]
];
}
if (getenv('OBJECT_STORE') === 'swift') {
@@ -40,7 +40,7 @@ if (getenv('OBJECT_STORE') === 'swift') {
if (getenv('SWIFT-AUTH') === 'v2.0') {
$CONFIG['objectstore'] = [
'class' => 'OC\\Files\\ObjectStore\\Swift',
- 'arguments' => array(
+ 'arguments' => [
'autocreate' => true,
'username' => 'swift',
'tenantName' => 'service',
@@ -49,12 +49,12 @@ if (getenv('OBJECT_STORE') === 'swift') {
'region' => 'regionOne',
'url' => "http://$swiftHost:5000/v2.0",
'bucket' => 'nextcloud'
- )
+ ]
];
} else {
$CONFIG['objectstore'] = [
'class' => 'OC\\Files\\ObjectStore\\Swift',
- 'arguments' => array(
+ 'arguments' => [
'autocreate' => true,
'user' => [
'name' => 'swift',
@@ -76,19 +76,19 @@ if (getenv('OBJECT_STORE') === 'swift') {
'region' => 'regionOne',
'url' => "http://$swiftHost:5000/v3",
'bucket' => 'nextcloud'
- )
+ ]
];
}
}
if (getenv('OBJECT_STORE') === 'azure') {
$CONFIG['objectstore'] = [
'class' => 'OC\\Files\\ObjectStore\\Azure',
- 'arguments' => array(
+ 'arguments' => [
'container' => 'test',
'account_name' => 'devstoreaccount1',
'account_key' => 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
'endpoint' => 'http://' . (getenv('DRONE') === 'true' ? 'azurite' : 'localhost') . ':10000/devstoreaccount1',
'autocreate' => true
- )
+ ]
];
}
diff --git a/version.php b/version.php
index 002a016059..f39ef9497e 100644
--- a/version.php
+++ b/version.php
@@ -29,7 +29,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.
-$OC_Version = array(19, 0, 0, 0);
+$OC_Version = [19, 0, 0, 0];
// The human readable string
$OC_VersionString = '19.0.0 alpha';