From 2fbad1ed72bc9ef591a6f35558eb02e7b76ffd1b Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 9 Apr 2020 09:22:29 +0200 Subject: [PATCH] Fix (array) indent style to always use one tab Signed-off-by: Christoph Wurst --- apps/accessibility/appinfo/routes.php | 8 +- .../lib/AccessibilityProvider.php | 12 +- apps/comments/lib/Activity/Provider.php | 10 +- apps/dav/lib/CalDAV/CalDavBackend.php | 26 +- apps/dav/lib/CalDAV/Calendar.php | 8 +- apps/dav/lib/CardDAV/AddressBook.php | 8 +- apps/dav/lib/CardDAV/AddressBookImpl.php | 2 +- apps/dav/lib/CardDAV/CardDavBackend.php | 4 +- apps/dav/lib/CardDAV/SyncService.php | 2 +- .../lib/Connector/Sabre/FakeLockerPlugin.php | 4 +- apps/dav/lib/Connector/Sabre/FilesPlugin.php | 2 +- apps/dav/lib/Connector/Sabre/Principal.php | 6 +- .../dav/lib/Connector/Sabre/ServerFactory.php | 6 +- apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php | 78 +- apps/dav/lib/RootCollection.php | 48 +- .../tests/unit/CalDAV/CalDavBackendTest.php | 4 +- .../NotificationProvider/PushProviderTest.php | 76 +- .../CalDAV/Reminder/ReminderServiceTest.php | 32 +- .../unit/CardDAV/BirthdayServiceTest.php | 10 +- .../tests/unit/CardDAV/CardDavBackendTest.php | 62 +- .../unit/CardDAV/ContactsManagerTest.php | 4 +- apps/dav/tests/unit/CardDAV/ConverterTest.php | 6 +- .../tests/unit/CardDAV/Sharing/PluginTest.php | 8 +- .../tests/unit/CardDAV/SyncServiceTest.php | 70 +- .../tests/unit/Command/MoveCalendarTest.php | 4 +- .../unit/Comments/CommentsPluginTest.php | 56 +- .../tests/unit/Connector/Sabre/FileTest.php | 68 +- .../unit/Connector/Sabre/PrincipalTest.php | 8 +- .../dav/tests/unit/DAV/Sharing/PluginTest.php | 8 +- .../unit/DAV/SystemPrincipalBackendTest.php | 10 +- .../tests/unit/Upload/AssemblyStreamTest.php | 42 +- apps/encryption/lib/Users/Setup.php | 2 +- apps/encryption/tests/RecoveryTest.php | 4 +- .../lib/Notifications.php | 2 +- .../lib/SyncFederationAddressBooks.php | 2 +- apps/federation/tests/DbHandlerTest.php | 6 +- .../tests/SyncFederationAddressbooksTest.php | 14 +- .../tests/BackgroundJob/ScanFilesTest.php | 6 +- .../tests/Controller/ViewControllerTest.php | 26 +- apps/files_external/lib/Command/Config.php | 10 +- .../lib/Controller/AjaxController.php | 4 +- .../Service/UserGlobalStoragesServiceTest.php | 2 +- apps/files_external/tests/Storage/FtpTest.php | 8 +- apps/files_external/tests/config.php | 12 +- .../lib/Middleware/SharingCheckMiddleware.php | 2 +- apps/files_sharing/templates/public.php | 2 +- apps/files_sharing/tests/CacheTest.php | 26 +- .../Controller/ShareAPIControllerTest.php | 2 +- .../lib/Controller/AUserData.php | 2 +- .../lib/Controller/UsersController.php | 2 +- .../tests/Controller/GroupsControllerTest.php | 2 +- .../tests/Controller/UsersControllerTest.php | 8 +- .../lib/Activity/SecurityProvider.php | 8 +- .../Controller/CheckSetupControllerTest.php | 10 +- apps/sharebymail/lib/Activity.php | 20 +- apps/sharebymail/tests/SettingsTest.php | 14 +- apps/systemtags/lib/Activity/Provider.php | 102 +- .../systemtags/tests/Activity/SettingTest.php | 18 +- apps/theming/tests/ImageManagerTest.php | 2 +- .../Unit/Provider/BackupCodesProviderTest.php | 8 +- apps/user_ldap/ajax/setConfiguration.php | 2 +- apps/user_ldap/lib/Command/CheckUser.php | 4 +- apps/user_ldap/lib/Command/DeleteConfig.php | 2 +- apps/user_ldap/lib/Command/Search.php | 8 +- apps/user_ldap/lib/Command/SetConfig.php | 6 +- apps/user_ldap/lib/Command/ShowConfig.php | 4 +- apps/user_ldap/lib/Command/TestConfig.php | 2 +- apps/user_ldap/lib/Connection.php | 6 +- apps/user_ldap/lib/Group_LDAP.php | 4 +- apps/user_ldap/lib/LDAPProvider.php | 4 +- apps/user_ldap/lib/User/User.php | 2 +- apps/user_ldap/lib/Wizard.php | 108 +- apps/user_ldap/tests/ConfigurationTest.php | 2 +- .../Integration/ExceptionOnLostConnection.php | 4 +- apps/user_ldap/tests/LDAPProviderTest.php | 56 +- apps/user_ldap/tests/WizardTest.php | 2 +- composer.json | 2 +- core/Controller/AvatarController.php | 8 +- core/Controller/LostController.php | 4 +- core/templates/loginflow/authpicker.php | 6 +- core/templates/loginflow/grant.php | 6 +- core/templates/loginflowv2/authpicker.php | 6 +- core/templates/loginflowv2/grant.php | 6 +- lib/private/AppFramework/Http.php | 2 +- .../AppFramework/Middleware/OCSMiddleware.php | 2 +- .../Security/SecurityMiddleware.php | 2 +- .../Authentication/TwoFactorAuth/Manager.php | 4 +- lib/private/Comments/Comment.php | 8 +- lib/private/DB/MySQLMigrator.php | 38 +- lib/private/Group/Database.php | 16 +- lib/private/Group/MetaData.php | 14 +- lib/private/IntegrityCheck/Checker.php | 24 +- lib/private/Preview/Generator.php | 6 +- lib/private/Security/TrustedDomainHelper.php | 8 +- lib/private/Share/Share.php | 2 +- lib/private/Share20/DefaultShareProvider.php | 6 +- lib/private/Share20/Manager.php | 2 +- lib/private/SubAdmin.php | 2 +- lib/private/Tagging/Tag.php | 12 +- lib/private/Tags.php | 2 +- lib/private/User/Database.php | 14 +- lib/private/legacy/OC_Defaults.php | 2 +- lib/private/legacy/OC_Files.php | 44 +- lib/private/legacy/OC_Hook.php | 4 +- lib/public/AppFramework/ApiController.php | 100 +- lib/public/AppFramework/Controller.php | 2 +- .../AppFramework/Http/DataDisplayResponse.php | 2 +- lib/public/AppFramework/Http/DataResponse.php | 2 +- lib/public/AppFramework/Http/Response.php | 4 +- .../AppFramework/Http/TemplateResponse.php | 2 +- lib/public/Share.php | 2 +- .../Controller/CSRFTokenControllerTest.php | 2 +- tests/Core/Controller/LoginControllerTest.php | 12 +- tests/Core/Controller/LostControllerTest.php | 4 +- .../features/bootstrap/FilesAppContext.php | 14 +- .../features/bootstrap/ThemingAppContext.php | 12 +- tests/lib/Accounts/AccountsManagerTest.php | 2 +- tests/lib/AllConfigTest.php | 10 +- .../App/AppStore/Fetcher/AppFetcherTest.php | 2430 ++++++++--------- tests/lib/App/CodeChecker/NodeVisitorTest.php | 8 +- tests/lib/App/PlatformRepositoryTest.php | 10 +- tests/lib/AppFramework/AppTest.php | 2 +- .../Controller/OCSControllerTest.php | 2 +- .../lib/AppFramework/Http/DispatcherTest.php | 4 +- .../lib/AppFramework/Http/OCSResponseTest.php | 60 +- .../lib/AppFramework/Routing/RoutingTest.php | 52 +- .../Utility/SimpleContainerTest.php | 294 +- .../Collaborators/MailPluginTest.php | 4 +- .../Collaborators/SearchTest.php | 30 +- .../ContactsMenu/ActionProviderStoreTest.php | 12 +- .../ContactsMenu/ContactsStoreTest.php | 10 +- .../Providers/EMailproviderTest.php | 4 +- tests/lib/DirectEditing/ManagerTest.php | 4 +- tests/lib/ErrorHandlerTest.php | 2 +- tests/lib/Files/Type/DetectionTest.php | 2 +- tests/lib/Group/ManagerTest.php | 4 +- tests/lib/IntegrityCheck/CheckerTest.php | 522 ++-- tests/lib/LegacyHelperTest.php | 10 +- tests/lib/NavigationManagerTest.php | 6 +- .../Repair/ClearGeneratedAvatarCacheTest.php | 6 +- tests/lib/Share/ShareTest.php | 26 +- .../lib/Share20/DefaultShareProviderTest.php | 8 +- tests/lib/Share20/ManagerTest.php | 18 +- tests/lib/Template/CSSResourceLocatorTest.php | 12 +- tests/lib/Template/JSResourceLocatorTest.php | 8 +- 145 files changed, 2603 insertions(+), 2603 deletions(-) diff --git a/apps/accessibility/appinfo/routes.php b/apps/accessibility/appinfo/routes.php index ed8b0f57f0..a5e75fcdce 100644 --- a/apps/accessibility/appinfo/routes.php +++ b/apps/accessibility/appinfo/routes.php @@ -27,13 +27,13 @@ return [ 'routes' => [ ['name' => 'accessibility#getCss', 'url' => '/css/user-{md5}', 'verb' => 'GET'], ['name' => 'accessibility#getJavascript', 'url' => '/js/accessibility', 'verb' => 'GET'], - ], - 'ocs' => [ + ], + 'ocs' => [ [ 'name' => 'Config#getConfig', 'url' => '/api/v1/config', 'verb' => 'GET', - ], + ], [ 'name' => 'Config#setConfig', 'url' => '/api/v1/config/{key}', @@ -44,5 +44,5 @@ return [ 'url' => '/api/v1/config/{key}', 'verb' => 'DELETE', ], - ] + ] ]; diff --git a/apps/accessibility/lib/AccessibilityProvider.php b/apps/accessibility/lib/AccessibilityProvider.php index 159cde37e3..ef8571528b 100644 --- a/apps/accessibility/lib/AccessibilityProvider.php +++ b/apps/accessibility/lib/AccessibilityProvider.php @@ -72,12 +72,12 @@ class AccessibilityProvider { public function getHighContrast() { return [ - 'id' => 'highcontrast', - 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'), - 'title' => $this->l->t('High contrast mode'), - 'enableLabel' => $this->l->t('Enable high contrast mode'), - 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.') - ]; + 'id' => 'highcontrast', + 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'), + 'title' => $this->l->t('High contrast mode'), + 'enableLabel' => $this->l->t('Enable high contrast mode'), + 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.') + ]; } public function getFonts() { diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php index 763e2d036d..a637d4ca6b 100644 --- a/apps/comments/lib/Activity/Provider.php +++ b/apps/comments/lib/Activity/Provider.php @@ -146,17 +146,17 @@ class Provider implements IProvider { if ($event->getSubject() === 'add_comment_subject') { if ($subjectParameters['actor'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You commented on %1$s', [ - $subjectParameters['filePath'], - ])) + $subjectParameters['filePath'], + ])) ->setRichSubject($this->l->t('You commented on {file}'), [ 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), ]); } else { $author = $this->generateUserParameter($subjectParameters['actor']); $event->setParsedSubject($this->l->t('%1$s commented on %2$s', [ - $author['name'], - $subjectParameters['filePath'], - ])) + $author['name'], + $subjectParameters['filePath'], + ])) ->setRichSubject($this->l->t('{author} commented on {file}'), [ 'author' => $author, 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index bef0a9e719..cf06cb5ab2 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -772,7 +772,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription [ 'calendarId' => $calendarId, 'calendarData' => $this->getCalendarById($calendarId), - ])); + ])); return $calendarId; } @@ -833,7 +833,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'calendarData' => $this->getCalendarById($calendarId), 'shares' => $this->getShares($calendarId), 'propertyMutations' => $mutations, - ])); + ])); return true; }); @@ -852,7 +852,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'calendarId' => $calendarId, 'calendarData' => $this->getCalendarById($calendarId), 'shares' => $this->getShares($calendarId), - ])); + ])); $stmt = $this->db->prepare('DELETE FROM `*PREFIX*calendarobjects` WHERE `calendarid` = ? AND `calendartype` = ?'); $stmt->execute([$calendarId, self::CALENDAR_TYPE_CALENDAR]); @@ -2095,11 +2095,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } return [ - 'uri' => $row['uri'], - 'calendardata' => $row['calendardata'], - 'lastmodified' => $row['lastmodified'], - 'etag' => '"' . $row['etag'] . '"', - 'size' => (int)$row['size'], + 'uri' => $row['uri'], + 'calendardata' => $row['calendardata'], + 'lastmodified' => $row['lastmodified'], + 'etag' => '"' . $row['etag'] . '"', + 'size' => (int)$row['size'], ]; } @@ -2124,11 +2124,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $result = []; foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { $result[] = [ - 'calendardata' => $row['calendardata'], - 'uri' => $row['uri'], - 'lastmodified' => $row['lastmodified'], - 'etag' => '"' . $row['etag'] . '"', - 'size' => (int)$row['size'], + 'calendardata' => $row['calendardata'], + 'uri' => $row['uri'], + 'lastmodified' => $row['lastmodified'], + 'etag' => '"' . $row['etag'] . '"', + 'size' => (int)$row['size'], ]; } diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index ca8534a76b..38598e30ce 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -191,10 +191,10 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { if ($this->getOwner() !== parent::getOwner()) { $acl[] = [ - 'privilege' => '{DAV:}read', - 'principal' => parent::getOwner(), - 'protected' => true, - ]; + 'privilege' => '{DAV:}read', + 'principal' => parent::getOwner(), + 'protected' => true, + ]; if ($this->canWrite()) { $acl[] = [ 'privilege' => '{DAV:}write', diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index 56aa328be3..4fc97ac401 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -130,10 +130,10 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { if ($this->getOwner() !== parent::getOwner()) { $acl[] = [ - 'privilege' => '{DAV:}read', - 'principal' => parent::getOwner(), - 'protected' => true, - ]; + 'privilege' => '{DAV:}read', + 'principal' => parent::getOwner(), + 'protected' => true, + ]; if ($this->canWrite()) { $acl[] = [ 'privilege' => '{DAV:}write', diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php index 7ced2e9056..fd1cd8827a 100644 --- a/apps/dav/lib/CardDAV/AddressBookImpl.php +++ b/apps/dav/lib/CardDAV/AddressBookImpl.php @@ -284,7 +284,7 @@ class AddressBookImpl implements IAddressBook { $result[$property->name][] = [ 'type' => $type, 'value' => $property->getValue() - ]; + ]; } else { $result[$property->name][] = $property->getValue(); } diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 8925fcdbd0..ee9f723be6 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -76,8 +76,8 @@ class CardDavBackend implements BackendInterface, SyncSupport { /** @var array properties to index */ public static $indexProperties = [ - 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME', - 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD']; + 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME', + 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD']; /** * @var string[] Map of uid => display name diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 5306797874..2180911b55 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -202,7 +202,7 @@ class SyncService { $body = $this->buildSyncCollectionRequestBody($syncToken); $response = $client->request('REPORT', $addressBookUrl, $body, [ - 'Content-Type' => 'application/xml' + 'Content-Type' => 'application/xml' ]); return $this->parseMultiStatus($response['body']); diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php index 2812eba979..7f1a735c7a 100644 --- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php @@ -134,8 +134,8 @@ class FakeLockerPlugin extends ServerPlugin { $lockInfo->timeout = 1800; $body = $this->server->xml->write('{DAV:}prop', [ - '{DAV:}lockdiscovery' => - new LockDiscovery([$lockInfo]) + '{DAV:}lockdiscovery' => + new LockDiscovery([$lockInfo]) ]); $response->setStatus(200); diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 82f3c3b6cc..8f94ea9a52 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -209,7 +209,7 @@ class FilesPlugin extends ServerPlugin { $sourceNodeFileInfo = $sourceNode->getFileInfo(); if ($sourceNodeFileInfo === null) { throw new NotFound($source . ' does not exist'); - } + } if (!$sourceNodeFileInfo->isDeletable()) { throw new Forbidden($source . " cannot be deleted"); diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 4b068dafda..2fa01c0315 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -446,9 +446,9 @@ class Principal implements BackendInterface { $userId = $user->getUID(); $displayName = $user->getDisplayName(); $principal = [ - 'uri' => $this->principalPrefix . '/' . $userId, - '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, - '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', + 'uri' => $this->principalPrefix . '/' . $userId, + '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName, + '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL', ]; $email = $user->getEMailAddress(); diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php index 7f5bc6baea..f740284f27 100644 --- a/apps/dav/lib/Connector/Sabre/ServerFactory.php +++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php @@ -129,9 +129,9 @@ class ServerFactory { // Some WebDAV clients do require Class 2 WebDAV support (locking), since // we do not provide locking we emulate it using a fake locking plugin. if($this->request->isUserAgent([ - '/WebDAVFS/', - '/OneNote/', - '/Microsoft-WebDAV-MiniRedir/', + '/WebDAVFS/', + '/OneNote/', + '/Microsoft-WebDAV-MiniRedir/', ])) { $server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin()); } diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php index c1a4337b36..b95c978cf1 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php +++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php @@ -29,59 +29,59 @@ use Sabre\Xml\XmlDeserializable; class ShareRequest implements XmlDeserializable { - public $set = []; + public $set = []; - public $remove = []; + public $remove = []; - /** - * Constructor - * - * @param array $set - * @param array $remove - */ - function __construct(array $set, array $remove) { + /** + * Constructor + * + * @param array $set + * @param array $remove + */ + function __construct(array $set, array $remove) { - $this->set = $set; - $this->remove = $remove; + $this->set = $set; + $this->remove = $remove; - } + } - static function xmlDeserialize(Reader $reader) { + static function xmlDeserialize(Reader $reader) { - $elements = $reader->parseInnerTree([ - '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', - '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', - ]); + $elements = $reader->parseInnerTree([ + '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', + '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', + ]); - $set = []; - $remove = []; + $set = []; + $remove = []; - foreach ($elements as $elem) { - switch ($elem['name']) { + foreach ($elements as $elem) { + switch ($elem['name']) { - case '{' . Plugin::NS_OWNCLOUD . '}set' : - $sharee = $elem['value']; + case '{' . Plugin::NS_OWNCLOUD . '}set' : + $sharee = $elem['value']; - $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; - $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; + $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; + $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; - $set[] = [ - 'href' => $sharee['{DAV:}href'], - 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, - 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, - 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), - ]; - break; + $set[] = [ + 'href' => $sharee['{DAV:}href'], + 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, + 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, + 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), + ]; + break; - case '{' . Plugin::NS_OWNCLOUD . '}remove' : - $remove[] = $elem['value']['{DAV:}href']; - break; + case '{' . Plugin::NS_OWNCLOUD . '}remove' : + $remove[] = $elem['value']['{DAV:}href']; + break; - } - } + } + } - return new self($set, $remove); + return new self($set, $remove); - } + } } diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php index 271b7f6c86..e50c2a882c 100644 --- a/apps/dav/lib/RootCollection.php +++ b/apps/dav/lib/RootCollection.php @@ -148,30 +148,30 @@ class RootCollection extends SimpleCollection { \OC::$server->query(ITimeFactory::class)); $children = [ - new SimpleCollection('principals', [ - $userPrincipals, - $groupPrincipals, - $systemPrincipals, - $calendarResourcePrincipals, - $calendarRoomPrincipals]), - $filesCollection, - $userCalendarRoot, - new SimpleCollection('system-calendars', [ - $resourceCalendarRoot, - $roomCalendarRoot, - ]), - $publicCalendarRoot, - new SimpleCollection('addressbooks', [ - $usersAddressBookRoot, - $systemAddressBookRoot]), - $systemTagCollection, - $systemTagRelationsCollection, - $commentsCollection, - $uploadCollection, - $avatarCollection, - new SimpleCollection('provisioning', [ - $appleProvisioning - ]) + new SimpleCollection('principals', [ + $userPrincipals, + $groupPrincipals, + $systemPrincipals, + $calendarResourcePrincipals, + $calendarRoomPrincipals]), + $filesCollection, + $userCalendarRoot, + new SimpleCollection('system-calendars', [ + $resourceCalendarRoot, + $roomCalendarRoot, + ]), + $publicCalendarRoot, + new SimpleCollection('addressbooks', [ + $usersAddressBookRoot, + $systemAddressBookRoot]), + $systemTagCollection, + $systemTagRelationsCollection, + $commentsCollection, + $uploadCollection, + $avatarCollection, + new SimpleCollection('provisioning', [ + $appleProvisioning + ]) ]; parent::__construct('root', $children); diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index fb48e5fac4..761ed73490 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -548,8 +548,8 @@ EOD; $this->assertEquals($id, $subscriptions[0]['id']); $patch = new PropPatch([ - '{DAV:}displayname' => 'Unit test', - '{http://apple.com/ns/ical/}calendar-color' => '#ac0606', + '{DAV:}displayname' => 'Unit test', + '{http://apple.com/ns/ical/}calendar-color' => '#ac0606', ]); $this->backend->updateSubscription($id, $patch); $patch->commit(); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php index 76a8b5befd..9257fe56e6 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php @@ -42,46 +42,46 @@ use OCP\Notification\INotification; class PushProviderTest extends AbstractNotificationProviderTest { - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ - protected $logger; + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + protected $logger; - /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $l10nFactory; + /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */ + protected $l10nFactory; - /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ - protected $l10n; + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ + protected $l10n; - /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected $urlGenerator; + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ + protected $urlGenerator; - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ - protected $config; + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ + protected $config; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ - private $manager; + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ + private $manager; - /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ - private $timeFactory; + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ + private $timeFactory; - protected function setUp(): void { - parent::setUp(); + protected function setUp(): void { + parent::setUp(); - $this->config = $this->createMock(IConfig::class); - $this->manager = $this->createMock(IManager::class); - $this->timeFactory = $this->createMock(ITimeFactory::class); + $this->config = $this->createMock(IConfig::class); + $this->manager = $this->createMock(IManager::class); + $this->timeFactory = $this->createMock(ITimeFactory::class); - $this->provider = new PushProvider( - $this->config, - $this->manager, - $this->logger, - $this->l10nFactory, - $this->urlGenerator, - $this->timeFactory - ); - } + $this->provider = new PushProvider( + $this->config, + $this->manager, + $this->logger, + $this->l10nFactory, + $this->urlGenerator, + $this->timeFactory + ); + } - public function testNotificationType():void { - $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY'); + public function testNotificationType():void { + $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY'); } public function testNotSend(): void { @@ -110,19 +110,19 @@ class PushProviderTest extends AbstractNotificationProviderTest { $this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users); } - public function testSend(): void { - $this->config->expects($this->once()) + public function testSend(): void { + $this->config->expects($this->once()) ->method('getAppValue') ->with('dav', 'sendEventRemindersPush', 'no') ->willReturn('yes'); - $user1 = $this->createMock(IUser::class); - $user1->method('getUID') + $user1 = $this->createMock(IUser::class); + $user1->method('getUID') ->willReturn('uid1'); - $user2 = $this->createMock(IUser::class); + $user2 = $this->createMock(IUser::class); $user2->method('getUID') ->willReturn('uid2'); - $user3 = $this->createMock(IUser::class); + $user3 = $this->createMock(IUser::class); $user3->method('getUID') ->willReturn('uid3'); @@ -161,13 +161,13 @@ class PushProviderTest extends AbstractNotificationProviderTest { ->with($notification3); $this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users); - } + } /** * @param string $uid * @param \DateTime $dt */ - private function createNotificationMock(string $uid, \DateTime $dt):INotification { + private function createNotificationMock(string $uid, \DateTime $dt):INotification { $notification = $this->createMock(INotification::class); $notification ->expects($this->once()) diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php index 76ff0a6a33..11ecdbc354 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php @@ -42,11 +42,11 @@ use Test\TestCase; class ReminderServiceTest extends TestCase { - /** @var Backend|\PHPUnit\Framework\MockObject\MockObject */ - private $backend; + /** @var Backend|\PHPUnit\Framework\MockObject\MockObject */ + private $backend; - /** @var NotificationProviderManager|\PHPUnit\Framework\MockObject\MockObject */ - private $notificationProviderManager; + /** @var NotificationProviderManager|\PHPUnit\Framework\MockObject\MockObject */ + private $notificationProviderManager; /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; @@ -185,12 +185,12 @@ END:VEVENT END:VCALENDAR EOD; - protected function setUp(): void { + protected function setUp(): void { parent::setUp(); - $this->backend = $this->createMock(Backend::class); - $this->notificationProviderManager = $this->createMock(NotificationProviderManager::class); - $this->userManager = $this->createMock(IUserManager::class); + $this->backend = $this->createMock(Backend::class); + $this->notificationProviderManager = $this->createMock(NotificationProviderManager::class); + $this->userManager = $this->createMock(IUserManager::class); $this->groupManager = $this->createMock(IGroupManager::class); $this->caldavBackend = $this->createMock(CalDavBackend::class); $this->timeFactory = $this->createMock(ITimeFactory::class); @@ -203,14 +203,14 @@ EOD; $this->groupManager, $this->caldavBackend, $this->timeFactory); - } + } public function testOnCalendarObjectDelete():void { - $this->backend->expects($this->once()) + $this->backend->expects($this->once()) ->method('cleanRemindersForEvent') ->with(44); - $action = '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject'; + $action = '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject'; $objectData = [ 'id' => '44', 'component' => 'vevent', @@ -221,14 +221,14 @@ EOD; public function testOnCalendarObjectCreateSingleEntry():void { $action = '\OCA\DAV\CalDAV\CalDavBackend::createCalendarObject'; - $objectData = [ - 'calendardata' => self::CALENDAR_DATA, + $objectData = [ + 'calendardata' => self::CALENDAR_DATA, 'id' => '42', 'calendarid' => '1337', 'component' => 'vevent', ]; - $this->backend->expects($this->exactly(2)) + $this->backend->expects($this->exactly(2)) ->method('insertReminder') ->withConsecutive( [1337, 42, 'wej2z68l9h', false, 1465430400, false, '5c70531aab15c92b52518ae10a2f78a4', 'de919af7429d3b5c11e8b9d289b411a6', 'EMAIL', true, 1465429500, false], @@ -236,12 +236,12 @@ EOD; ) ->willReturn(1); - $this->timeFactory->expects($this->once()) + $this->timeFactory->expects($this->once()) ->method('getDateTime') ->with() ->willReturn(\DateTime::createFromFormat(\DateTime::ATOM, '2016-06-08T00:00:00+00:00')); - $this->reminderService->onTouchCalendarObject($action, $objectData); + $this->reminderService->onTouchCalendarObject($action, $objectData); } public function testOnCalendarObjectCreateSingleEntryWithRepeat(): void { diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php index 3d36b76e6e..e132f08255 100644 --- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php @@ -157,14 +157,14 @@ class BirthdayServiceTest extends TestCase { $this->cardDav->expects($this->once())->method('getAddressBookById') ->with(666) ->willReturn([ - 'principaluri' => 'principals/users/user01', - 'uri' => 'default' - ]); + 'principaluri' => 'principals/users/user01', + 'uri' => 'default' + ]); $this->calDav->expects($this->once())->method('getCalendarByUri') ->with('principals/users/user01', 'contact_birthdays') ->willReturn([ - 'id' => 1234 - ]); + 'id' => 1234 + ]); $this->calDav->expects($this->at(1))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf.ics'); $this->calDav->expects($this->at(2))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf-death.ics'); $this->calDav->expects($this->at(3))->method('deleteCalendarObject')->with(1234, 'default-gump.vcf-anniversary.ics'); diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php index 9298edb53a..5efce1c23b 100644 --- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php +++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php @@ -135,7 +135,7 @@ class CardDavBackendTest extends TestCase { $this->createMock(IAppManager::class), $this->createMock(ProxyMapper::class), $this->createMock(IConfig::class), - ]) + ]) ->setMethods(['getPrincipalByPath', 'getGroupMembership']) ->getMock(); $this->principal->method('getPrincipalByPath') @@ -668,12 +668,12 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsTable) ->values( [ - 'addressbookid' => $query->createNamedParameter(0), - 'carddata' => $query->createNamedParameter($vCards[$i]->serialize(), IQueryBuilder::PARAM_LOB), - 'uri' => $query->createNamedParameter('uri' . $i), - 'lastmodified' => $query->createNamedParameter(time()), - 'etag' => $query->createNamedParameter('etag' . $i), - 'size' => $query->createNamedParameter(120), + 'addressbookid' => $query->createNamedParameter(0), + 'carddata' => $query->createNamedParameter($vCards[$i]->serialize(), IQueryBuilder::PARAM_LOB), + 'uri' => $query->createNamedParameter('uri' . $i), + 'lastmodified' => $query->createNamedParameter(time()), + 'etag' => $query->createNamedParameter('etag' . $i), + 'size' => $query->createNamedParameter(120), ] ); $query->execute(); @@ -694,11 +694,11 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsPropertiesTable) ->values( [ - 'addressbookid' => $query->createNamedParameter(0), - 'cardid' => $query->createNamedParameter($vCardIds[0]), - 'name' => $query->createNamedParameter('CLOUD'), - 'value' => $query->createNamedParameter('John@nextcloud.com'), - 'preferred' => $query->createNamedParameter(0) + 'addressbookid' => $query->createNamedParameter(0), + 'cardid' => $query->createNamedParameter($vCardIds[0]), + 'name' => $query->createNamedParameter('CLOUD'), + 'value' => $query->createNamedParameter('John@nextcloud.com'), + 'preferred' => $query->createNamedParameter(0) ] ); $query->execute(); @@ -755,13 +755,13 @@ class CardDavBackendTest extends TestCase { public function dataTestSearch() { return [ - ['John', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - ['M. Doe', ['FN'], [], [['uri1', 'John M. Doe']]], - ['Do', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - 'check if duplicates are handled correctly' => ['John', ['FN', 'CLOUD'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - 'case insensitive' => ['john', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], - 'find "_" escaped' => ['_', ['CLOUD'], [], [['uri2', 'find without options']]], - 'find not empty ClOUD' => ['%_%', ['CLOUD'], ['escape_like_param'=>false], [['uri0', 'John Doe'], ['uri2', 'find without options']]], + ['John', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + ['M. Doe', ['FN'], [], [['uri1', 'John M. Doe']]], + ['Do', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + 'check if duplicates are handled correctly' => ['John', ['FN', 'CLOUD'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + 'case insensitive' => ['john', ['FN'], [], [['uri0', 'John Doe'], ['uri1', 'John M. Doe']]], + 'find "_" escaped' => ['_', ['CLOUD'], [], [['uri2', 'find without options']]], + 'find not empty ClOUD' => ['%_%', ['CLOUD'], ['escape_like_param'=>false], [['uri0', 'John Doe'], ['uri2', 'find without options']]], ]; } @@ -770,12 +770,12 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsTable) ->values( [ - 'addressbookid' => $query->createNamedParameter(1), - 'carddata' => $query->createNamedParameter('carddata', IQueryBuilder::PARAM_LOB), - 'uri' => $query->createNamedParameter('uri'), - 'lastmodified' => $query->createNamedParameter(5489543), - 'etag' => $query->createNamedParameter('etag'), - 'size' => $query->createNamedParameter(120), + 'addressbookid' => $query->createNamedParameter(1), + 'carddata' => $query->createNamedParameter('carddata', IQueryBuilder::PARAM_LOB), + 'uri' => $query->createNamedParameter('uri'), + 'lastmodified' => $query->createNamedParameter(5489543), + 'etag' => $query->createNamedParameter('etag'), + 'size' => $query->createNamedParameter(120), ] ); $query->execute(); @@ -798,12 +798,12 @@ class CardDavBackendTest extends TestCase { $query->insert($this->dbCardsTable) ->values( [ - 'addressbookid' => $query->createNamedParameter($i), - 'carddata' => $query->createNamedParameter('carddata' . $i, IQueryBuilder::PARAM_LOB), - 'uri' => $query->createNamedParameter('uri' . $i), - 'lastmodified' => $query->createNamedParameter(5489543), - 'etag' => $query->createNamedParameter('etag' . $i), - 'size' => $query->createNamedParameter(120), + 'addressbookid' => $query->createNamedParameter($i), + 'carddata' => $query->createNamedParameter('carddata' . $i, IQueryBuilder::PARAM_LOB), + 'uri' => $query->createNamedParameter('uri' . $i), + 'lastmodified' => $query->createNamedParameter(5489543), + 'etag' => $query->createNamedParameter('etag' . $i), + 'size' => $query->createNamedParameter(120), ] ); $query->execute(); diff --git a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php index 1f9a6c5084..12ce1bca5c 100644 --- a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php +++ b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php @@ -41,8 +41,8 @@ class ContactsManagerTest extends TestCase { /** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backEnd */ $backEnd = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock(); $backEnd->method('getAddressBooksForUser')->willReturn([ - ['{DAV:}displayname' => 'Test address book', 'uri' => 'default'], - ]); + ['{DAV:}displayname' => 'Test address book', 'uri' => 'default'], + ]); $l = $this->createMock(IL10N::class); $app = new ContactsManager($backEnd, $l); diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php index 0c129b0de7..7e93c05a3f 100644 --- a/apps/dav/tests/unit/CardDAV/ConverterTest.php +++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php @@ -192,9 +192,9 @@ class ConverterTest extends TestCase { public function providesNames() { return [ - ['Sauron;;;;', 'Sauron'], - ['Baggins;Bilbo;;;', 'Bilbo Baggins'], - ['Tolkien;John;Ronald Reuel;;', 'John Ronald Reuel Tolkien'], + ['Sauron;;;;', 'Sauron'], + ['Baggins;Bilbo;;;', 'Bilbo Baggins'], + ['Tolkien;John;Ronald Reuel;;', 'John Ronald Reuel Tolkien'], ]; } diff --git a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php index d5ad784d70..7de2ea2f56 100644 --- a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php @@ -69,10 +69,10 @@ class PluginTest extends TestCase { public function testSharing() { $this->book->expects($this->once())->method('updateShares')->with([[ - 'href' => 'principal:principals/admin', - 'commonName' => null, - 'summary' => null, - 'readOnly' => false + 'href' => 'principal:principals/admin', + 'commonName' => null, + 'summary' => null, + 'readOnly' => false ]], ['mailto:wilfredo@example.com']); // setup request diff --git a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php index 40243020e9..9015528763 100644 --- a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php @@ -131,41 +131,41 @@ class SyncServiceTest extends TestCase { $accountManager = $this->getMockBuilder(AccountManager::class)->disableOriginalConstructor()->getMock(); $accountManager->expects($this->any())->method('getUser') ->willReturn([ - AccountManager::PROPERTY_DISPLAYNAME => - [ - 'value' => $user->getDisplayName(), - 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, - ], - AccountManager::PROPERTY_ADDRESS => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - AccountManager::PROPERTY_WEBSITE => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - AccountManager::PROPERTY_EMAIL => - [ - 'value' => $user->getEMailAddress(), - 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, - ], - AccountManager::PROPERTY_AVATAR => - [ - 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY - ], - AccountManager::PROPERTY_PHONE => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - AccountManager::PROPERTY_TWITTER => - [ - 'value' => '', - 'scope' => AccountManager::VISIBILITY_PRIVATE, - ], - ] + AccountManager::PROPERTY_DISPLAYNAME => + [ + 'value' => $user->getDisplayName(), + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, + ], + AccountManager::PROPERTY_ADDRESS => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + AccountManager::PROPERTY_WEBSITE => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + AccountManager::PROPERTY_EMAIL => + [ + 'value' => $user->getEMailAddress(), + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, + ], + AccountManager::PROPERTY_AVATAR => + [ + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY + ], + AccountManager::PROPERTY_PHONE => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + AccountManager::PROPERTY_TWITTER => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + ], + ] ); $ss = new SyncService($backend, $userManager, $logger, $accountManager); diff --git a/apps/dav/tests/unit/Command/MoveCalendarTest.php b/apps/dav/tests/unit/Command/MoveCalendarTest.php index ff6cdbd033..36553ff65a 100644 --- a/apps/dav/tests/unit/Command/MoveCalendarTest.php +++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php @@ -262,7 +262,7 @@ class MoveCalendarTest extends TestCase { ->with(1234) ->willReturn([ ['href' => 'principal:principals/groups/nextclouders'] - ]); + ]); if ($shareWithGroupMembersOnly === true) { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage("User is not part of the group with whom the calendar was shared. You may use -f to move the calendar while deleting this share."); @@ -412,7 +412,7 @@ class MoveCalendarTest extends TestCase { 'href' => 'principal:principals/users/user2', '{DAV:}displayname' => 'Personal' ] - ]); + ]); if ($force === false) { $this->expectException(InvalidArgumentException::class); diff --git a/apps/dav/tests/unit/Comments/CommentsPluginTest.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php index 4844aab6b1..7210e96b12 100644 --- a/apps/dav/tests/unit/Comments/CommentsPluginTest.php +++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php @@ -182,11 +182,11 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '666', - 'actorType' => 'users', - 'actorId' => 'alice' - ] + $commentData); + 'objectType' => 'files', + 'objectId' => '666', + 'actorType' => 'users', + 'actorId' => 'alice' + ] + $commentData); $comment->setId('23'); $path = 'comments/files/666'; @@ -264,11 +264,11 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice' - ] + $commentData); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice' + ] + $commentData); $comment->setId('23'); $path = 'comments/files/42'; @@ -352,11 +352,11 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice' - ] + $commentData); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice' + ] + $commentData); $comment->setId('23'); $path = 'comments/files/42'; @@ -440,13 +440,13 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice', - 'message' => 'dummy', - 'verb' => 'dummy' - ]); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice', + 'message' => 'dummy', + 'verb' => 'dummy' + ]); $comment->setId('23'); $path = 'comments/files/42'; @@ -535,12 +535,12 @@ class CommentsPluginTest extends \Test\TestCase { ]; $comment = new Comment([ - 'objectType' => 'files', - 'objectId' => '42', - 'actorType' => 'users', - 'actorId' => 'alice', - 'verb' => 'comment', - ]); + 'objectType' => 'files', + 'objectId' => '42', + 'actorType' => 'users', + 'actorId' => 'alice', + 'verb' => 'comment', + ]); $comment->setId('23'); $path = 'comments/files/42'; diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 4c87351116..d366726e91 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -350,52 +350,52 @@ class FileTest extends TestCase { public function legalMtimeProvider() { return [ "string" => [ - 'HTTP_X_OC_MTIME' => "string", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "string", + 'expected result' => null ], "castable string (int)" => [ - 'HTTP_X_OC_MTIME' => "34", - 'expected result' => 34 + 'HTTP_X_OC_MTIME' => "34", + 'expected result' => 34 ], "castable string (float)" => [ - 'HTTP_X_OC_MTIME' => "34.56", - 'expected result' => 34 + 'HTTP_X_OC_MTIME' => "34.56", + 'expected result' => 34 ], "float" => [ - 'HTTP_X_OC_MTIME' => 34.56, - 'expected result' => 34 + 'HTTP_X_OC_MTIME' => 34.56, + 'expected result' => 34 ], "zero" => [ - 'HTTP_X_OC_MTIME' => 0, - 'expected result' => 0 + 'HTTP_X_OC_MTIME' => 0, + 'expected result' => 0 ], "zero string" => [ - 'HTTP_X_OC_MTIME' => "0", - 'expected result' => 0 + 'HTTP_X_OC_MTIME' => "0", + 'expected result' => 0 ], "negative zero string" => [ - 'HTTP_X_OC_MTIME' => "-0", - 'expected result' => 0 + 'HTTP_X_OC_MTIME' => "-0", + 'expected result' => 0 ], "string starting with number following by char" => [ - 'HTTP_X_OC_MTIME' => "2345asdf", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "2345asdf", + 'expected result' => null ], "string castable hex int" => [ - 'HTTP_X_OC_MTIME' => "0x45adf", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "0x45adf", + 'expected result' => null ], "string that looks like invalid hex int" => [ - 'HTTP_X_OC_MTIME' => "0x123g", - 'expected result' => null + 'HTTP_X_OC_MTIME' => "0x123g", + 'expected result' => null ], "negative int" => [ - 'HTTP_X_OC_MTIME' => -34, - 'expected result' => -34 + 'HTTP_X_OC_MTIME' => -34, + 'expected result' => -34 ], "negative float" => [ - 'HTTP_X_OC_MTIME' => -34.43, - 'expected result' => -34 + 'HTTP_X_OC_MTIME' => -34.43, + 'expected result' => -34 ], ]; } @@ -406,9 +406,9 @@ class FileTest extends TestCase { */ public function testPutSingleFileLegalMtime($requestMtime, $resultMtime) { $request = new \OC\AppFramework\Http\Request([ - 'server' => [ - 'HTTP_X_OC_MTIME' => $requestMtime, - ] + 'server' => [ + 'HTTP_X_OC_MTIME' => $requestMtime, + ] ], null, $this->config, null); $file = 'foo.txt'; @@ -430,9 +430,9 @@ class FileTest extends TestCase { */ public function testChunkedPutLegalMtime($requestMtime, $resultMtime) { $request = new \OC\AppFramework\Http\Request([ - 'server' => [ - 'HTTP_X_OC_MTIME' => $requestMtime, - ] + 'server' => [ + 'HTTP_X_OC_MTIME' => $requestMtime, + ] ], null, $this->config, null); $_SERVER['HTTP_OC_CHUNKED'] = true; @@ -1105,10 +1105,10 @@ class FileTest extends TestCase { $userView = Filesystem::getView(); } return [ - "filesize" => $userView->filesize($path), - "mtime" => $userView->filemtime($path), - "filetype" => $userView->filetype($path), - "mimetype" => $userView->getMimeType($path) + "filesize" => $userView->filesize($path), + "mtime" => $userView->filemtime($path), + "filetype" => $userView->filetype($path), + "mimetype" => $userView->getMimeType($path) ]; } diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php index 8f2ee2b664..cb4104044b 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php @@ -335,7 +335,7 @@ class PrincipalTest extends TestCase { 'principals/groups/group1', 'principals/groups/foo%2Fbar', 'proxyId1/calendar-proxy-read', - 'proxyId2/calendar-proxy-write', + 'proxyId2/calendar-proxy-write', ]; $response = $this->connector->getGroupMembership('principals/users/foo'); $this->assertSame($expectedResponse, $response); @@ -545,9 +545,9 @@ class PrincipalTest extends TestCase { ->willReturn([$user2, $user3]); $this->assertEquals([ - 'principals/users/user2', - 'principals/users/user3', - ], $this->connector->searchPrincipals('principals/users', + 'principals/users/user2', + 'principals/users/user3', + ], $this->connector->searchPrincipals('principals/users', ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => 'user@example.com'])); } diff --git a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php index 4063aac5f0..9d8d2d925f 100644 --- a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php @@ -71,10 +71,10 @@ class PluginTest extends TestCase { public function testSharing() { $this->book->expects($this->once())->method('updateShares')->with([[ - 'href' => 'principal:principals/admin', - 'commonName' => null, - 'summary' => null, - 'readOnly' => false + 'href' => 'principal:principals/admin', + 'commonName' => null, + 'summary' => null, + 'readOnly' => false ]], ['mailto:wilfredo@example.com']); // setup request diff --git a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php index eec2558ee9..698e39a521 100644 --- a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php +++ b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php @@ -48,10 +48,10 @@ class SystemPrincipalBackendTest extends TestCase { 'uri' => 'principals/system/system', '{DAV:}displayname' => 'system', ], - [ - 'uri' => 'principals/system/public', - '{DAV:}displayname' => 'public', - ] + [ + 'uri' => 'principals/system/public', + '{DAV:}displayname' => 'public', + ] ], 'principals/system'], ]; } @@ -125,7 +125,7 @@ class SystemPrincipalBackendTest extends TestCase { public function providesPrincipalForGetGroupMembership() { return [ - ['principals/system/a'], + ['principals/system/a'], ]; } diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php index f513a68f06..2a4c832c71 100644 --- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php +++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php @@ -87,41 +87,41 @@ class AssemblyStreamTest extends \Test\TestCase { return[ 'one node zero bytes' => [ '', [ - $this->buildNode('0', '') - ]], + $this->buildNode('0', '') + ]], 'one node only' => [ '1234567890', [ - $this->buildNode('0', '1234567890') - ]], + $this->buildNode('0', '1234567890') + ]], 'one node buffer boundary' => [ $data8k, [ - $this->buildNode('0', $data8k) - ]], + $this->buildNode('0', $data8k) + ]], 'two nodes' => [ '1234567890', [ - $this->buildNode('1', '67890'), - $this->buildNode('0', '12345') - ]], + $this->buildNode('1', '67890'), + $this->buildNode('0', '12345') + ]], 'two nodes end on buffer boundary' => [ $data8k . $data8k, [ - $this->buildNode('1', $data8k), - $this->buildNode('0', $data8k) - ]], + $this->buildNode('1', $data8k), + $this->buildNode('0', $data8k) + ]], 'two nodes with one on buffer boundary' => [ $data8k . $dataLess8k, [ - $this->buildNode('1', $dataLess8k), - $this->buildNode('0', $data8k) - ]], + $this->buildNode('1', $dataLess8k), + $this->buildNode('0', $data8k) + ]], 'two nodes on buffer boundary plus one byte' => [ $data8k . 'X' . $data8k, [ - $this->buildNode('1', $data8k), - $this->buildNode('0', $data8k . 'X') - ]], + $this->buildNode('1', $data8k), + $this->buildNode('0', $data8k . 'X') + ]], 'two nodes on buffer boundary plus one byte at the end' => [ $data8k . $data8k . 'X', [ - $this->buildNode('1', $data8k . 'X'), - $this->buildNode('0', $data8k) - ]], + $this->buildNode('1', $data8k . 'X'), + $this->buildNode('0', $data8k) + ]], 'a ton of nodes' => [ $tonofdata, $tonofnodes ] diff --git a/apps/encryption/lib/Users/Setup.php b/apps/encryption/lib/Users/Setup.php index 0ff488ae58..b9fc7aea4d 100644 --- a/apps/encryption/lib/Users/Setup.php +++ b/apps/encryption/lib/Users/Setup.php @@ -64,7 +64,7 @@ class Setup { $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false; $this->crypt = $crypt; $this->keyManager = $keyManager; - } + } /** * @param string $uid user id diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php index a41c2ff9fe..ce5c1f006a 100644 --- a/apps/encryption/tests/RecoveryTest.php +++ b/apps/encryption/tests/RecoveryTest.php @@ -110,8 +110,8 @@ class RecoveryTest extends TestCase { $this->cryptMock->expects($this->once()) ->method('createKeyPair') ->willReturn([ - 'publicKey' => 'privateKey', - 'privateKey' => 'publicKey', + 'publicKey' => 'privateKey', + 'privateKey' => 'publicKey', ]); $this->keyManagerMock->expects($this->once()) diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php index ae0c2d524a..a70e947e3c 100644 --- a/apps/federatedfilesharing/lib/Notifications.php +++ b/apps/federatedfilesharing/lib/Notifications.php @@ -255,7 +255,7 @@ class Notifications { $fields = [ 'token' => $token, 'remoteId' => $remoteId - ]; + ]; foreach ($data as $key => $value) { $fields[$key] = $value; } diff --git a/apps/federation/lib/SyncFederationAddressBooks.php b/apps/federation/lib/SyncFederationAddressBooks.php index 094d2c0cb0..f0e3d2ba38 100644 --- a/apps/federation/lib/SyncFederationAddressBooks.php +++ b/apps/federation/lib/SyncFederationAddressBooks.php @@ -78,7 +78,7 @@ class SyncFederationAddressBooks { $targetBookId = $trustedServer['url_hash']; $targetPrincipal = "principals/system/system"; $targetBookProperties = [ - '{DAV:}displayname' => $url + '{DAV:}displayname' => $url ]; try { $newToken = $this->syncService->syncRemoteAddressBook($url, $cardDavUser, $addressBookUrl, $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetBookProperties); diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index 121e6b3cce..d68173cb45 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -92,9 +92,9 @@ class DbHandlerTest extends TestCase { public function dataTestAddServer() { return [ - ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')], - ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')], - ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')], + ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')], + ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')], + ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')], ]; } diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php index 8cf02fce7d..ac0650c664 100644 --- a/apps/federation/tests/SyncFederationAddressbooksTest.php +++ b/apps/federation/tests/SyncFederationAddressbooksTest.php @@ -54,13 +54,13 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { getMock(); $dbHandler->method('getAllServer')-> willReturn([ - [ - 'url' => 'https://cloud.drop.box', - 'url_hash' => 'sha1', - 'shared_secret' => 'iloveowncloud', - 'sync_token' => '0' - ] - ]); + [ + 'url' => 'https://cloud.drop.box', + 'url_hash' => 'sha1', + 'shared_secret' => 'iloveowncloud', + 'sync_token' => '0' + ] + ]); $dbHandler->expects($this->once())->method('setServerStatus')-> with('https://cloud.drop.box', 1, '1'); $syncService = $this->getMockBuilder('OCA\DAV\CardDAV\SyncService') diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index f2220e6276..b236f753ad 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -52,8 +52,8 @@ class ScanFilesTest extends TestCase { $this->scanFiles = $this->getMockBuilder('\OCA\Files\BackgroundJob\ScanFiles') ->setConstructorArgs([ - $this->config, - $this->userManager, + $this->config, + $this->userManager, ]) ->setMethods(['runScanner']) ->getMock(); @@ -105,7 +105,7 @@ class ScanFilesTest extends TestCase { ->method('search') ->with('', 500, 50) ->willReturn([ - $fakeUser + $fakeUser ]); $this->config ->expects($this->at(2)) diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index 8f2f8fe9ec..c00f30c890 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -99,17 +99,17 @@ class ViewControllerTest extends TestCase { $this->activityHelper = $this->createMock(Helper::class); $this->viewController = $this->getMockBuilder('\OCA\Files\Controller\ViewController') ->setConstructorArgs([ - 'files', - $this->request, - $this->urlGenerator, - $this->l10n, - $this->config, - $this->eventDispatcher, - $this->userSession, - $this->appManager, - $this->rootFolder, - $this->activityHelper, - ]) + 'files', + $this->request, + $this->urlGenerator, + $this->l10n, + $this->config, + $this->eventDispatcher, + $this->userSession, + $this->appManager, + $this->rootFolder, + $this->activityHelper, + ]) ->setMethods([ 'getStorageInfo', 'renderScript' @@ -262,14 +262,14 @@ class ViewControllerTest extends TestCase { 'classes' => 'collapsible', 'sublist' => [ [ - 'id' => 'sharingout', + 'id' => 'sharingout', 'appname' => 'files_sharing', 'script' => 'list.php', 'order' => 16, 'name' => \OC::$server->getL10N('files_sharing')->t('Shared with others'), ], [ - 'id' => 'sharingin', + 'id' => 'sharingin', 'appname' => 'files_sharing', 'script' => 'list.php', 'order' => 15, diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index c7fd63c5e4..f58b1561e6 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -93,8 +93,8 @@ class Config extends Base { $value = $mount->getBackendOption($key); } if (!is_string($value) && json_decode(json_encode($value)) === $value) { // show bools and objects correctly - $value = json_encode($value); - } + $value = json_encode($value); + } $output->writeln($value); } @@ -106,9 +106,9 @@ class Config extends Base { */ protected function setOption(StorageConfig $mount, $key, $value, OutputInterface $output) { $decoded = json_decode($value, true); - if (!is_null($decoded) && json_encode($decoded) === $value) { - $value = $decoded; - } + if (!is_null($decoded) && json_encode($decoded) === $value) { + $value = $decoded; + } if ($key === 'mountpoint' || $key === 'mount_point') { $mount->setMountPoint($value); } else { diff --git a/apps/files_external/lib/Controller/AjaxController.php b/apps/files_external/lib/Controller/AjaxController.php index b864ff451b..a200b581c3 100644 --- a/apps/files_external/lib/Controller/AjaxController.php +++ b/apps/files_external/lib/Controller/AjaxController.php @@ -93,8 +93,8 @@ class AjaxController extends Controller { 'private_key' => $key['privatekey'], 'public_key' => $key['publickey'] ], - 'status' => 'success' - ]); + 'status' => 'success' + ]); } /** diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index 9fb7b2a62a..633399197f 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -227,7 +227,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { public function testDeleteUnexistingStorage() { $this->expectException(\DomainException::class); - $this->actualDeletedUnexistingStorageTest(); + $this->actualDeletedUnexistingStorageTest(); } public function getUniqueStoragesProvider() { diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index db57b5e6bf..db2fd00341 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -65,10 +65,10 @@ class FtpTest extends \Test\Files\Storage\Storage { public function testConstructUrl(){ $config = [ 'host' => 'localhost', - 'user' => 'ftp', - 'password' => 'ftp', - 'root' => '/', - 'secure' => false ]; + 'user' => 'ftp', + 'password' => 'ftp', + 'root' => '/', + 'secure' => false ]; $instance = new FTP($config); $this->assertEquals('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php index fbf4304d82..21e6536acd 100644 --- a/apps/files_external/tests/config.php +++ b/apps/files_external/tests/config.php @@ -100,11 +100,11 @@ return [ 'root'=>'/test' ], 'sftp_key' => [ - 'run'=>false, - 'host'=>'localhost', - 'user'=>'test', - 'public_key'=>'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJPTvz3OLonF2KSGEKP/nd4CPmRYvemG2T4rIiNYjDj0U5y+2sKEWbjiUlQl2bsqYuVoJ+/UNJlGQbbZ08kQirFeo1GoWBzqioaTjUJfbLN6TzVVKXxR9YIVmH7Ajg2iEeGCndGgbmnPfj+kF9TR9IH8vMVvtubQwf7uEwB0ALhw== phpseclib-generated-key', + 'run'=>false, + 'host'=>'localhost', + 'user'=>'test', + 'public_key'=>'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJPTvz3OLonF2KSGEKP/nd4CPmRYvemG2T4rIiNYjDj0U5y+2sKEWbjiUlQl2bsqYuVoJ+/UNJlGQbbZ08kQirFeo1GoWBzqioaTjUJfbLN6TzVVKXxR9YIVmH7Ajg2iEeGCndGgbmnPfj+kF9TR9IH8vMVvtubQwf7uEwB0ALhw== phpseclib-generated-key', 'private_key'=>'test', - 'root'=>'/test' - ], + 'root'=>'/test' + ], ]; diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php index 4f0b547e43..63a67bb5b4 100644 --- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php +++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php @@ -136,7 +136,7 @@ class SharingCheckMiddleware extends Middleware { } if (!$this->reflector->hasAnnotation('NoOutgoingFederatedSharingRequired') && - $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') !== 'yes') { + $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') !== 'yes') { return false; } diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 6e9bad0a9d..5c462b51aa 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -112,7 +112,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
t('By uploading files, you agree to the %1$sterms of service%2$s.', [ - '', '' + '', '' ]); ?>
diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index c5ce0107f8..94e5504aec 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -227,19 +227,19 @@ class CacheTest extends TestCase { function testSearchByMime() { $results = $this->sharedStorage->getCache()->searchByMime('text'); $check = [ - [ - 'name' => 'bar.txt', - 'path' => 'bar.txt' - ], - [ - 'name' => 'another too.txt', - 'path' => 'subdir/another too.txt' - ], - [ - 'name' => 'another.txt', - 'path' => 'subdir/another.txt' - ], - ]; + [ + 'name' => 'bar.txt', + 'path' => 'bar.txt' + ], + [ + 'name' => 'another too.txt', + 'path' => 'subdir/another too.txt' + ], + [ + 'name' => 'another.txt', + 'path' => 'subdir/another.txt' + ], + ]; $this->verifyFiles($check, $results); } diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index c2d4c7641e..3f82675fed 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -4085,7 +4085,7 @@ class ShareAPIControllerTest extends TestCase { $recipientGroup = $this->createMock('\OCP\IGroup'); $recipientGroup->method('getDisplayName')->willReturn('recipientGroupDisplayName'); $this->groupManager->method('get')->willReturnMap([ - ['recipientGroup', $recipientGroup], + ['recipientGroup', $recipientGroup], ]); $this->urlGenerator->method('linkToRouteAbsolute') diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 2bc81e9dcf..3579202b36 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -155,7 +155,7 @@ abstract class AUserData extends OCSController { ]; return $data; - } + } /** * Get the groups a user is a subadmin of diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 8905f1348a..6ed5a1217c 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -105,7 +105,7 @@ class UsersController extends AUserData { NewUserMailHelper $newUserMailHelper, FederatedFileSharingFactory $federatedFileSharingFactory, ISecureRandom $secureRandom, - RemoteWipe $remoteWipe) { + RemoteWipe $remoteWipe) { parent::__construct($appName, $request, $userManager, diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index f512502df4..f5969c0152 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -258,7 +258,7 @@ class GroupsControllerTest extends \Test\TestCase { 'canAdd' => true, 'canRemove' => true - ] + ] ]], $result->getData()); } diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 0a02378cba..a5a79c23eb 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -157,10 +157,10 @@ class UsersControllerTest extends TestCase { ->willReturn(['Admin' => [], 'Foo' => [], 'Bar' => []]); $expected = ['users' => [ - 'Admin', - 'Foo', - 'Bar', - ], + 'Admin', + 'Foo', + 'Bar', + ], ]; $this->assertEquals($expected, $this->api->getUsers('MyCustomSearch')->getData()); } diff --git a/apps/settings/lib/Activity/SecurityProvider.php b/apps/settings/lib/Activity/SecurityProvider.php index 962fa63d79..568006d03c 100644 --- a/apps/settings/lib/Activity/SecurityProvider.php +++ b/apps/settings/lib/Activity/SecurityProvider.php @@ -63,8 +63,8 @@ class SecurityProvider implements IProvider { case 'twofactor_success': $params = $event->getSubjectParameters(); $event->setParsedSubject($l->t('You successfully logged in using two-factor authentication (%1$s)', [ - $params['provider'], - ])); + $params['provider'], + ])); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/password.png'))); } else { @@ -74,8 +74,8 @@ class SecurityProvider implements IProvider { case 'twofactor_failed': $params = $event->getSubjectParameters(); $event->setParsedSubject($l->t('A login attempt using two-factor authentication failed (%1$s)', [ - $params['provider'], - ])); + $params['provider'], + ])); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/password.png'))); } else { diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index c15f3b8f23..db4e458069 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -148,7 +148,7 @@ class CheckSetupControllerTest extends TestCase { $this->dateTimeFormatter, $this->memoryInfo, $this->secureRandom, - ]) + ]) ->setMethods([ 'isReadOnlyConfig', 'hasValidTransactionIsolationLevel', @@ -203,7 +203,7 @@ class CheckSetupControllerTest extends TestCase { $this->config->expects($this->at(0)) ->method('getSystemValue') ->with('has_internet_connection', true) - ->willReturn(true); + ->willReturn(true); $this->config->expects($this->at(1)) ->method('getSystemValue') @@ -232,7 +232,7 @@ class CheckSetupControllerTest extends TestCase { $this->config->expects($this->at(0)) ->method('getSystemValue') ->with('has_internet_connection', true) - ->willReturn(true); + ->willReturn(true); $this->config->expects($this->at(1)) ->method('getSystemValue') @@ -956,7 +956,7 @@ class CheckSetupControllerTest extends TestCase { 'No errors have been found.', Http::STATUS_OK, [ - 'Content-Type' => 'text/plain', + 'Content-Type' => 'text/plain', ] ); $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles()); @@ -1367,7 +1367,7 @@ Array ', Http::STATUS_OK, [ - 'Content-Type' => 'text/plain', + 'Content-Type' => 'text/plain', ] ); $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles()); diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php index c1c6ac629f..a588ee3b6c 100644 --- a/apps/sharebymail/lib/Activity.php +++ b/apps/sharebymail/lib/Activity.php @@ -119,8 +119,8 @@ class Activity implements IProvider { if ($event->getSubject() === self::SUBJECT_SHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('Shared with %1$s', [ - $parsedParameters['email']['name'], - ])) + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('Shared with {email}'), [ 'email' => $parsedParameters['email'], ]); @@ -145,8 +145,8 @@ class Activity implements IProvider { } } else if ($event->getSubject() === self::SUBJECT_UNSHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('Unshared from %1$s', [ - $parsedParameters['email']['name'], - ])) + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('Unshared from {email}'), [ 'email' => $parsedParameters['email'], ]); @@ -207,9 +207,9 @@ class Activity implements IProvider { if ($event->getSubject() === self::SUBJECT_SHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('You shared %1$s with %2$s by mail', [ - $parsedParameters['file']['path'], - $parsedParameters['email']['name'], - ])) + $parsedParameters['file']['path'], + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('You shared {file} with {email} by mail'), $parsedParameters); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/share.png'))); @@ -230,9 +230,9 @@ class Activity implements IProvider { } } else if ($event->getSubject() === self::SUBJECT_UNSHARED_EMAIL_SELF) { $event->setParsedSubject($this->l->t('You unshared %1$s from %2$s by mail', [ - $parsedParameters['file']['path'], - $parsedParameters['email']['name'], - ])) + $parsedParameters['file']['path'], + $parsedParameters['email']['name'], + ])) ->setRichSubject($this->l->t('You unshared {file} from {email} by mail'), $parsedParameters); if ($this->activityManager->getRequirePNG()) { $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/share.png'))); diff --git a/apps/sharebymail/tests/SettingsTest.php b/apps/sharebymail/tests/SettingsTest.php index 91457dd715..d3d1eab765 100644 --- a/apps/sharebymail/tests/SettingsTest.php +++ b/apps/sharebymail/tests/SettingsTest.php @@ -56,13 +56,13 @@ class SettingsTest extends TestCase { ]; $after = [ - 'oc_appconfig' => - json_encode([ - 'key1' => 'value1', - 'key2' => 'value2', - 'shareByMailEnabled' => true - ]), - 'oc_foo' => 'oc_bar' + 'oc_appconfig' => + json_encode([ + 'key1' => 'value1', + 'key2' => 'value2', + 'shareByMailEnabled' => true + ]), + 'oc_foo' => 'oc_bar' ]; $this->instance->announceShareProvider(['array' => &$before]); diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php index fcf37d93d6..862846a712 100644 --- a/apps/systemtags/lib/Activity/Provider.php +++ b/apps/systemtags/lib/Activity/Provider.php @@ -116,23 +116,23 @@ class Provider implements IProvider { if ($event->getSubject() === self::ASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { $event->setParsedSubject($this->l->t('System tag %1$s added by the system', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Added system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('Added system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Added system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else { $event->setParsedSubject($this->l->t('%1$s added system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} added system tag {systemtag}'), [ 'actor' => $parsedParameters['actor'], 'systemtag' => $parsedParameters['systemtag'], @@ -141,23 +141,23 @@ class Provider implements IProvider { } else if ($event->getSubject() === self::UNASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { $event->setParsedSubject($this->l->t('System tag %1$s removed by the system', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Removed system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('Removed system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('Removed system tag {systemtag}'), [ 'systemtag' => $parsedParameters['systemtag'], ]); } else { $event->setParsedSubject($this->l->t('%1$s removed system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} removed system tag {systemtag}'), [ 'actor' => $parsedParameters['actor'], 'systemtag' => $parsedParameters['systemtag'], @@ -188,86 +188,86 @@ class Provider implements IProvider { if ($event->getSubject() === self::CREATE_TAG) { if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You created system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You created system tag {systemtag}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s created system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} created system tag {systemtag}'), $parsedParameters); } } else if ($event->getSubject() === self::DELETE_TAG) { if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You deleted system tag %1$s', [ - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You deleted system tag {systemtag}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s deleted system tag %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} deleted system tag {systemtag}'), $parsedParameters); } } else if ($event->getSubject() === self::UPDATE_TAG) { if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You updated system tag %2$s to %1$s', [ - $this->generatePlainSystemTag($parsedParameters['newsystemtag']), - $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), - ])) + $this->generatePlainSystemTag($parsedParameters['newsystemtag']), + $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), + ])) ->setRichSubject($this->l->t('You updated system tag {oldsystemtag} to {newsystemtag}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s updated system tag %3$s to %2$s', [ - $parsedParameters['actor']['name'], - $this->generatePlainSystemTag($parsedParameters['newsystemtag']), - $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), - ])) + $parsedParameters['actor']['name'], + $this->generatePlainSystemTag($parsedParameters['newsystemtag']), + $this->generatePlainSystemTag($parsedParameters['oldsystemtag']), + ])) ->setRichSubject($this->l->t('{actor} updated system tag {oldsystemtag} to {newsystemtag}'), $parsedParameters); } } else if ($event->getSubject() === self::ASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { unset($parsedParameters['actor']); $event->setParsedSubject($this->l->t('System tag %2$s was added to %1$s by the system', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('System tag {systemtag} was added to {file} by the system'), $parsedParameters); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You added system tag %2$s to %1$s', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You added system tag {systemtag} to {file}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s added system tag %3$s to %2$s', [ - $parsedParameters['actor']['name'], - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} added system tag {systemtag} to {file}'), $parsedParameters); } } else if ($event->getSubject() === self::UNASSIGN_TAG) { if ($parsedParameters['actor']['id'] === '') { unset($parsedParameters['actor']); $event->setParsedSubject($this->l->t('System tag %2$s was removed from %1$s by the system', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('System tag {systemtag} was removed from {file} by the system'), $parsedParameters); } else if ($parsedParameters['actor']['id'] === $this->activityManager->getCurrentUserId()) { $event->setParsedSubject($this->l->t('You removed system tag %2$s from %1$s', [ - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('You removed system tag {systemtag} from {file}'), $parsedParameters); } else { $event->setParsedSubject($this->l->t('%1$s removed system tag %3$s from %2$s', [ - $parsedParameters['actor']['name'], - $parsedParameters['file']['path'], - $this->generatePlainSystemTag($parsedParameters['systemtag']), - ])) + $parsedParameters['actor']['name'], + $parsedParameters['file']['path'], + $this->generatePlainSystemTag($parsedParameters['systemtag']), + ])) ->setRichSubject($this->l->t('{actor} removed system tag {systemtag} from {file}'), $parsedParameters); } } else { diff --git a/apps/systemtags/tests/Activity/SettingTest.php b/apps/systemtags/tests/Activity/SettingTest.php index 73d75a3d63..170695a066 100644 --- a/apps/systemtags/tests/Activity/SettingTest.php +++ b/apps/systemtags/tests/Activity/SettingTest.php @@ -61,17 +61,17 @@ class SettingTest extends TestCase { public function testCanChangeStream() { $this->assertSame(true, $this->setting->canChangeStream()); - } - - public function testIsDefaultEnabledStream() { + } + + public function testIsDefaultEnabledStream() { $this->assertSame(true, $this->setting->isDefaultEnabledStream()); - } - - public function testCanChangeMail() { + } + + public function testCanChangeMail() { $this->assertSame(true, $this->setting->canChangeMail()); - } - - public function testIsDefaultEnabledMail() { + } + + public function testIsDefaultEnabledMail() { $this->assertSame(false, $this->setting->isDefaultEnabledMail()); } } diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index fbdadf697e..19896be21a 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -304,7 +304,7 @@ class ImageManagerTest extends TestCase { $this->createMock(ISimpleFolder::class), $this->createMock(ISimpleFolder::class), $this->createMock(ISimpleFolder::class) - ]; + ]; foreach ($folders as $index=>$folder) { $folder->expects($this->any()) ->method('getName') diff --git a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php index 2ade2046e7..69df82a43f 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php @@ -125,13 +125,13 @@ class BackupCodesProviderTest extends TestCase { ->willReturn([ 'twofactor_backupcodes', 'mail', - ]); + ]); $this->appManager->expects($this->once()) ->method('getAppInfo') ->with('mail') ->willReturn([ 'two-factor-providers' => [], - ]); + ]); $this->assertFalse($this->provider->isActive($user)); } @@ -145,7 +145,7 @@ class BackupCodesProviderTest extends TestCase { ->willReturn([ 'twofactor_backupcodes', 'twofactor_u2f', - ]); + ]); $this->appManager->expects($this->once()) ->method('getAppInfo') ->with('twofactor_u2f') @@ -153,7 +153,7 @@ class BackupCodesProviderTest extends TestCase { 'two-factor-providers' => [ 'OCA\TwoFactorU2F\Provider\U2FProvider', ], - ]); + ]); $this->assertTrue($this->provider->isActive($user)); } diff --git a/apps/user_ldap/ajax/setConfiguration.php b/apps/user_ldap/ajax/setConfiguration.php index f696c107a4..2f6c318fa2 100644 --- a/apps/user_ldap/ajax/setConfiguration.php +++ b/apps/user_ldap/ajax/setConfiguration.php @@ -36,7 +36,7 @@ $prefix = (string)$_POST['ldap_serverconfig_chooser']; // only legacy checkboxes (Advanced and Expert tab) need to be handled here, // the Wizard-like tabs handle it on their own $chkboxes = ['ldap_configuration_active', 'ldap_override_main_server', - 'ldap_turn_off_cert_check']; + 'ldap_turn_off_cert_check']; foreach($chkboxes as $boxid) { if(!isset($_POST[$boxid])) { $_POST[$boxid] = 0; diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php index 5ec7c15e76..5b837e47b8 100644 --- a/apps/user_ldap/lib/Command/CheckUser.php +++ b/apps/user_ldap/lib/Command/CheckUser.php @@ -70,13 +70,13 @@ class CheckUser extends Command { 'ocName', InputArgument::REQUIRED, 'the user name as used in Nextcloud' - ) + ) ->addOption( 'force', null, InputOption::VALUE_NONE, 'ignores disabled LDAP configuration' - ) + ) ->addOption( 'update', null, diff --git a/apps/user_ldap/lib/Command/DeleteConfig.php b/apps/user_ldap/lib/Command/DeleteConfig.php index d53435ce7c..7739580740 100644 --- a/apps/user_ldap/lib/Command/DeleteConfig.php +++ b/apps/user_ldap/lib/Command/DeleteConfig.php @@ -52,7 +52,7 @@ class DeleteConfig extends Command { 'configID', InputArgument::REQUIRED, 'the configuration ID' - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php index c061948fed..edd4fa71ba 100644 --- a/apps/user_ldap/lib/Command/Search.php +++ b/apps/user_ldap/lib/Command/Search.php @@ -59,27 +59,27 @@ class Search extends Command { 'search', InputArgument::REQUIRED, 'the search string (can be empty)' - ) + ) ->addOption( 'group', null, InputOption::VALUE_NONE, 'searches groups instead of users' - ) + ) ->addOption( 'offset', null, InputOption::VALUE_REQUIRED, 'The offset of the result set. Needs to be a multiple of limit. defaults to 0.', 0 - ) + ) ->addOption( 'limit', null, InputOption::VALUE_REQUIRED, 'limit the results. 0 means no limit, defaults to 15', 15 - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php index e74e9e33c1..a1ddf3a591 100644 --- a/apps/user_ldap/lib/Command/SetConfig.php +++ b/apps/user_ldap/lib/Command/SetConfig.php @@ -45,17 +45,17 @@ class SetConfig extends Command { 'configID', InputArgument::REQUIRED, 'the configuration ID' - ) + ) ->addArgument( 'configKey', InputArgument::REQUIRED, 'the configuration key' - ) + ) ->addArgument( 'configValue', InputArgument::REQUIRED, 'the new configuration value' - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php index 005798c7a0..f4af798d43 100644 --- a/apps/user_ldap/lib/Command/ShowConfig.php +++ b/apps/user_ldap/lib/Command/ShowConfig.php @@ -56,13 +56,13 @@ class ShowConfig extends Command { 'configID', InputArgument::OPTIONAL, 'will show the configuration of the specified id' - ) + ) ->addOption( 'show-password', null, InputOption::VALUE_NONE, 'show ldap bind password' - ) + ) ; } diff --git a/apps/user_ldap/lib/Command/TestConfig.php b/apps/user_ldap/lib/Command/TestConfig.php index 98dd25a108..abab07d92f 100644 --- a/apps/user_ldap/lib/Command/TestConfig.php +++ b/apps/user_ldap/lib/Command/TestConfig.php @@ -44,7 +44,7 @@ class TestConfig extends Command { 'configID', InputArgument::REQUIRED, 'the configuration ID' - ) + ) ; } diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 58afcf9672..14a0e19989 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -365,7 +365,7 @@ class Connection extends LDAPUtility { } foreach(['ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute', - 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute'] + 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute'] as $expertSetting => $effectiveSetting) { $uuidOverride = $this->configuration->$expertSetting; if(!empty($uuidOverride)) { @@ -394,7 +394,7 @@ class Connection extends LDAPUtility { //make sure empty search attributes are saved as simple, empty array $saKeys = ['ldapAttributesForUserSearch', - 'ldapAttributesForGroupSearch']; + 'ldapAttributesForGroupSearch']; foreach($saKeys as $key) { $val = $this->configuration->$key; if(is_array($val) && count($val) === 1 && empty($val[0])) { @@ -423,7 +423,7 @@ class Connection extends LDAPUtility { //options that shall not be empty $options = ['ldapHost', 'ldapPort', 'ldapUserDisplayName', - 'ldapGroupDisplayName', 'ldapLoginFilter']; + 'ldapGroupDisplayName', 'ldapLoginFilter']; foreach($options as $key) { $val = $this->configuration->$key; if(empty($val)) { diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index 11fd0b462d..a55a285dde 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -707,8 +707,8 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD // memberof doesn't support memberuid, so skip it here. if((int)$this->access->connection->hasMemberOfFilterSupport === 1 && (int)$this->access->connection->useMemberOfToDetectMembership === 1 - && strtolower($this->access->connection->ldapGroupMemberAssocAttr) !== 'memberuid' - ) { + && strtolower($this->access->connection->ldapGroupMemberAssocAttr) !== 'memberuid' + ) { $groupDNs = $this->_getGroupDNsFromMemberOf($userDN); if (is_array($groupDNs)) { foreach ($groupDNs as $dn) { diff --git a/apps/user_ldap/lib/LDAPProvider.php b/apps/user_ldap/lib/LDAPProvider.php index 0547ffcffb..31bf2531a9 100644 --- a/apps/user_ldap/lib/LDAPProvider.php +++ b/apps/user_ldap/lib/LDAPProvider.php @@ -65,7 +65,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { $userBackendFound = true; break; } - } + } foreach ($serverContainer->getGroupManager()->getBackends() as $backend){ $this->logger->debug('instance '.get_class($backend).' group backend.', ['app' => 'user_ldap']); if ($backend instanceof IGroupLDAP) { @@ -75,7 +75,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { } } - if (!$userBackendFound or !$groupBackendFound) { + if (!$userBackendFound or !$groupBackendFound) { throw new \Exception('To use the LDAPProvider, user_ldap app must be enabled'); } } diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index f092f44e04..ccd4062170 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -329,7 +329,7 @@ class User { //check for / at the beginning or pattern c:\ resp. c:/ if( '/' !== $path[0] && !(3 < strlen($path) && ctype_alpha($path[0]) - && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2])) + && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2])) ) { $path = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data' ) . '/' . $path; diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 181a58c11b..71000cf88c 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -201,10 +201,10 @@ class Wizard extends LDAPUtility { */ public function countUsersWithAttribute($attr, $existsCheck = false) { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -226,10 +226,10 @@ class Wizard extends LDAPUtility { */ public function detectUserDisplayNameAttribute() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -268,10 +268,10 @@ class Wizard extends LDAPUtility { */ public function detectEmailAttribute() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -315,10 +315,10 @@ class Wizard extends LDAPUtility { */ public function determineAttributes() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -344,10 +344,10 @@ class Wizard extends LDAPUtility { */ private function getUserAttributes() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } $cr = $this->getConnection(); @@ -400,9 +400,9 @@ class Wizard extends LDAPUtility { */ private function determineGroups($dbKey, $confKey, $testMemberOf = true) { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } $cr = $this->getConnection(); @@ -480,9 +480,9 @@ class Wizard extends LDAPUtility { public function determineGroupMemberAssoc() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapGroupFilter', - ])) { + 'ldapPort', + 'ldapGroupFilter', + ])) { return false; } $attribute = $this->detectGroupMemberAssoc(); @@ -502,9 +502,9 @@ class Wizard extends LDAPUtility { */ public function determineGroupObjectClasses() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } $cr = $this->getConnection(); @@ -529,9 +529,9 @@ class Wizard extends LDAPUtility { */ public function determineUserObjectClasses() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } $cr = $this->getConnection(); @@ -540,7 +540,7 @@ class Wizard extends LDAPUtility { } $obclasses = ['inetOrgPerson', 'person', 'organizationalPerson', - 'user', 'posixAccount', '*']; + 'user', 'posixAccount', '*']; $filter = $this->configuration->ldapUserFilter; //if filter is empty, it is probably the first time the wizard is called //then, apply suggestions. @@ -559,9 +559,9 @@ class Wizard extends LDAPUtility { */ public function getGroupFilter() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } //make sure the use display name is set @@ -583,9 +583,9 @@ class Wizard extends LDAPUtility { */ public function getUserListFilter() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - ])) { + 'ldapPort', + 'ldapBase', + ])) { return false; } //make sure the use display name is set @@ -609,10 +609,10 @@ class Wizard extends LDAPUtility { */ public function getUserLoginFilter() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - 'ldapBase', - 'ldapUserFilter', - ])) { + 'ldapPort', + 'ldapBase', + 'ldapUserFilter', + ])) { return false; } @@ -666,7 +666,7 @@ class Wizard extends LDAPUtility { */ public function guessPortAndTLS() { if(!$this->checkRequirements(['ldapHost', - ])) { + ])) { return false; } $this->checkHost(); @@ -719,8 +719,8 @@ class Wizard extends LDAPUtility { */ public function guessBaseDN() { if(!$this->checkRequirements(['ldapHost', - 'ldapPort', - ])) { + 'ldapPort', + ])) { return false; } @@ -1318,13 +1318,13 @@ class Wizard extends LDAPUtility { */ private function getDefaultLdapPortSettings() { static $settings = [ - ['port' => 7636, 'tls' => false], - ['port' => 636, 'tls' => false], - ['port' => 7389, 'tls' => true], - ['port' => 389, 'tls' => true], - ['port' => 7389, 'tls' => false], - ['port' => 389, 'tls' => false], - ]; + ['port' => 7636, 'tls' => false], + ['port' => 636, 'tls' => false], + ['port' => 7389, 'tls' => true], + ['port' => 389, 'tls' => true], + ['port' => 7389, 'tls' => false], + ['port' => 389, 'tls' => false], + ]; return $settings; } @@ -1352,7 +1352,7 @@ class Wizard extends LDAPUtility { //default ports $portSettings = array_merge($portSettings, - $this->getDefaultLdapPortSettings()); + $this->getDefaultLdapPortSettings()); return $portSettings; } diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index 45c01e4b0f..fee92a523c 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -53,7 +53,7 @@ class ConfigurationTest extends \Test\TestCase { ' ', '', ' whats my name', - ' ' + ' ' ]; $expectedNames = ['uid', 'cn', 'whats my name']; diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php index 7c62a20165..385d2c2961 100644 --- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php +++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php @@ -175,8 +175,8 @@ class ExceptionOnLostConnection { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_HTTPHEADER, [ - 'Content-Type: application/json', - 'Content-Length: ' . strlen($postData)] + 'Content-Type: application/json', + 'Content-Length: ' . strlen($postData)] ); $recvd = curl_exec($ch); $this->checkCurlResult($ch, $recvd); diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php index 71e0865489..4433ed08ba 100644 --- a/apps/user_ldap/tests/LDAPProviderTest.php +++ b/apps/user_ldap/tests/LDAPProviderTest.php @@ -58,8 +58,8 @@ class LDAPProviderTest extends \Test\TestCase { ->setConstructorArgs(['', new \OC\Config(\OC::$configDir)]) ->getMock(); $server->expects($this->at(1)) - ->method('getBackends') - ->willReturn([$userBackend]); + ->method('getBackends') + ->willReturn([$userBackend]); $server->expects($this->any()) ->method('getUserManager') ->willReturn($this->getUserManagerMock($userBackend)); @@ -67,8 +67,8 @@ class LDAPProviderTest extends \Test\TestCase { ->method('getGroupManager') ->willReturn($this->getGroupManagerMock($groupBackend)); $server->expects($this->any()) - ->method($this->anything()) - ->willReturnSelf(); + ->method($this->anything()) + ->willReturnSelf(); return $server; } @@ -135,14 +135,14 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->at(0)) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->at(2)) - ->method('username2dn') - ->willReturn('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org'); + ->method('username2dn') + ->willReturn('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org'); $userBackend->expects($this->any()) - ->method($this->anything()) - ->willReturnSelf(); + ->method($this->anything()) + ->willReturnSelf(); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -207,8 +207,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('dn2UserName') - ->willReturn('existing_user'); + ->method('dn2UserName') + ->willReturn('existing_user'); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -272,11 +272,11 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->any()) - ->method('getNewLDAPConnection') - ->willReturn(true); + ->method('getNewLDAPConnection') + ->willReturn(true); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -381,8 +381,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->atLeastOnce()) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->any()) ->method('getLDAPAccess') ->willReturn($access); @@ -437,8 +437,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->any()) ->method('getLDAPAccess') ->willReturn($access); @@ -472,14 +472,14 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->at(0)) - ->method('userExists') - ->willReturn(true); + ->method('userExists') + ->willReturn(true); $userBackend->expects($this->at(3)) - ->method('clearCache') - ->willReturn(true); + ->method('clearCache') + ->willReturn(true); $userBackend->expects($this->any()) - ->method($this->anything()) - ->willReturnSelf(); + ->method($this->anything()) + ->willReturnSelf(); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); @@ -539,8 +539,8 @@ class LDAPProviderTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $userBackend->expects($this->any()) - ->method('dn2UserName') - ->willReturn('existing_user'); + ->method('dn2UserName') + ->willReturn('existing_user'); $server = $this->getServerMock($userBackend, $this->getDefaultGroupBackendMock()); diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index 4a7fbb6bba..d3a988a06b 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -49,7 +49,7 @@ class WizardTest extends TestCase { //we need to make sure the consts are defined, otherwise tests will fail //on systems without php5_ldap $ldapConsts = ['LDAP_OPT_PROTOCOL_VERSION', - 'LDAP_OPT_REFERRALS', 'LDAP_OPT_NETWORK_TIMEOUT']; + 'LDAP_OPT_REFERRALS', 'LDAP_OPT_NETWORK_TIMEOUT']; foreach($ldapConsts as $const) { if(!defined($const)) { define($const, 42); diff --git a/composer.json b/composer.json index fae1c7a221..a4c5c410d3 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,6 @@ "scripts": { "cs:fix": "php-cs-fixer fix", "cs:check": "php-cs-fixer fix --dry-run", - "lint": "find . -name \\*.php -not -path './lib/composer/*' -exec php -l \"{}\" \\;" + "lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/.phan/*' -exec php -l \"{}\" \\;" } } diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index b5d34c3ccb..34280c6094 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -282,8 +282,8 @@ class AvatarController extends Controller { $tmpAvatar = $this->cache->get('tmpAvatar'); if (is_null($tmpAvatar)) { return new JSONResponse(['data' => [ - 'message' => $this->l->t("No temporary profile picture available, try again") - ]], + 'message' => $this->l->t("No temporary profile picture available, try again") + ]], Http::STATUS_NOT_FOUND); } @@ -320,8 +320,8 @@ class AvatarController extends Controller { $tmpAvatar = $this->cache->get('tmpAvatar'); if (is_null($tmpAvatar)) { return new JSONResponse(['data' => [ - 'message' => $this->l->t("No temporary profile picture available, try again") - ]], + 'message' => $this->l->t("No temporary profile picture available, try again") + ]], Http::STATUS_BAD_REQUEST); } diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index a210f3de54..d7d9bc4c15 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -159,8 +159,8 @@ class LostController extends Controller { public function resetform($token, $userId) { if ($this->config->getSystemValue('lost_password_link', '') !== '') { return new TemplateResponse('core', 'error', [ - 'errors' => [['error' => $this->l10n->t('Password reset is disabled')]] - ], + 'errors' => [['error' => $this->l10n->t('Password reset is disabled')]] + ], 'guest' ); } diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php index 890e0b186d..5946eb7840 100644 --- a/core/templates/loginflow/authpicker.php +++ b/core/templates/loginflow/authpicker.php @@ -31,9 +31,9 @@ $urlGenerator = $_['urlGenerator'];

t('Connect to your account')) ?>

t('Please log in before granting %1$s access to your %2$s account.', [ - '' . \OCP\Util::sanitizeHTML($_['client']) . '', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '' . \OCP\Util::sanitizeHTML($_['client']) . '', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?>


diff --git a/core/templates/loginflow/grant.php b/core/templates/loginflow/grant.php index 2321d3714f..0f1b9235a8 100644 --- a/core/templates/loginflow/grant.php +++ b/core/templates/loginflow/grant.php @@ -31,9 +31,9 @@ $urlGenerator = $_['urlGenerator'];

t('Account access')) ?>

t('You are about to grant %1$s access to your %2$s account.', [ - '' . \OCP\Util::sanitizeHTML($_['client']) . '', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '' . \OCP\Util::sanitizeHTML($_['client']) . '', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?>


diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php index 79462eec8d..ccc9162bbc 100644 --- a/core/templates/loginflowv2/authpicker.php +++ b/core/templates/loginflowv2/authpicker.php @@ -30,9 +30,9 @@ $urlGenerator = $_['urlGenerator'];

t('Connect to your account')) ?>

t('Please log in before granting %1$s access to your %2$s account.', [ - '' . \OCP\Util::sanitizeHTML($_['client']) . '', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '' . \OCP\Util::sanitizeHTML($_['client']) . '', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?>


diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php index c8ea22dca8..b036d33ad7 100644 --- a/core/templates/loginflowv2/grant.php +++ b/core/templates/loginflowv2/grant.php @@ -31,9 +31,9 @@ $urlGenerator = $_['urlGenerator'];

t('Account access')) ?>

t('You are about to grant %1$s access to your %2$s account.', [ - '' . \OCP\Util::sanitizeHTML($_['client']) . '', - \OCP\Util::sanitizeHTML($_['instanceName']) - ])) ?> + '' . \OCP\Util::sanitizeHTML($_['client']) . '', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?>


diff --git a/lib/private/AppFramework/Http.php b/lib/private/AppFramework/Http.php index 56503ce959..91d13b9e23 100644 --- a/lib/private/AppFramework/Http.php +++ b/lib/private/AppFramework/Http.php @@ -118,7 +118,7 @@ class Http extends BaseHttp { * @return string */ public function getStatusHeader($status, \DateTime $lastModified=null, - $ETag=null) { + $ETag=null) { if(!is_null($lastModified)) { $lastModified = $lastModified->format(\DateTime::RFC2822); diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php index d52163246c..fe0f58c1ab 100644 --- a/lib/private/AppFramework/Middleware/OCSMiddleware.php +++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php @@ -101,7 +101,7 @@ class OCSMiddleware extends Middleware { */ if ($controller instanceof OCSController && !($response instanceof BaseResponse)) { if ($response->getStatus() === Http::STATUS_UNAUTHORIZED || - $response->getStatus() === Http::STATUS_FORBIDDEN) { + $response->getStatus() === Http::STATUS_FORBIDDEN) { $message = ''; if ($response instanceof JSONResponse) { diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index 16f1fb35a8..0ae2d37b37 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -212,7 +212,7 @@ class SecurityMiddleware extends Middleware { if($exception instanceof SecurityException) { if($exception instanceof StrictCookieMissingException) { return new RedirectResponse(\OC::$WEBROOT); - } + } if (stripos($this->request->getHeader('Accept'),'html') === false) { $response = new JSONResponse( ['message' => $exception->getMessage()], diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index 170048f451..1cde13ef27 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -198,8 +198,8 @@ class Manager { $missing[] = $providerId; $this->logger->alert("two-factor auth provider '$providerId' failed to load", [ - 'app' => 'core', - ]); + 'app' => 'core', + ]); } } diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index 3b4a523b88..a45b1e05cf 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -300,8 +300,8 @@ class Comment implements IComment { */ public function setActor($actorType, $actorId) { if( - !is_string($actorType) || !trim($actorType) - || !is_string($actorId) || $actorId === '' + !is_string($actorType) || !trim($actorType) + || !is_string($actorId) || $actorId === '' ) { throw new \InvalidArgumentException('String expected.'); } @@ -386,8 +386,8 @@ class Comment implements IComment { */ public function setObject($objectType, $objectId) { if( - !is_string($objectType) || !trim($objectType) - || !is_string($objectId) || trim($objectId) === '' + !is_string($objectType) || !trim($objectType) + || !is_string($objectId) || trim($objectId) === '' ) { throw new \InvalidArgumentException('String expected.'); } diff --git a/lib/private/DB/MySQLMigrator.php b/lib/private/DB/MySQLMigrator.php index e178cfb55d..fe56a9563e 100644 --- a/lib/private/DB/MySQLMigrator.php +++ b/lib/private/DB/MySQLMigrator.php @@ -53,25 +53,25 @@ class MySQLMigrator extends Migrator { return $schemaDiff; } - /** - * Speed up migration test by disabling autocommit and unique indexes check - * - * @param \Doctrine\DBAL\Schema\Table $table - * @throws \OC\DB\MigrationException - */ - protected function checkTableMigrate(Table $table) { - $this->connection->exec('SET autocommit=0'); - $this->connection->exec('SET unique_checks=0'); + /** + * Speed up migration test by disabling autocommit and unique indexes check + * + * @param \Doctrine\DBAL\Schema\Table $table + * @throws \OC\DB\MigrationException + */ + protected function checkTableMigrate(Table $table) { + $this->connection->exec('SET autocommit=0'); + $this->connection->exec('SET unique_checks=0'); - try { - parent::checkTableMigrate($table); - } catch (\Exception $e) { - $this->connection->exec('SET unique_checks=1'); - $this->connection->exec('SET autocommit=1'); - throw new MigrationException($table->getName(), $e->getMessage()); - } - $this->connection->exec('SET unique_checks=1'); - $this->connection->exec('SET autocommit=1'); - } + try { + parent::checkTableMigrate($table); + } catch (\Exception $e) { + $this->connection->exec('SET unique_checks=1'); + $this->connection->exec('SET autocommit=1'); + throw new MigrationException($table->getName(), $e->getMessage()); + } + $this->connection->exec('SET unique_checks=1'); + $this->connection->exec('SET autocommit=1'); + } } diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 8afd2c4aed..48b0146153 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -62,14 +62,14 @@ use OCP\IDBConnection; */ class Database extends ABackend implements IAddToGroupBackend, - ICountDisabledInGroup, - ICountUsersBackend, - ICreateGroupBackend, - IDeleteGroupBackend, - IGetDisplayNameBackend, - IGroupDetailsBackend, - IRemoveFromGroupBackend, - ISetDisplayNameBackend { + ICountDisabledInGroup, + ICountUsersBackend, + ICreateGroupBackend, + IDeleteGroupBackend, + IGetDisplayNameBackend, + IGroupDetailsBackend, + IRemoveFromGroupBackend, + ISetDisplayNameBackend { /** @var string[] */ private $groupCache = []; diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php index 97d71b51f9..3a2c08b087 100644 --- a/lib/private/Group/MetaData.php +++ b/lib/private/Group/MetaData.php @@ -165,13 +165,13 @@ class MetaData { */ private function generateGroupMetaData(\OCP\IGroup $group, $userSearch) { return [ - 'id' => $group->getGID(), - 'name' => $group->getDisplayName(), - 'usercount' => $this->sorting === self::SORT_USERCOUNT ? $group->count($userSearch) : 0, - 'disabled' => $group->countDisabled(), - 'canAdd' => $group->canAddUser(), - 'canRemove' => $group->canRemoveUser(), - ]; + 'id' => $group->getGID(), + 'name' => $group->getDisplayName(), + 'usercount' => $this->sorting === self::SORT_USERCOUNT ? $group->count($userSearch) : 0, + 'disabled' => $group->countDisabled(), + 'canAdd' => $group->canAddUser(), + 'canRemove' => $group->canRemoveUser(), + ]; } /** diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php index 57a80e6f4b..725d72d9c7 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -239,10 +239,10 @@ class Checker { $signature = $privateKey->sign(json_encode($hashes)); return [ - 'hashes' => $hashes, - 'signature' => base64_encode($signature), - 'certificate' => $certificate->saveX509($certificate->currentCert), - ]; + 'hashes' => $hashes, + 'signature' => base64_encode($signature), + 'certificate' => $certificate->saveX509($certificate->currentCert), + ]; } /** @@ -509,10 +509,10 @@ class Checker { ); } catch (\Exception $e) { $result = [ - 'EXCEPTION' => [ - 'class' => \get_class($e), - 'message' => $e->getMessage(), - ], + 'EXCEPTION' => [ + 'class' => \get_class($e), + 'message' => $e->getMessage(), + ], ]; } $this->storeResults($appId, $result); @@ -559,10 +559,10 @@ class Checker { ); } catch (\Exception $e) { $result = [ - 'EXCEPTION' => [ - 'class' => \get_class($e), - 'message' => $e->getMessage(), - ], + 'EXCEPTION' => [ + 'class' => \get_class($e), + 'message' => $e->getMessage(), + ], ]; } $this->storeResults('core', $result); diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index bb597460f9..4ee8518981 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -330,9 +330,9 @@ class Generator { } /* - * Make sure the requested height and width fall within the max - * of the preview. - */ + * Make sure the requested height and width fall within the max + * of the preview. + */ if ($height > $maxHeight) { $ratio = $height / $maxHeight; $height = $maxHeight; diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php index 473e56cdd5..451d5074b6 100644 --- a/lib/private/Security/TrustedDomainHelper.php +++ b/lib/private/Security/TrustedDomainHelper.php @@ -99,9 +99,9 @@ class TrustedDomainHelper { } $regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/i'; if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) { - return true; - } - } - return false; + return true; + } + } + return false; } } diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index 2bc2afbea2..bd53c0307a 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -1359,7 +1359,7 @@ class Share extends Constants { $select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `item_target`,' . '`*PREFIX*share`.`parent`, `share_type`, `share_with`, `uid_owner`,' . '`file_source`, `path`, `file_target`, `*PREFIX*share`.`permissions`,' - . '`stime`, `expiration`, `token`, `storage`, `mail_send`,' + . '`stime`, `expiration`, `token`, `storage`, `mail_send`,' . '`*PREFIX*storages`.`id` AS `storage_id`, `*PREFIX*filecache`.`parent` as `file_parent`'; } } diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 065d06de37..2eda7295c1 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -838,7 +838,7 @@ class DefaultShareProvider implements IShareProvider { $pathSections = explode('/', $data['path'], 2); // FIXME: would not detect rare md5'd home storage case properly if ($pathSections[0] !== 'files' - && in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) { + && in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) { return false; } return true; @@ -961,8 +961,8 @@ class DefaultShareProvider implements IShareProvider { } /* - * Resolve all group shares to user specific shares - */ + * Resolve all group shares to user specific shares + */ $shares = $this->resolveGroupShares($shares2, $userId); } else { throw new BackendError('Invalid backend'); diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 4e1f6567e6..2a25ed92d1 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -932,7 +932,7 @@ class Manager implements IManager { // We can only change the recipient on user shares if ($share->getSharedWith() !== $originalShare->getSharedWith() && - $share->getShareType() !== \OCP\Share::SHARE_TYPE_USER) { + $share->getShareType() !== \OCP\Share::SHARE_TYPE_USER) { throw new \InvalidArgumentException('Can only update recipient on user shares'); } diff --git a/lib/private/SubAdmin.php b/lib/private/SubAdmin.php index ce2a38ccbf..05d23bee58 100644 --- a/lib/private/SubAdmin.php +++ b/lib/private/SubAdmin.php @@ -54,7 +54,7 @@ class SubAdmin extends PublicEmitter implements ISubAdmin { * @param IDBConnection $dbConn */ public function __construct(IUserManager $userManager, - IGroupManager $groupManager, + IGroupManager $groupManager, IDBConnection $dbConn) { $this->userManager = $userManager; $this->groupManager = $groupManager; diff --git a/lib/private/Tagging/Tag.php b/lib/private/Tagging/Tag.php index 971b2da053..e82860c1d3 100644 --- a/lib/private/Tagging/Tag.php +++ b/lib/private/Tagging/Tag.php @@ -65,11 +65,11 @@ class Tag extends Entity { */ public function columnToProperty($columnName){ if ($columnName === 'category') { - return 'name'; + return 'name'; } elseif ($columnName === 'uid') { - return 'owner'; + return 'owner'; } else { - return parent::columnToProperty($columnName); + return parent::columnToProperty($columnName); } } @@ -81,11 +81,11 @@ class Tag extends Entity { */ public function propertyToColumn($property){ if ($property === 'name') { - return 'category'; + return 'category'; } elseif ($property === 'owner') { - return 'uid'; + return 'uid'; } else { - return parent::propertyToColumn($property); + return parent::propertyToColumn($property); } } } diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 6a174748a3..15b225b2ff 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -504,7 +504,7 @@ class Tags implements ITags { 'objid' => $relation['objid'], 'categoryid' => $tagId, 'type' => $this->type, - ]); + ]); } catch(\Exception $e) { \OC::$server->getLogger()->logException($e, [ 'message' => __METHOD__, diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 856959a459..c89d3ce369 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -78,13 +78,13 @@ use OCP\User\Backend\ISetPasswordBackend; */ class Database extends ABackend implements ICreateUserBackend, - ISetPasswordBackend, - ISetDisplayNameBackend, - IGetDisplayNameBackend, - ICheckPasswordBackend, - IGetHomeBackend, - ICountUsersBackend, - IGetRealUIDBackend { + ISetPasswordBackend, + ISetDisplayNameBackend, + IGetDisplayNameBackend, + ICheckPasswordBackend, + IGetHomeBackend, + ICountUsersBackend, + IGetRealUIDBackend { /** @var CappedMemoryCache */ private $cache; diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php index 73443adb03..d5a4b5eece 100644 --- a/lib/private/legacy/OC_Defaults.php +++ b/lib/private/legacy/OC_Defaults.php @@ -322,7 +322,7 @@ class OC_Defaults { } else { $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo/logo.png'); } - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); + return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); } public function getTextColorPrimary() { diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php index 249d3e5154..72983f50d9 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -84,19 +84,19 @@ class OC_Files { $type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename)); if ($fileSize > -1) { if (!empty($rangeArray)) { - http_response_code(206); - header('Accept-Ranges: bytes', true); - if (count($rangeArray) > 1) { + http_response_code(206); + header('Accept-Ranges: bytes', true); + if (count($rangeArray) > 1) { $type = 'multipart/byteranges; boundary='.self::getBoundary(); // no Content-Length header here - } - else { + } + else { header(sprintf('Content-Range: bytes %d-%d/%d', $rangeArray[0]['from'], $rangeArray[0]['to'], $fileSize), true); OC_Response::setContentLengthHeader($rangeArray[0]['to'] - $rangeArray[0]['from'] + 1); - } + } } else { - OC_Response::setContentLengthHeader($fileSize); + OC_Response::setContentLengthHeader($fileSize); } } header('Content-Type: '.$type, true); @@ -329,10 +329,10 @@ class OC_Files { if (!empty($rangeArray)) { try { - if (count($rangeArray) == 1) { + if (count($rangeArray) == 1) { $view->readfilePart($filename, $rangeArray[0]['from'], $rangeArray[0]['to']); - } - else { + } + else { // check if file is seekable (if not throw UnseekableException) // we have to check it before body contents $view->readfilePart($filename, $rangeArray[0]['size'], $rangeArray[0]['size']); @@ -340,24 +340,24 @@ class OC_Files { $type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename)); foreach ($rangeArray as $range) { - echo "\r\n--".self::getBoundary()."\r\n". - "Content-type: ".$type."\r\n". - "Content-range: bytes ".$range['from']."-".$range['to']."/".$range['size']."\r\n\r\n"; - $view->readfilePart($filename, $range['from'], $range['to']); + echo "\r\n--".self::getBoundary()."\r\n". + "Content-type: ".$type."\r\n". + "Content-range: bytes ".$range['from']."-".$range['to']."/".$range['size']."\r\n\r\n"; + $view->readfilePart($filename, $range['from'], $range['to']); } echo "\r\n--".self::getBoundary()."--\r\n"; - } + } } catch (\OCP\Files\UnseekableException $ex) { - // file is unseekable - header_remove('Accept-Ranges'); - header_remove('Content-Range'); - http_response_code(200); - self::sendHeaders($filename, $name, []); - $view->readfile($filename); + // file is unseekable + header_remove('Accept-Ranges'); + header_remove('Content-Range'); + http_response_code(200); + self::sendHeaders($filename, $name, []); + $view->readfile($filename); } } else { - $view->readfile($filename); + $view->readfile($filename); } } diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php index 2918dd4282..3cc29a58c7 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -71,8 +71,8 @@ class OC_Hook { } // Connect the hook handler to the requested emitter self::$registered[$signalClass][$signalName][] = [ - "class" => $slotClass, - "name" => $slotName + "class" => $slotClass, + "name" => $slotName ]; // No chance for failure ;-) diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index 2ebe219444..e8ecf61c92 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -39,60 +39,60 @@ use OCP\IRequest; */ abstract class ApiController extends Controller { - private $corsMethods; - private $corsAllowedHeaders; - private $corsMaxAge; + private $corsMethods; + private $corsAllowedHeaders; + private $corsMaxAge; - /** - * constructor of the controller - * @param string $appName the name of the app - * @param IRequest $request an instance of the request - * @param string $corsMethods comma separated string of HTTP verbs which - * should be allowed for websites or webapps when calling your API, defaults to - * 'PUT, POST, GET, DELETE, PATCH' - * @param string $corsAllowedHeaders comma separated string of HTTP headers - * which should be allowed for websites or webapps when calling your API, - * defaults to 'Authorization, Content-Type, Accept' - * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS - * request should be cached, defaults to 1728000 seconds - * @since 7.0.0 - */ - public function __construct($appName, - IRequest $request, - $corsMethods='PUT, POST, GET, DELETE, PATCH', - $corsAllowedHeaders='Authorization, Content-Type, Accept', - $corsMaxAge=1728000){ - parent::__construct($appName, $request); - $this->corsMethods = $corsMethods; - $this->corsAllowedHeaders = $corsAllowedHeaders; - $this->corsMaxAge = $corsMaxAge; - } + /** + * constructor of the controller + * @param string $appName the name of the app + * @param IRequest $request an instance of the request + * @param string $corsMethods comma separated string of HTTP verbs which + * should be allowed for websites or webapps when calling your API, defaults to + * 'PUT, POST, GET, DELETE, PATCH' + * @param string $corsAllowedHeaders comma separated string of HTTP headers + * which should be allowed for websites or webapps when calling your API, + * defaults to 'Authorization, Content-Type, Accept' + * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS + * request should be cached, defaults to 1728000 seconds + * @since 7.0.0 + */ + public function __construct($appName, + IRequest $request, + $corsMethods='PUT, POST, GET, DELETE, PATCH', + $corsAllowedHeaders='Authorization, Content-Type, Accept', + $corsMaxAge=1728000){ + parent::__construct($appName, $request); + $this->corsMethods = $corsMethods; + $this->corsAllowedHeaders = $corsAllowedHeaders; + $this->corsMaxAge = $corsMaxAge; + } - /** - * This method implements a preflighted cors response for you that you can - * link to for the options request - * - * @NoAdminRequired - * @NoCSRFRequired - * @PublicPage - * @since 7.0.0 - */ - public function preflightedCors() { - if(isset($this->request->server['HTTP_ORIGIN'])) { - $origin = $this->request->server['HTTP_ORIGIN']; - } else { - $origin = '*'; - } + /** + * This method implements a preflighted cors response for you that you can + * link to for the options request + * + * @NoAdminRequired + * @NoCSRFRequired + * @PublicPage + * @since 7.0.0 + */ + public function preflightedCors() { + if(isset($this->request->server['HTTP_ORIGIN'])) { + $origin = $this->request->server['HTTP_ORIGIN']; + } else { + $origin = '*'; + } - $response = new Response(); - $response->addHeader('Access-Control-Allow-Origin', $origin); - $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); - $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); - $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); - $response->addHeader('Access-Control-Allow-Credentials', 'false'); - return $response; - } + $response = new Response(); + $response->addHeader('Access-Control-Allow-Origin', $origin); + $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); + $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); + $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); + $response->addHeader('Access-Control-Allow-Credentials', 'false'); + return $response; + } } diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index 2e442c4976..487b6a854f 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -73,7 +73,7 @@ abstract class Controller { * @since 6.0.0 - parameter $appName was added in 7.0.0 - parameter $app was removed in 7.0.0 */ public function __construct($appName, - IRequest $request) { + IRequest $request) { $this->appName = $appName; $this->request = $request; diff --git a/lib/public/AppFramework/Http/DataDisplayResponse.php b/lib/public/AppFramework/Http/DataDisplayResponse.php index 512e52ee9f..4b31bc7dc0 100644 --- a/lib/public/AppFramework/Http/DataDisplayResponse.php +++ b/lib/public/AppFramework/Http/DataDisplayResponse.php @@ -48,7 +48,7 @@ class DataDisplayResponse extends Response { * @since 8.1.0 */ public function __construct($data='', $statusCode=Http::STATUS_OK, - $headers=[]) { + $headers=[]) { parent::__construct(); $this->data = $data; diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php index 700fe1f418..7efbb58d8c 100644 --- a/lib/public/AppFramework/Http/DataResponse.php +++ b/lib/public/AppFramework/Http/DataResponse.php @@ -53,7 +53,7 @@ class DataResponse extends Response { * @since 8.0.0 */ public function __construct($data=[], $statusCode=Http::STATUS_OK, - array $headers=[]) { + array $headers=[]) { parent::__construct(); $this->data = $data; diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 2fc985aabf..0aacc2f3a5 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -198,8 +198,8 @@ class Response { */ public function addHeader($name, $value) { $name = trim($name); // always remove leading and trailing whitespace - // to be able to reliably check for security - // headers + // to be able to reliably check for security + // headers if(is_null($value)) { unset($this->headers[$name]); diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php index 4a77d4844e..99219d6eb0 100644 --- a/lib/public/AppFramework/Http/TemplateResponse.php +++ b/lib/public/AppFramework/Http/TemplateResponse.php @@ -77,7 +77,7 @@ class TemplateResponse extends Response { * @since 6.0.0 - parameters $params and $renderAs were added in 7.0.0 */ public function __construct($appName, $templateName, array $params=[], - $renderAs='user') { + $renderAs='user') { parent::__construct(); $this->templateName = $templateName; diff --git a/lib/public/Share.php b/lib/public/Share.php index 25e255f35b..622a671892 100644 --- a/lib/public/Share.php +++ b/lib/public/Share.php @@ -121,7 +121,7 @@ class Share extends \OC\Share\Constants { * @deprecated 17.0.0 */ public static function getItemShared($itemType, $itemSource, $format = self::FORMAT_NONE, - $parameters = null, $includeCollections = false) { + $parameters = null, $includeCollections = false) { return \OC\Share\Share::getItemShared($itemType, $itemSource, $format, $parameters, $includeCollections); } diff --git a/tests/Core/Controller/CSRFTokenControllerTest.php b/tests/Core/Controller/CSRFTokenControllerTest.php index a02f84832e..88e54ee864 100644 --- a/tests/Core/Controller/CSRFTokenControllerTest.php +++ b/tests/Core/Controller/CSRFTokenControllerTest.php @@ -67,7 +67,7 @@ class CSRFTokenControllerTest extends TestCase { $this->assertSame(Http::STATUS_OK, $response->getStatus()); $this->assertEquals([ 'token' => 'toktok123' - ], $response->getData()); + ], $response->getData()); } public function testGetTokenNoStrictSameSiteCookie(): void { diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index c1177d84e1..4b2511b9ab 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -322,9 +322,9 @@ class LoginControllerTest extends TestCase { ->expects($this->exactly(2)) ->method('getSystemValue') ->willReturnMap([ - ['login_form_autocomplete', true, true], - ['lost_password_link', '', false], - ]); + ['login_form_autocomplete', true, true], + ['lost_password_link', '', false], + ]); $user = $this->createMock(IUser::class); $user ->expects($this->once()) @@ -370,9 +370,9 @@ class LoginControllerTest extends TestCase { ->expects($this->exactly(2)) ->method('getSystemValue') ->willReturnMap([ - ['login_form_autocomplete', true, true], - ['lost_password_link', '', false], - ]); + ['login_form_autocomplete', true, true], + ['lost_password_link', '', false], + ]); $user = $this->createMock(IUser::class); $user->expects($this->once()) ->method('canChangePassword') diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index 750547473b..4c41694700 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -695,7 +695,7 @@ class LostControllerTest extends \Test\TestCase { $expectedResponse = [ 'status' => 'error', 'msg' => 'Couldn\'t reset password because the token is invalid' - ]; + ]; $this->assertSame($expectedResponse, $response); } @@ -734,7 +734,7 @@ class LostControllerTest extends \Test\TestCase { $expectedResponse = [ 'status' => 'error', 'msg' => 'Couldn\'t reset password because the token is invalid' - ]; + ]; $this->assertSame($expectedResponse, $response); } diff --git a/tests/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php index 32b0191618..6a816d7f36 100644 --- a/tests/acceptance/features/bootstrap/FilesAppContext.php +++ b/tests/acceptance/features/bootstrap/FilesAppContext.php @@ -33,13 +33,13 @@ class FilesAppContext implements Context, ActorAwareInterface { */ public static function sections() { return [ "All files" => "files", - "Recent" => "recent", - "Favorites" => "favorites", - "Shared with you" => "sharingin", - "Shared with others" => "sharingout", - "Shared by link" => "sharinglinks", - "Tags" => "systemtagsfilter", - "Deleted files" => "trashbin" ]; + "Recent" => "recent", + "Favorites" => "favorites", + "Shared with you" => "sharingin", + "Shared with others" => "sharingout", + "Shared by link" => "sharinglinks", + "Tags" => "systemtagsfilter", + "Deleted files" => "trashbin" ]; } /** diff --git a/tests/acceptance/features/bootstrap/ThemingAppContext.php b/tests/acceptance/features/bootstrap/ThemingAppContext.php index 4791a70e81..79d140b269 100644 --- a/tests/acceptance/features/bootstrap/ThemingAppContext.php +++ b/tests/acceptance/features/bootstrap/ThemingAppContext.php @@ -97,7 +97,7 @@ class ThemingAppContext implements Context, ActorAwareInterface { $colorSelectorValue = $this->getRGBArray($actor->getSession()->evaluateScript("return $('#theming-color')[0].value;")); $inputBgColor = $this->getRGBArray($actor->getSession()->evaluateScript("return $('#theming-color').css('background-color');")); if ($colorSelectorValue == $inputBgColor) { - return true; + return true; } return false; @@ -109,19 +109,19 @@ class ThemingAppContext implements Context, ActorAwareInterface { } private function getRGBArray ($color) { - if (preg_match("/rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)/", $color, $matches)) { + if (preg_match("/rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\)/", $color, $matches)) { // Already an RGB (R, G, B) color // Convert from "rgb(R, G, B)" string to RGB array $tmpColor = array_splice($matches, 1); - } else if ($color[0] === '#') { + } else if ($color[0] === '#') { $color = substr($color, 1); // HEX Color, convert to RGB array. $tmpColor = sscanf($color, "%02X%02X%02X"); - } else { + } else { PHPUnit_Framework_Assert::fail("The acceptance test does not know how to handle the color string : '$color'. " . "Please provide # before HEX colors in your features."); - } - return $tmpColor; + } + return $tmpColor; } /** diff --git a/tests/lib/Accounts/AccountsManagerTest.php b/tests/lib/Accounts/AccountsManagerTest.php index 958b6fd473..78f8503123 100644 --- a/tests/lib/Accounts/AccountsManagerTest.php +++ b/tests/lib/Accounts/AccountsManagerTest.php @@ -166,7 +166,7 @@ class AccountsManagerTest extends TestCase { if(empty($expectedData)) { $accountManager->expects($this->never())->method('addMissingDefaultValues'); - } else { + } else { $accountManager->expects($this->once())->method('addMissingDefaultValues')->with($expectedData) ->willReturn($expectedData); } diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php index 9e30977e29..c0e2878de3 100644 --- a/tests/lib/AllConfigTest.php +++ b/tests/lib/AllConfigTest.php @@ -308,11 +308,11 @@ class AllConfigTest extends \Test\TestCase { $value = $config->getUserValueForUsers('appFetch2', 'keyFetch1', ['userFetch1', 'userFetch2', 'userFetch3', 'userFetch5']); $this->assertEquals([ - 'userFetch1' => 'value1', - 'userFetch2' => 'value2', - 'userFetch3' => 3, - 'userFetch5' => 'value5' - ], $value); + 'userFetch1' => 'value1', + 'userFetch2' => 'value2', + 'userFetch3' => 3, + 'userFetch5' => 'value5' + ], $value); $value = $config->getUserValueForUsers('appFetch2', 'keyFetch1', ['userFetch1', 'userFetch4', 'userFetch9']); diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index f18c24f2f6..a381175b0a 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -60,48 +60,48 @@ EOD; static $expectedResponse = [ 'data' => [ - 0 => - [ - 'id' => 'direct_menu', - 'categories' => - [ - 0 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-06T14:01:05.643813Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'ERBS9G5bZ3vwCizz2Ht5DehsVJmb63bzF3aYcH7xjbDVMPagOFWdUAiLDwTeZR1n + 0 => + [ + 'id' => 'direct_menu', + 'categories' => + [ + 0 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-06T14:01:05.643813Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'ERBS9G5bZ3vwCizz2Ht5DehsVJmb63bzF3aYcH7xjbDVMPagOFWdUAiLDwTeZR1n i4gdZ73J/IjHQQJoOPwtCjgbZgLPFqL5x13CLUO9mb/33dZe/+gqEDc/3AuJ4TlA XUdLxHRb1bwIlJOwuSr/E24452VG20WUhLXBoM0Zm7WcMxvJWo2zAWnuqnLX3dy9 cPB4PX+6JU2lUMINj8OYQmM1QnqvjG8YV0cYHbBbnSicOGwXEnni7mojsC8T0cn7 @@ -112,42 +112,42 @@ u2SqRhwybS8j4YvfjAL9RPdRfPLwf6X2gx/Y6QFrKHH0QMI/9J/ZFyoUQcqKbsHV bkR1DTBCyDjdpNBidpa3/26675dz5IT5Zedp4BBBREQzX08cIhJx5mgqDdX3CU09 uWtzoaLi71/1BWTFAN+Y9VyfZ8/Z3Pg3vKedRJ565mztIj0geL3riEsC5YnPS0+C +a3B9sDiiOa101EORzX3lrPqL7reEPdCxrIwN+hKFBQ=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - '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' => - [ - 0 => - [ - 'name' => 'Julius Härtl', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + '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' => + [ + 0 => + [ + 'name' => 'Julius Härtl', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEBjCCAu4CAhADMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -171,68 +171,68 @@ e/zxnB1EmeI2X5D2xceJDLB7Fy5W0EGrLixRIdFaSUommWFUm9E2hSIaNlziSBdc G2dF9Gtu4GiQ5fuaJknaxlgXHovfqeZwZJX9o4M+Ug81AqiY7XjdiaCPdh0Tthcx 2OmWZo7UBREWenjKyFZZ/iKoqH5sdenBtpo= -----END CERTIFICATE-----', - ], - 1 => - [ - 'id' => 'apporder', - 'categories' => - [ - 0 => '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' => - [ - 0 => - [ - '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' => - [ - 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' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://bitgrid.net/~jus/apporder-nc.gif', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'AppOrder', - 'summary' => 'Sort apps in the menu with drag and drop', - 'description' => ' + ], + 1 => + [ + 'id' => 'apporder', + 'categories' => + [ + 0 => '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' => + [ + 0 => + [ + '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' => + [ + 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' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://bitgrid.net/~jus/apporder-nc.gif', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'AppOrder', + 'summary' => 'Sort apps in the menu with drag and drop', + 'description' => ' Enable sorting for icons inside the app menu. The order will be saved for each user individually. Administrators can define a custom default order. AppOrder works with the default owncloud menu as well as with the direct_menu @@ -252,23 +252,23 @@ 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' => - [ - 0 => - [ - 'name' => 'Julius Härtl', - 'mail' => 'jus@bitgrid.net', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Julius Härtl', + 'mail' => 'jus@bitgrid.net', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhAEMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -292,49 +292,49 @@ CSKtBro2jcnxzI3BvHdQcx4RAGo8sUzaqKBmsy+JmAqpCSk8f1zHR94x4Akp7n44 Tu+WGOL2Ee5U4k4XFdzeSLODWby08iU+Gx3bXTR6WIvXCYeIVsCPKK/luvfGkiSR CpW1GUIA1cyulT4uyHf9g6BMdYVOsFQ= -----END CERTIFICATE-----', - ], - 2 => - [ - 'id' => 'twofactor_totp', - 'categories' => - [ - 0 => 'tools', - ], - 'userDocs' => '', - 'adminDocs' => '', - 'developerDocs' => '', - 'issueTracker' => '', - 'website' => '', - 'created' => '2016-10-08T14:13:54.356716Z', - 'lastModified' => '2016-10-12T14:38:56.186269Z', - 'releases' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-12T14:38:56.248223Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.4 <=7.0', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'bnwWxmHEn8xkoWbtwhC1kIrJ0dQfAI3PUtU62k+Tru/BHt1G2aVxqO8bCdghojZ7 + ], + 2 => + [ + 'id' => 'twofactor_totp', + 'categories' => + [ + 0 => 'tools', + ], + 'userDocs' => '', + 'adminDocs' => '', + 'developerDocs' => '', + 'issueTracker' => '', + 'website' => '', + 'created' => '2016-10-08T14:13:54.356716Z', + 'lastModified' => '2016-10-12T14:38:56.186269Z', + 'releases' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-12T14:38:56.248223Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.4 <=7.0', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'bnwWxmHEn8xkoWbtwhC1kIrJ0dQfAI3PUtU62k+Tru/BHt1G2aVxqO8bCdghojZ7 zdFMlIJw4kekYFsVfLk8jzjUTZKVbNVKCdkHrVTQ0bUUryMAMLqGQ3PSRI5NX6D5 FpkvwO1coYwU0XVWF8KAS0meX0ztSkT3Mv96LLrxr8F8SrB/MGmKIE4WTjt1fAIa ZLAVEUo/3sNFTGLYBtL3wjctrkZvJltP8abeRfls9FkRHu+rN7R3uLFzk42uZn3X @@ -345,38 +345,38 @@ h7ro5ls+d3OQ8i3i4vdZm821Ytxdu/DQBHiVoOBarvFWwWAv2zd2VAvpTmk6J5yv 3y+csRqpEJYd9fcVMPsTu7WBRRrpBsAqdAHJcZEwak2kz1kdOgSf8FIzP1z6Q71d Ml2RKcPeutMHHSLiGIN/h7fM5aSs49wGgGZmfz28fHVd7/U0HFSMYmkT/GMq5tMP Iyc+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' => - [ - 0 => - [ - 'name' => 'Christoph Wurst', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + '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' => + [ + 0 => + [ + 'name' => 'Christoph Wurst', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIECTCCAvECAhASMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -400,51 +400,51 @@ dIu2MkhxAZk9FZfnFkjTaAXcBHafJce7H/IEjHDEoIkFp5KnAQLHsJb4n8JeXmi9 VMgQ6yUWNuzOQMZpMIV7RMOUZHvxiX/ZWUFzXNYX0GYub6p4O2uh3LJE+xXyDf77 RBO7PLY3m4TXCeKesxZlkoGke+lnq7B8tkADdPI= -----END CERTIFICATE-----', - ], - 3 => - [ - 'id' => 'contacts', - 'categories' => - [ - 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', - '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-22T22:08:02.306939Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'ZqqhqtbHcNB+rzGCQ7FDIjjvHjit+dhAE1UhFgiXApkx3tmPP4nJOBAGNjHe+2Ao + ], + 3 => + [ + 'id' => 'contacts', + 'categories' => + [ + 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', + '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-22T22:08:02.306939Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'ZqqhqtbHcNB+rzGCQ7FDIjjvHjit+dhAE1UhFgiXApkx3tmPP4nJOBAGNjHe+2Ao VcTIX2SrWEfieRrA4Gp+0k7pUPWag1Z0T1OVOwO4cmS1AVFyGIOE1bRvDhMfsWTU 4CI4oXaKBFAY6mtnf7VJ7EeIdNqhImkohyWDQ88NiPRLM1XNkJJk6AvZBcT0fvCv o145X4dLpbixSXsN99QFNJ/oXvK+9tBGwTd5i/WnNFY90vcNRLia8aRo7SA0YJRx @@ -455,54 +455,54 @@ Me1EZcde8SLEpTbCWYIfIw/O9Fkp5cWD/dAqoiO6g+gNxSZ/gGp57qoGfFxn7d/x H3aH8GljatAFjrwItw1JzR0THt0ukkOK+bw/pfCslk10sjHMitmz/GXa4qMS91DZ BKLUd0dSfQUQzkfwcojImbzJRvca4/DYe3mfG7+RCH0tDL6t72dKL9joB++u5R1u VZPgkToexlXcKWpiDB8H2/SEShKr4udAOjR5de9CYWM=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - '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' => - [ - 0 => - [ - 'name' => 'Alexander Weidinger', - 'mail' => '', - 'homepage' => '', - ], - 1 => - [ - 'name' => 'Jan-Christoph Borchardt', - 'mail' => '', - 'homepage' => '', - ], - 2 => - [ - 'name' => 'Hendrik Leppelsack', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + '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' => + [ + 0 => + [ + 'name' => 'Alexander Weidinger', + 'mail' => '', + 'homepage' => '', + ], + 1 => + [ + 'name' => 'Jan-Christoph Borchardt', + 'mail' => '', + 'homepage' => '', + ], + 2 => + [ + 'name' => 'Hendrik Leppelsack', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhATMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -526,49 +526,49 @@ iuPit2pjkw3nWz0JRHneRXz/BNoAWBnJiV7JMF2xwBAHN4ghTM8NSJzrGTurmpMI Gld7yCP47xNPaAZEC66odcClvNtJ2Clgp8739jD6uJJCqcKDejeef0VU1PG7AXId 52bVrGMxJwOuL1393vKxGH0PHDzcB1M= -----END CERTIFICATE-----', - ], - 4 => - [ - 'id' => 'mail', - 'categories' => - [ - 0 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-19T19:57:33.834580Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.4 <=7.0', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'VbMsvDpt+gSPeFM8LrZXEK10rk8kkLlgCcblgqNdCSeGZeVpwDAYv3CccVSLa0+l + ], + 4 => + [ + 'id' => 'mail', + 'categories' => + [ + 0 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-19T19:57:33.834580Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.4 <=7.0', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'VbMsvDpt+gSPeFM8LrZXEK10rk8kkLlgCcblgqNdCSeGZeVpwDAYv3CccVSLa0+l lTSqQ0VIoH+OIU6vIQNBKHmSCzTplk7OrY0+L5FajXx8LnBaOh892GfGSlEt1neN KyM0i0uOjO/xpCP/NoUlgkz6hnmYY5XEdN6DTsJtJ/XZhDQ45IYuIkMkHE/eFehS 0JnOagIz+PSipeBY2Ry+tV8YbRa7bC1JAvZzlod0dyI015AHZESeitRUY+MwMWkt @@ -579,11 +579,11 @@ sP8OrkQFooL4E7S4BWfdSiN/a8jUITJQkuXp/OVrVGeCupLWJh7qegUw6DvoqyGy D4c6b+qYn68kx3CLaPPiz+tFAZQZQdj7+Kx/lohso8yTnVSiGYrMj4IvvCbpsQjg WF3WSqF/K/tTnPYTWb9NUPSihTbVNv6AXOfTsPEp/ba2YSS5DjvjVjkr5vhR9eg1 ikQ3Cw6lW3vaA4LVCC+hFkMRnI4N0bo5qQavP3PnZPc=', - 'translations' => - [ - 'en' => - [ - 'changelog' => '### Added + 'translations' => + [ + 'en' => + [ + 'changelog' => '### Added - Alias support [#1523](https://github.com/owncloud/mail/pull/1523) @tahaalibra - New incoming messages are prefetched @@ -616,37 +616,37 @@ 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' => - [ - ], - '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' => - [ - 0 => - [ - '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----- + ], + ], + ], + ], + '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' => + [ + 0 => + [ + '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----- MIID/zCCAucCAhAVMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -670,99 +670,99 @@ ZETmzhx0BXDt5enJYs8R2KMYJNIme1easQRYmWKliXogNY09W7ifT9FHtVW1HX+K xRS4JXbapjolkxyGSpP+iYSgItVnYzl6o9KZResR4yDsBv7G/8fpV4GQU9IS3zLD PiZOosVHWJdpUKCw9V4P1prGTQ== -----END CERTIFICATE-----', - ], - 5 => - [ - 'id' => 'audioplayer', - 'categories' => - [ - 0 => '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' => - [ - 0 => - [ - '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' => - [ - 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' => - [ - 'en' => - [ - 'changelog' => '2016-11-17 + ], + 5 => + [ + 'id' => 'audioplayer', + 'categories' => + [ + 0 => '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' => + [ + 0 => + [ + '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' => + [ + 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' => + [ + 'en' => + [ + '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' => - [ - 0 => - [ - 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_main.png', - ], - 1 => - [ - 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_lists.png', - ], - 2 => - [ - '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' => - [ - 0 => - [ - 'name' => 'Marcel Scherello', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_main.png', + ], + 1 => + [ + 'url' => 'https://github.com/rello/screenshots/raw/master/audioplayer_lists.png', + ], + 2 => + [ + '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' => + [ + 0 => + [ + 'name' => 'Marcel Scherello', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEBjCCAu4CAhAIMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -786,49 +786,49 @@ zi7mQDFxmAE6FWSMBgKKUb4tqLc5oBap8e12tPEZl/UR6d9iUB2ltvrm3T3vrjjl FNvGFVBn4r5qCiChEoq+rCXHRjPi/eCfbW21XeLFDiLxapcZyc85JIcA7znUYoFe P7Y/ekMscwWhLbF91OaQlcWpRtEMyde/DaI= -----END CERTIFICATE-----', - ], - 6 => - [ - 'id' => 'calendar', - 'categories' => - [ - 0 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-22T20:31:13.087340Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'nThwe9CJBCan9nuDLdhfBiQyPhmum6Aa0UcYsIDdhGMw+C2acf81KhEmBJuTTWxo + ], + 6 => + [ + 'id' => 'calendar', + 'categories' => + [ + 0 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-22T20:31:13.087340Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'nThwe9CJBCan9nuDLdhfBiQyPhmum6Aa0UcYsIDdhGMw+C2acf81KhEmBJuTTWxo WGby6WcrcJJmeuCW+ePU91ju7Pd76RirprhVXIEceIDzSCxin+K0oZCZ1IGVIJjP IkVehTsLuCeTBbjvz1b3k5QFyhUhvd32Xt7k5d7VARyI4OqnqYYNBtH9vvgeRrFw AxsQr4o4axof6i3iykLg6WfWarYArY4dIuu5DkPuGPWf2bbgjwWEra4sQejhOs7G @@ -839,68 +839,68 @@ hh1FBfA5pvCJbkJ6nr5bU4bKaffwDX1nr5h77FS5zzn0Pyd7ZIExmVmNtaeJfnfV eFLKrUg3EvnTjvknbBxMB55h9jNJr0SAlkrmyEVm6+CE3BwRWpKB+cJMBuGiwPwv r/ASRiJrkDThbNWAUtX70rUmCqDV6/MujLXViqOc/Q2OHvcXd1oGDccJSQT92/1z 7nonnedyYQIDqUt7u68WL8JRxp7pFsEqKLVuWSgxW3c=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png', - ], - 2 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png', - ], - 3 => - [ - '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. + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/1.png', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/2.png', + ], + 2 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/calendar/master/screenshots/3.png', + ], + 3 => + [ + '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. It integrates with other apps, allows you to manage calendars and events, display external calendars and invite attendees to your events', - ], - ], - 'isFeatured' => true, - 'authors' => - [ - 0 => - [ - 'name' => 'Georg Ehrke', - 'mail' => '', - 'homepage' => 'https://georg.coffee', - ], - 1 => - [ - 'name' => 'Raghu Nayyar', - 'mail' => '', - 'homepage' => 'http://raghunayyar.com', - ], - 2 => - [ - 'name' => 'Thomas Citharel', - 'mail' => '', - 'homepage' => 'https://tcit.fr', - ], - ], - 'ratingRecent' => 0.94444444444444398, - 'ratingOverall' => 0.94444444444444398, - 'ratingNumRecent' => 9, - 'ratingNumOverall' => 9, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => true, + 'authors' => + [ + 0 => + [ + 'name' => 'Georg Ehrke', + 'mail' => '', + 'homepage' => 'https://georg.coffee', + ], + 1 => + [ + 'name' => 'Raghu Nayyar', + 'mail' => '', + 'homepage' => 'http://raghunayyar.com', + ], + 2 => + [ + 'name' => 'Thomas Citharel', + 'mail' => '', + 'homepage' => 'https://tcit.fr', + ], + ], + 'ratingRecent' => 0.94444444444444398, + 'ratingOverall' => 0.94444444444444398, + 'ratingNumRecent' => 9, + 'ratingNumOverall' => 9, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhARMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -924,49 +924,49 @@ D3xxtc17ll3B5IqrMnMHRqmOQ39Sbe56Y7T4agaIz/sUWpseo85D5kt7UAIOR+Mr Q0Bl/QinETk72afGR46Qvc7tC1t9JjQQD3AUbEGuJdGvXjJJ9GREYu01XoODmPdT jXXOI8XIOK6kxXhPHUc3iWu9b4KqGm0= -----END CERTIFICATE-----', - ], - 8 => - [ - 'id' => 'ownpad', - 'categories' => - [ - 0 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-19T17:37:52.423930Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'dh+Txg1iVfqXr8+cxplNQuBZGErSnXUo0ewGwnybNMJqp8/EjEo72+zPpW3dVnhY + ], + 8 => + [ + 'id' => 'ownpad', + 'categories' => + [ + 0 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-19T17:37:52.423930Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'dh+Txg1iVfqXr8+cxplNQuBZGErSnXUo0ewGwnybNMJqp8/EjEo72+zPpW3dVnhY 67YCvhrm2bo+VRdFFymEfymzSJu9nWVFkGJhEwvTxPyIdAtuD5YAVrzmnR6L+H7m 7Q1nXE63ICPCAQpHkxIfIXLh25OhWeyofBB8AVsjDUNn58FEYJ8fFkr6dCgPriZS sM2J+xtZMDYufy+xFMsVf/Q3WopjFuBjMC3qOecW76ZTwtREaswOC2RtpzUku2r1 @@ -977,46 +977,46 @@ qEC5WBgJucsFxSvkHh52v43M8jgPYBfHWEL/M/+377z3+mbuIh+BcQ+vcDdiqxTF o3n0+gw3QYIhLEe75sUhxG6ynVUdW25AKKju1kVj3KJnZTBH1R8t8/zy4DnJG8d4 uRGqyU4BXpZjEC3nVlsC7vCncWWhxl0WZQ/MWKqsfjVAU4I88E518D6NioqMnPEJ iCZ2x+69UCDEQyfCSKajgAYT17r3OhZei8F9KSCH8Vw=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Ownpad', - 'summary' => ' + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Ownpad', + 'summary' => ' Create and open Etherpad and Ethercalc documents. ', - 'description' => ' + 'description' => ' Ownpad is an ownCloud application that allows to create and open Etherpad and Ethercalc documents. This application requires to have access to an instance of Etherpad and/or Ethercalc to work properly. ', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Olivier Tétard', - 'mail' => 'olivier.tetard@miskin.fr', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Olivier Tétard', + 'mail' => 'olivier.tetard@miskin.fr', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEATCCAukCAhAPMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1040,90 +1040,90 @@ ifneTw/Ba1d0AXBOq0c0HFyGxMPIlWe4qn5LtxH5t0wyVGeSj4jyv4nvd3ZGuAgY EUa2uYht/z475k4+vf0YhV98iQH07GnmlfD2TDZgmOCQGKlNfJh1v88OZyLLa3dz gRHzGwKbAiJ8T8bbpZ3e2ozXxADr -----END CERTIFICATE-----', - ], - 9 => - [ - 'id' => 'announcementcenter', - 'categories' => - [ - 0 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-10-06T12:41:56.263124Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'NVWYz73KtuoZ7ti2sluztJO5aFUc7PzhlDcg0VWyAQd1H7sk5wjw7i0bhrjw8O7M + ], + 9 => + [ + 'id' => 'announcementcenter', + 'categories' => + [ + 0 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-10-06T12:41:56.263124Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'NVWYz73KtuoZ7ti2sluztJO5aFUc7PzhlDcg0VWyAQd1H7sk5wjw7i0bhrjw8O7M Lsrb+PegnsL9eMlYM2WrRom+RF1PDP482xymZf1T8vh8qcTCm3TK89xSuiSm8yoA iWUb/Uv/ODj74wVDWqWxAFKaAG/FestCB3InOOZQqQZLzlAV0U9ziYDGNzBjFqof 9rLNxJ2IOqZOA7hhMIKhSrpA0KkSfNhBsVf8CWClYnVkZQiq0LoYkHkHIlXmXUr3 OfQFKEjtsx+bNLa6CkAaocHGHJXAofX3GQZ9cjBsjZqiTfbXfcVk0kRfz7pwL92L I1McfJYvgMxDQG5bjRpNJw==', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - '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' => - [ - 0 => - [ - 'name' => 'Joas Schilling', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.75, - 'ratingOverall' => 0.75, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + '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' => + [ + 0 => + [ + 'name' => 'Joas Schilling', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.75, + 'ratingOverall' => 0.75, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIDDTCCAfUCAhABMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1142,50 +1142,50 @@ sli/yAYQRTVDsXD8A3ACYT7BG31jGxyXtIHzqCci0MhZFdKKayMYkwfjZchIUtGN JJoU8LQoHwGRtp3wutk0GlFzpEQEvSsn/Lsvvot5IfIe46tnzA6MVj5s64s5G8+Q phhXFlzXqO/VxquPdbfYjvU= -----END CERTIFICATE-----', - ], - 11 => - [ - 'id' => 'rainloop', - 'categories' => - [ - 0 => 'social', - 1 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-18T11:36:04.619927Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.4', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'nTYIVSB6mIwKtXIrKoVGsOGFflpLjed8jFem1VLQNtXQj4bztnNrdc4YaPIn0yzM + ], + 11 => + [ + 'id' => 'rainloop', + 'categories' => + [ + 0 => 'social', + 1 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-18T11:36:04.619927Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.4', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'nTYIVSB6mIwKtXIrKoVGsOGFflpLjed8jFem1VLQNtXQj4bztnNrdc4YaPIn0yzM yLpMSqRDNzdYNFuOeDiyKLPJPTA++MotLCNjEe7kxUekek+m+qzgnGBdcT7RQT6R p9xWGecnVx94d6aA55uiRhgQRyHpdDMMLCOz1be+HvpwHy69DRFZ1+SPmGUt6eW0 u5yS0vHCu1K22cbrVNXFKjxAOlGcIDm61oQuz7ycl3uAujZO4rZbWt55jilgKGak @@ -1196,42 +1196,42 @@ hgFhPrg+7rf7g6UmJFOCp0dC9sBdyQ3KtJkv7bGqPr854r2cdA7xW0QHWQ2in9qQ LhIczc32ECi3ZVVgyF8zyT4Y/3MRS05oX3FHvHyt88mjni6bVaO78F7ZRSha8gHh NOAkku7AMXPvUCHaZP2iVCCoAViEso8GeR3O8xh2G42Ai61RLYwx8LB1+23EoJTr mfFuRYNSg+qAKCokXNnh+lDlwu4AkaQo3vtKGPXvU7A=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - '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' => - [ - 0 => - [ - 'name' => 'RainLoop Team', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + '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' => + [ + 0 => + [ + 'name' => 'RainLoop Team', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhAXMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1255,103 +1255,103 @@ pzAeVGiABI/e5URpxzz2UayRX7EE+vtpe3B84hzkLqsq0N39ZN6KLfaTyEBGLzqE iLYeXQTV0XSRs8xVt+iyGlj7nPkv2DR0oCqRpWUFWeSBI//niDG5WxS3qg8kacSW fDSYhSN+IjrnIkwNtc8V9t7/GeQB5FE= -----END CERTIFICATE-----', - ], - 12 => - [ - 'id' => 'richdocuments', - 'categories' => - [ - 0 => 'integration', - 1 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-24T12:13:53.963638Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'prDGlfRPxqT6LP0BsAFPwGww7P4Bngha2N4u5B6+F02N+RVOjGtTcXKqvM1KjZb1 + ], + 12 => + [ + 'id' => 'richdocuments', + 'categories' => + [ + 0 => 'integration', + 1 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-24T12:13:53.963638Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'prDGlfRPxqT6LP0BsAFPwGww7P4Bngha2N4u5B6+F02N+RVOjGtTcXKqvM1KjZb1 Co7qJvgJmjpvIvDmB+rup02i8ObfwP2ct6UdsD7ouzOWJG2sJANXK31bHyvOmQ2h vKu5eNcOkf+WFyFKYi51TbsfWn2+1Wge3WWujKAVcEvqtcOOz+uMWNtqzBptEupk E1aaRnQfTx488YB8Ubul06LIY0PNCHgGCWPgy817tOVT7JA+V0P0FFonl/PXE0dr WgtxRJmvGaNiFzYq+kQmdKMfayZTm3kdVgP0W52t5wp878K0i4s2KPg5lANvjTz7 DCT+VV2IGIE52o4RpMUGyQ==', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png', - ], - 1 => - [ - 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png', - ], - 2 => - [ - 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png', - ], - 3 => - [ - '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' => - [ - 0 => - [ - '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----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-document.png', + ], + 1 => + [ + 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-app.png', + ], + 2 => + [ + 'url' => 'https://nextcloud.com/wp-content/themes/next/assets/img/features/collabora-presentation.png', + ], + 3 => + [ + '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' => + [ + 0 => + [ + '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----- MIIDCDCCAfACAhAZMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1370,70 +1370,70 @@ Ru1DXn+LW7TJ4NZ8VtLWvmW/6Kfmi7dQ1V++Kmn0lO5ntRt5altePbStCHC8bhGp myBOrjhrJgLIwvgH26MYZhdiSkFzoE38nMPZdrUmUDxcPCwucWJqgzDPudguFthj WCVZ3TTG/2z3+tWM -----END CERTIFICATE-----', - ], - 13 => - [ - 'id' => 'ocr', - 'categories' => - [ - 0 => 'files', - 1 => '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' => - [ - 0 => - [ - 'version' => '1.0.0', - 'phpExtensions' => - [ - ], - 'databases' => - [ - 0 => - [ - 'id' => 'pgsql', - 'versionSpec' => '*', - 'rawVersionSpec' => '*', - ], - 1 => - [ - 'id' => 'mysql', - 'versionSpec' => '*', - 'rawVersionSpec' => '*', - ], - 2 => - [ - 'id' => 'sqlite', - 'versionSpec' => '*', - 'rawVersionSpec' => '*', - ], - ], - 'shellCommands' => - [ - 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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-21T11:22:21.269108Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '>=5.6 <=7', - 'rawPlatformVersionSpec' => '>=10 <=11', - 'signature' => 'CBJkCIiUKyf2NuWfz2zJ3grhf8p7wJes7DPV/OxUzhlxIH0Fh7K54+U5A9JOOi6f + ], + 13 => + [ + 'id' => 'ocr', + 'categories' => + [ + 0 => 'files', + 1 => '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' => + [ + 0 => + [ + 'version' => '1.0.0', + 'phpExtensions' => + [ + ], + 'databases' => + [ + 0 => + [ + 'id' => 'pgsql', + 'versionSpec' => '*', + 'rawVersionSpec' => '*', + ], + 1 => + [ + 'id' => 'mysql', + 'versionSpec' => '*', + 'rawVersionSpec' => '*', + ], + 2 => + [ + 'id' => 'sqlite', + 'versionSpec' => '*', + 'rawVersionSpec' => '*', + ], + ], + 'shellCommands' => + [ + 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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-21T11:22:21.269108Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '>=5.6 <=7', + 'rawPlatformVersionSpec' => '>=10 <=11', + 'signature' => 'CBJkCIiUKyf2NuWfz2zJ3grhf8p7wJes7DPV/OxUzhlxIH0Fh7K54+U5A9JOOi6f WPhjXG1ylkyIVY1glr/B8svWNsD4jAclpnUi1/9ZW5UPT8LnRBfTbtF9Uoj0OgNs tsGQYbpuREoHnjbJWTRe0kq1OsOfX44xuf8PuX43B+lpQPW4iRSSz3ZIhdPcDGq1 7pyqQM7gdKhBQ6/tOiwd7Enyt5Hi4V6jhwhUOCYeTNiLD2V3yKL+qA9DzpXUfNNw @@ -1444,33 +1444,33 @@ GsrecNftUEhP/ngxA6lMBVkLmmdpiexVisvsavPi64i34OUA6qOuxjgNVBDwg56i D3tJOF7spnK6I3BhVLviou/zs30AIRVBDTU0Orzx78cbInwy6/vyJib2a1olAaHz v05SzlQRnBWM4jYBe0mA/2ds9AO6VrXGrT/iLlHemj6JYoGBM185TGewA7OJyX3a HSlSDqaremmi+aS3onx3AKhXykDxTRkMVarePwTzzFs=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png', - ], - 2 => - [ - '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 + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc1.png', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/janis91/ocr/master/screenshots/sc2.png', + ], + 2 => + [ + '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 Nextcloud OCR (optical character recoginition) processing for images and PDF with tesseract-ocr and OCRmyPDF brings OCR capability to your Nextcloud 10. The 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. @@ -1488,12 +1488,12 @@ 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' => - [ - 'name' => 'OCR', - 'summary' => 'Schrifterkennung für Bilder (mit Text) und PDF Dateien.', - 'description' => '# Beschreibung + ], + 'de' => + [ + 'name' => 'OCR', + 'summary' => 'Schrifterkennung für Bilder (mit Text) und PDF Dateien.', + 'description' => '# Beschreibung OCR (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. Die 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. @@ -1511,23 +1511,23 @@ 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' => - [ - 0 => - [ - 'name' => 'Janis Koehr', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Janis Koehr', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIID/jCCAuYCAhAKMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1551,49 +1551,49 @@ HR7qPCNz4uG2Va7mlUHE3UYUYnlv8JFOV3YdbVL0nxhWwIdzSri5sxFIhdlabpzY yA1z/MCBEyTRo80jxFmL+MpwbsdbUJi7Qxlnd56zb6HHDGrLHXZTh9LXgyVbnhWL kxomWjIXQh4aMHQL4QF7U4EK -----END CERTIFICATE-----', - ], - 14 => - [ - 'id' => 'spreedme', - 'categories' => - [ - 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' => '', - 'issueTracker' => 'https://github.com/strukturag/nextcloud-spreedme/issues', - 'website' => '', - 'created' => '2016-09-27T08:43:07.835196Z', - 'lastModified' => '2016-11-21T16:51:23.703819Z', - 'releases' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-21T16:51:23.826509Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'Mhy3hXeGWlIujx1Op39MMRdqHYOo360BCwr4FPWoTNNggH3aS0gWlh48DAfGYK9W + ], + 14 => + [ + 'id' => 'spreedme', + 'categories' => + [ + 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' => '', + 'issueTracker' => 'https://github.com/strukturag/nextcloud-spreedme/issues', + 'website' => '', + 'created' => '2016-09-27T08:43:07.835196Z', + 'lastModified' => '2016-11-21T16:51:23.703819Z', + 'releases' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-21T16:51:23.826509Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'Mhy3hXeGWlIujx1Op39MMRdqHYOo360BCwr4FPWoTNNggH3aS0gWlh48DAfGYK9W etNiOqIuRyA0NrVlsqR2vDILgFtODJSbKPyHd3PQn3hcGsjogjQ+dkKciLNLinw7 Ohbv6aDdRFLBeRHpX/7wOnWL5W3ko/gyn0Awvi88M9+nC5aARtqncQqPy2SxDGzH KlOZHSNDnEQCGMhA8hNWWKdVwNUJHod/wmBWpW5QVNSJq5DqrKZcNwpGM2UUJoql @@ -1604,54 +1604,54 @@ bOks45K5gE1da4QpkYOUQa3GVMNPqPiT3CqjmJ8tjxq7bGpb6v+YoCLACjjPpPZL 2Y28qLxwHVaINDFUUxD75WWdrlulRbqHwiSw8jolP9qrpXhDuLAqYam9tRwV5K5R 8uNawnFwWkicBEYkN/WtBTouWzehOPn38tHXov6SyEyD6lkuxUBZrsGQ2ru+t33U k0kKCbV0GFw43I+3Ji5DiB4TUVNZYVoPG1B7Qve+UfA=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png', - ], - 2 => - [ - 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png', - ], - 3 => - [ - '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' => - [ - 0 => - [ - 'name' => 'struktur AG', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/conference.gif', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/presentation.png', + ], + 2 => + [ + 'url' => 'https://raw.githubusercontent.com/strukturag/nextcloud-spreedme/master/screenshots/appstore/import.png', + ], + 3 => + [ + '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' => + [ + 0 => + [ + 'name' => 'struktur AG', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAzCCAusCAhANMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1675,50 +1675,50 @@ axCNzc7veb2M98hS73w5ZE6vO+C/wz0GTsxuK0AoLitApT5naQnjvxSvSsjFPEGD sUNUEU2Decyp0jxLVnrrpz6Y5UupfBR0V8yAv1t5Od/mCKLc5DxHsDWiKOpsob9U JN+bdzJil2NNftihD4Dm7Ha7OS3O8W0= -----END CERTIFICATE-----', - ], - 15 => - [ - 'id' => 'nextant', - 'categories' => - [ - 0 => 'files', - 1 => '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' => - [ - 0 => - [ - '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' => - [ - 0 => 'agpl', - ], - 'lastModified' => '2016-11-16T20:39:59.030384Z', - 'isNightly' => false, - 'rawPhpVersionSpec' => '*', - 'rawPlatformVersionSpec' => '>=9 <=11', - 'signature' => 'aOZeEeThyZ0V/vXBcn6c+Z0vyCsZcN6nfSJ8oWEea4zXh4g705Si+MFZESqix3M2 + ], + 15 => + [ + 'id' => 'nextant', + 'categories' => + [ + 0 => 'files', + 1 => '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' => + [ + 0 => + [ + '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' => + [ + 0 => 'agpl', + ], + 'lastModified' => '2016-11-16T20:39:59.030384Z', + 'isNightly' => false, + 'rawPhpVersionSpec' => '*', + 'rawPlatformVersionSpec' => '>=9 <=11', + 'signature' => 'aOZeEeThyZ0V/vXBcn6c+Z0vyCsZcN6nfSJ8oWEea4zXh4g705Si+MFZESqix3M2 OPCnA/U8eASwdRTAEwQJrW5ECmu1THXSIsrzQzc9kFycvyOGzCgAWtuu0ayzZD2/ U5aDWlzpLHC1Czg9QJ5UnfZR0AfChWQ402N1YzGqMShdJv6AHXFrVE+uYnIyxuYI oPJQBUYbQwthVUjpYwFwSxw50YU17gmx5RZ0Y0OPz3i/EiuEUrxopXtfDVYAuCML @@ -1729,29 +1729,29 @@ oAKv2GkvWPQ0aiiBtA1i4oXuzvHW/M2wOrK7v7DCpNfILrD/sjxpljxcX082nRCd 9P3iPd2hQ6yOM9fG21LVN74b6wggI81BzFf/xJPd4ZqYLjfeG/yqd0zaiMOzMm1W se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/ 2avNqQnUh3hgOnxFCLI/5VrbqxfSTVdO6O/LTuAmwgw=', - 'translations' => - [ - ], - ], - ], - 'screenshots' => - [ - 0 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg', - ], - 1 => - [ - 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg', - ], - ], - 'translations' => - [ - 'en' => - [ - 'name' => 'Nextant', - 'summary' => 'Navigate through your cloud using Solr', - 'description' => ' + 'translations' => + [ + ], + ], + ], + 'screenshots' => + [ + 0 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/displayResult.jpg', + ], + 1 => + [ + 'url' => 'https://raw.githubusercontent.com/nextcloud/nextant/master/screenshots/admin.jpg', + ], + ], + 'translations' => + [ + 'en' => + [ + 'name' => 'Nextant', + 'summary' => 'Navigate through your cloud using Solr', + 'description' => ' Navigate through your cloud using Solr @@ -1787,23 +1787,23 @@ se+kc/a4iB3BoCNX3E942pBBzew4ya8LkCXdCHUUsuelDf1va1ikTh/G7D84ll9/ ', - ], - ], - 'isFeatured' => false, - 'authors' => - [ - 0 => - [ - 'name' => 'Maxence Lange', - 'mail' => '', - 'homepage' => '', - ], - ], - 'ratingRecent' => 0.5, - 'ratingOverall' => 0.5, - 'ratingNumRecent' => 0, - 'ratingNumOverall' => 0, - 'certificate' => '-----BEGIN CERTIFICATE----- + ], + ], + 'isFeatured' => false, + 'authors' => + [ + 0 => + [ + 'name' => 'Maxence Lange', + 'mail' => '', + 'homepage' => '', + ], + ], + 'ratingRecent' => 0.5, + 'ratingOverall' => 0.5, + 'ratingNumRecent' => 0, + 'ratingNumOverall' => 0, + 'certificate' => '-----BEGIN CERTIFICATE----- MIIEAjCCAuoCAhAFMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB @@ -1827,8 +1827,8 @@ my7Z1C7jG9/h57vx0+QBMDCYnTmqLsvMKqo27uHskzAiB7VXLEdSZ2FtMGHkLUQO 0bfhnvTZ2VhMmK83t7ovo71An4ycmsolGD/MA0vNI78VrVISrdI8rRh2WntUnCBU EJL3BaQAQaASSsvFrcozYxrQG4VzEg== -----END CERTIFICATE-----', - ], - ], + ], + ], 'timestamp' => 1234, 'ncversion' => '11.0.0.2', 'ETag' => '"myETag"', diff --git a/tests/lib/App/CodeChecker/NodeVisitorTest.php b/tests/lib/App/CodeChecker/NodeVisitorTest.php index d1b1f64367..2383b56b67 100644 --- a/tests/lib/App/CodeChecker/NodeVisitorTest.php +++ b/tests/lib/App/CodeChecker/NodeVisitorTest.php @@ -45,10 +45,10 @@ class NodeVisitorTest extends TestCase { ], 'test-deprecated-function-sub-alias.php'], // TODO Failing to resolve variables to classes -// [[['OCP\NamespaceName\ClassName::methodName', 1007]], 'test-deprecated-method.php'], -// [[['Alias::methodName', 1002]], 'test-deprecated-method-alias.php'], -// [[['NamespaceName\ClassName::methodName', 1002]], 'test-deprecated-method-sub.php'], -// [[['SubAlias\ClassName::methodName', 1002]], 'test-deprecated-method-sub-alias.php'], + // [[['OCP\NamespaceName\ClassName::methodName', 1007]], 'test-deprecated-method.php'], + // [[['Alias::methodName', 1002]], 'test-deprecated-method-alias.php'], + // [[['NamespaceName\ClassName::methodName', 1002]], 'test-deprecated-method-sub.php'], + // [[['SubAlias\ClassName::methodName', 1002]], 'test-deprecated-method-sub-alias.php'], ]; } diff --git a/tests/lib/App/PlatformRepositoryTest.php b/tests/lib/App/PlatformRepositoryTest.php index 555247f7dd..9063dffa64 100644 --- a/tests/lib/App/PlatformRepositoryTest.php +++ b/tests/lib/App/PlatformRepositoryTest.php @@ -52,14 +52,14 @@ class PlatformRepositoryTest extends \Test\TestCase { '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 branches' => array('1.x-dev', '1.9999999.9999999.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'), + // '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 fd83b6feae..bf856b3b89 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -80,7 +80,7 @@ class AppTest extends \Test\TestCase { $xml = '' . '' . - 'namespacetestapp' . + 'namespacetestapp' . 'NameSpaceTestApp' . ''; file_put_contents($infoXmlPath, $xml); diff --git a/tests/lib/AppFramework/Controller/OCSControllerTest.php b/tests/lib/AppFramework/Controller/OCSControllerTest.php index f5eb838b58..85f2a7f646 100644 --- a/tests/lib/AppFramework/Controller/OCSControllerTest.php +++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php @@ -108,7 +108,7 @@ class OCSControllerTest extends \Test\TestCase { )); $controller->setOCSVersion(1); $expected = '{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK",' . - '"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}'; + '"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}'; $params = new DataResponse(['test' => 'hi']); $response = $controller->buildResponse($params, 'json'); diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php index b6b43d4a5d..d6af034e95 100644 --- a/tests/lib/AppFramework/Http/DispatcherTest.php +++ b/tests/lib/AppFramework/Http/DispatcherTest.php @@ -296,8 +296,8 @@ class DispatcherTest extends \Test\TestCase { $this->request = new Request( [ 'post' => [ - 'int' => '3', - 'bool' => 'false' + 'int' => '3', + 'bool' => 'false' ], 'method' => 'POST' ], diff --git a/tests/lib/AppFramework/Http/OCSResponseTest.php b/tests/lib/AppFramework/Http/OCSResponseTest.php index e092cb53f5..223248c873 100644 --- a/tests/lib/AppFramework/Http/OCSResponseTest.php +++ b/tests/lib/AppFramework/Http/OCSResponseTest.php @@ -29,42 +29,42 @@ use OCP\AppFramework\Http\OCSResponse; class OCSResponseTest extends \Test\TestCase { - public function testHeadersJSON() { - $response = new OCSResponse('json', 1, 2, 3); - $type = $response->getHeaders()['Content-Type']; - $this->assertEquals('application/json; charset=utf-8', $type); - } + public function testHeadersJSON() { + $response = new OCSResponse('json', 1, 2, 3); + $type = $response->getHeaders()['Content-Type']; + $this->assertEquals('application/json; charset=utf-8', $type); + } - public function testHeadersXML() { - $response = new OCSResponse('xml', 1, 2, 3); - $type = $response->getHeaders()['Content-Type']; - $this->assertEquals('application/xml; charset=utf-8', $type); - } + public function testHeadersXML() { + $response = new OCSResponse('xml', 1, 2, 3); + $type = $response->getHeaders()['Content-Type']; + $this->assertEquals('application/xml; charset=utf-8', $type); + } - public function testRender() { - $response = new OCSResponse( - 'xml', 2, 'message', ['test' => 'hi'], 3, 4 - ); - $out = $response->render(); - $expected = "\n" . - "\n" . - " \n" . - " failure\n" . - " 2\n" . - " message\n" . - " 3\n" . - " 4\n" . - " \n" . - " \n" . - " hi\n" . - " \n" . - "\n"; + public function testRender() { + $response = new OCSResponse( + 'xml', 2, 'message', ['test' => 'hi'], 3, 4 + ); + $out = $response->render(); + $expected = "\n" . + "\n" . + " \n" . + " failure\n" . + " 2\n" . + " message\n" . + " 3\n" . + " 4\n" . + " \n" . + " \n" . + " hi\n" . + " \n" . + "\n"; - $this->assertEquals($expected, $out); + $this->assertEquals($expected, $out); - } + } } diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php index 95f8996dbd..5e0604263f 100644 --- a/tests/lib/AppFramework/Routing/RoutingTest.php +++ b/tests/lib/AppFramework/Routing/RoutingTest.php @@ -24,8 +24,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRoute() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'GET'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'GET'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open'); @@ -42,8 +42,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithMissingVerb() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open'); @@ -60,8 +60,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithLowercaseVerb() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open'); @@ -78,8 +78,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithRequirements() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'requirements' => ['something']] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'requirements' => ['something']] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', ['something']); @@ -97,8 +97,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithDefaults() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'defaults' => ['param' => 'foobar']] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'defaults' => ['param' => 'foobar']] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', [], ['param' => 'foobar']); @@ -115,8 +115,8 @@ class RoutingTest extends \Test\TestCase public function testSimpleOCSRouteWithPostfix() { $routes = ['ocs' => [ - ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'postfix' => '_something'] - ] + ['name' => 'folders#open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete', 'postfix' => '_something'] + ] ]; $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', [], [], '_something'); @@ -484,11 +484,11 @@ class RoutingTest extends \Test\TestCase # the section simple describes one route routes: - - name: folders#open - url: /folders/{folderId}/open - verb: GET - # controller: name.split()[0] - # action: name.split()[1] + - name: folders#open + url: /folders/{folderId}/open + verb: GET + # controller: name.split()[0] + # action: name.split()[1] # for a resource following actions will be generated: # - index @@ -498,15 +498,15 @@ routes: # - destroy # - new resources: - accounts: - url: /accounts + accounts: + url: /accounts - folders: - url: /accounts/{accountId}/folders - # actions can be used to define additional actions on the resource - actions: - - name: validate - verb: GET - on-collection: false + folders: + url: /accounts/{accountId}/folders + # actions can be used to define additional actions on the resource + actions: + - name: validate + verb: GET + on-collection: false * */ diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index 0341be14af..8343c05e91 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -30,193 +30,193 @@ interface TestInterface {} class ClassEmptyConstructor implements IInterfaceConstructor {} class ClassSimpleConstructor implements IInterfaceConstructor { - public $test; - public function __construct($test) { - $this->test = $test; - } + public $test; + public function __construct($test) { + $this->test = $test; + } } class ClassComplexConstructor { - public $class; - public $test; - public function __construct(ClassSimpleConstructor $class, $test) { - $this->class = $class; - $this->test = $test; - } + public $class; + public $test; + public function __construct(ClassSimpleConstructor $class, $test) { + $this->class = $class; + $this->test = $test; + } } interface IInterfaceConstructor {} class ClassInterfaceConstructor { - public $class; - public $test; - public function __construct(IInterfaceConstructor $class, $test) { - $this->class = $class; - $this->test = $test; - } + public $class; + public $test; + public function __construct(IInterfaceConstructor $class, $test) { + $this->class = $class; + $this->test = $test; + } } class SimpleContainerTest extends \Test\TestCase { - private $container; + private $container; - protected function setUp(): void { - $this->container = new SimpleContainer(); - } + protected function setUp(): void { + $this->container = new SimpleContainer(); + } - public function testRegister() { - $this->container->registerParameter('test', 'abc'); - $this->assertEquals('abc', $this->container->query('test')); - } + public function testRegister() { + $this->container->registerParameter('test', 'abc'); + $this->assertEquals('abc', $this->container->query('test')); + } - - public function testNothingRegistered() { - $this->expectException(\OCP\AppFramework\QueryException::class); + + public function testNothingRegistered() { + $this->expectException(\OCP\AppFramework\QueryException::class); - $this->container->query('something really hard'); - } + $this->container->query('something really hard'); + } - - public function testNotAClass() { - $this->expectException(\OCP\AppFramework\QueryException::class); + + public function testNotAClass() { + $this->expectException(\OCP\AppFramework\QueryException::class); - $this->container->query('Test\AppFramework\Utility\TestInterface'); - } + $this->container->query('Test\AppFramework\Utility\TestInterface'); + } - public function testNoConstructorClass() { - $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - $this->assertTrue($object instanceof ClassEmptyConstructor); - } + public function testNoConstructorClass() { + $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + $this->assertTrue($object instanceof ClassEmptyConstructor); + } - public function testInstancesOnlyOnce() { - $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - $object2 = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - $this->assertSame($object, $object2); - } + public function testInstancesOnlyOnce() { + $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + $object2 = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + $this->assertSame($object, $object2); + } - public function testConstructorSimple() { - $this->container->registerParameter('test', 'abc'); - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassSimpleConstructor' - ); - $this->assertTrue($object instanceof ClassSimpleConstructor); - $this->assertEquals('abc', $object->test); - } + public function testConstructorSimple() { + $this->container->registerParameter('test', 'abc'); + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassSimpleConstructor' + ); + $this->assertTrue($object instanceof ClassSimpleConstructor); + $this->assertEquals('abc', $object->test); + } - public function testConstructorComplex() { - $this->container->registerParameter('test', 'abc'); - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassComplexConstructor' - ); - $this->assertTrue($object instanceof ClassComplexConstructor); - $this->assertEquals('abc', $object->class->test); - $this->assertEquals('abc', $object->test); - } + public function testConstructorComplex() { + $this->container->registerParameter('test', 'abc'); + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassComplexConstructor' + ); + $this->assertTrue($object instanceof ClassComplexConstructor); + $this->assertEquals('abc', $object->class->test); + $this->assertEquals('abc', $object->test); + } - public function testConstructorComplexInterface() { - $this->container->registerParameter('test', 'abc'); - $this->container->registerService( - 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { - return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); - }); - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassInterfaceConstructor' - ); - $this->assertTrue($object instanceof ClassInterfaceConstructor); - $this->assertEquals('abc', $object->class->test); - $this->assertEquals('abc', $object->test); - } + public function testConstructorComplexInterface() { + $this->container->registerParameter('test', 'abc'); + $this->container->registerService( + 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { + return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); + }); + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassInterfaceConstructor' + ); + $this->assertTrue($object instanceof ClassInterfaceConstructor); + $this->assertEquals('abc', $object->class->test); + $this->assertEquals('abc', $object->test); + } - public function testOverrideService() { - $this->container->registerService( - 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { - return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); - }); - $this->container->registerService( - 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { - return $c->query('Test\AppFramework\Utility\ClassEmptyConstructor'); - }); - $object = $this->container->query( - 'Test\AppFramework\Utility\IInterfaceConstructor' - ); - $this->assertTrue($object instanceof ClassEmptyConstructor); - } + public function testOverrideService() { + $this->container->registerService( + 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { + return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor'); + }); + $this->container->registerService( + 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { + return $c->query('Test\AppFramework\Utility\ClassEmptyConstructor'); + }); + $object = $this->container->query( + 'Test\AppFramework\Utility\IInterfaceConstructor' + ); + $this->assertTrue($object instanceof ClassEmptyConstructor); + } - public function testRegisterAliasParamter() { - $this->container->registerParameter('test', 'abc'); - $this->container->registerAlias('test1', 'test'); - $this->assertEquals('abc', $this->container->query('test1')); - } + public function testRegisterAliasParamter() { + $this->container->registerParameter('test', 'abc'); + $this->container->registerAlias('test1', 'test'); + $this->assertEquals('abc', $this->container->query('test1')); + } - public function testRegisterAliasService() { - $this->container->registerService('test', function() { - return new \StdClass; - }, true); - $this->container->registerAlias('test1', 'test'); - $this->assertSame( - $this->container->query('test'), $this->container->query('test')); - $this->assertSame( - $this->container->query('test1'), $this->container->query('test1')); - $this->assertSame( - $this->container->query('test'), $this->container->query('test1')); - } + public function testRegisterAliasService() { + $this->container->registerService('test', function() { + return new \StdClass; + }, true); + $this->container->registerAlias('test1', 'test'); + $this->assertSame( + $this->container->query('test'), $this->container->query('test')); + $this->assertSame( + $this->container->query('test1'), $this->container->query('test1')); + $this->assertSame( + $this->container->query('test'), $this->container->query('test1')); + } - public function sanitizeNameProvider() { - return [ - ['ABC\\Foo', 'ABC\\Foo'], - ['\\ABC\\Foo', '\\ABC\\Foo'], - ['\\ABC\\Foo', 'ABC\\Foo'], - ['ABC\\Foo', '\\ABC\\Foo'], - ]; - } + public function sanitizeNameProvider() { + return [ + ['ABC\\Foo', 'ABC\\Foo'], + ['\\ABC\\Foo', '\\ABC\\Foo'], + ['\\ABC\\Foo', 'ABC\\Foo'], + ['ABC\\Foo', '\\ABC\\Foo'], + ]; + } - /** - * @dataProvider sanitizeNameProvider - */ - public function testSanitizeName($register, $query) { - $this->container->registerService($register, function() { - return 'abc'; - }); - $this->assertEquals('abc', $this->container->query($query)); - } + /** + * @dataProvider sanitizeNameProvider + */ + public function testSanitizeName($register, $query) { + $this->container->registerService($register, function() { + return 'abc'; + }); + $this->assertEquals('abc', $this->container->query($query)); + } - - public function testConstructorComplexNoTestParameterFound() { - $this->expectException(\OCP\AppFramework\QueryException::class); + + public function testConstructorComplexNoTestParameterFound() { + $this->expectException(\OCP\AppFramework\QueryException::class); - $object = $this->container->query( - 'Test\AppFramework\Utility\ClassComplexConstructor' - ); - } + $object = $this->container->query( + 'Test\AppFramework\Utility\ClassComplexConstructor' + ); + } - public function testRegisterFactory() { - $this->container->registerService('test', function() { - return new \StdClass(); - }, false); - $this->assertNotSame( - $this->container->query('test'), $this->container->query('test')); - } + public function testRegisterFactory() { + $this->container->registerService('test', function() { + return new \StdClass(); + }, false); + $this->assertNotSame( + $this->container->query('test'), $this->container->query('test')); + } - public function testRegisterAliasFactory() { - $this->container->registerService('test', function() { - return new \StdClass(); - }, false); - $this->container->registerAlias('test1', 'test'); - $this->assertNotSame( - $this->container->query('test'), $this->container->query('test')); - $this->assertNotSame( - $this->container->query('test1'), $this->container->query('test1')); - $this->assertNotSame( - $this->container->query('test'), $this->container->query('test1')); - } + public function testRegisterAliasFactory() { + $this->container->registerService('test', function() { + return new \StdClass(); + }, false); + $this->container->registerAlias('test1', 'test'); + $this->assertNotSame( + $this->container->query('test'), $this->container->query('test')); + $this->assertNotSame( + $this->container->query('test1'), $this->container->query('test1')); + $this->assertNotSame( + $this->container->query('test'), $this->container->query('test1')); + } } diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php index 9cf308cd41..84888dc364 100644 --- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php @@ -607,7 +607,7 @@ class MailPluginTest extends TestCase { ], // The user `User` cannot share with the current user [ - 'test', + 'test', [ [ 'FN' => 'User', @@ -627,7 +627,7 @@ class MailPluginTest extends TestCase { ], // The user `User` cannot share with the current user, but there is an exact match on the e-mail address -> share by e-mail [ - 'test@example.com', + 'test@example.com', [ [ 'FN' => 'User', diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php index 284d8270c4..e5b5d2ef82 100644 --- a/tests/lib/Collaboration/Collaborators/SearchTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchTest.php @@ -152,12 +152,12 @@ class SearchTest extends TestCase { ], [ 'test', [Share::SHARE_TYPE_USER, Share::SHARE_TYPE_GROUP, Share::SHARE_TYPE_REMOTE], 1, 2, [ - ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ], [ - ['label' => 'testgroup1', 'value' => ['shareType' => Share::SHARE_TYPE_GROUP, 'shareWith' => 'testgroup1']], - ], [ - 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false, - ], + ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ], [ + ['label' => 'testgroup1', 'value' => ['shareType' => Share::SHARE_TYPE_GROUP, 'shareWith' => 'testgroup1']], + ], [ + 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false, + ], [ 'exact' => ['users' => [], 'groups' => [], 'remotes' => []], 'users' => [ @@ -174,10 +174,10 @@ class SearchTest extends TestCase { // No groups requested [ 'test', [Share::SHARE_TYPE_USER, Share::SHARE_TYPE_REMOTE], 1, 2, [ - ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ], [], [ - 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false - ], + ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ], [], [ + 'results' => [['label' => 'testz@remote', 'value' => ['shareType' => Share::SHARE_TYPE_REMOTE, 'shareWith' => 'testz@remote']]], 'exact' => [], 'exactIdMatch' => false + ], [ 'exact' => ['users' => [], 'remotes' => []], 'users' => [ @@ -191,8 +191,8 @@ class SearchTest extends TestCase { // Share type restricted to user - Only one user [ 'test', [Share::SHARE_TYPE_USER], 1, 2, [ - ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ], [], [], + ['label' => 'test One', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ], [], [], [ 'exact' => ['users' => []], 'users' => [ @@ -203,9 +203,9 @@ class SearchTest extends TestCase { // Share type restricted to user - Multipage result [ 'test', [Share::SHARE_TYPE_USER], 1, 2, [ - ['label' => 'test 1', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], - ['label' => 'test 2', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test2']], - ], [], [], + ['label' => 'test 1', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test1']], + ['label' => 'test 2', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test2']], + ], [], [], [ 'exact' => ['users' => []], 'users' => [ diff --git a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php index 31c52ea80e..6883ed2f98 100644 --- a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php @@ -76,13 +76,13 @@ class ActionProviderStoreTest extends TestCase { 'contactsmenu' => [ 'OCA\Contacts\Provider1', ], - ]); + ]); $this->serverContainer->expects($this->exactly(2)) ->method('query') ->willReturnMap([ - [EMailProvider::class, true, $provider1], - ['OCA\Contacts\Provider1', true, $provider2] - ]); + [EMailProvider::class, true, $provider1], + ['OCA\Contacts\Provider1', true, $provider2] + ]); $providers = $this->actionProviderStore->getProviders($user); @@ -105,8 +105,8 @@ class ActionProviderStoreTest extends TestCase { $this->serverContainer->expects($this->once()) ->method('query') ->willReturnMap([ - [EMailProvider::class, true, $provider1], - ]); + [EMailProvider::class, true, $provider1], + ]); $providers = $this->actionProviderStore->getProviders($user); diff --git a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php index 82619fb567..245c89c322 100644 --- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php @@ -73,7 +73,7 @@ class ContactsStoreTest extends TestCase { 'darren@roner.au' ], ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); @@ -83,7 +83,7 @@ class ContactsStoreTest extends TestCase { $this->assertCount(2, $entries); $this->assertEquals([ 'darren@roner.au' - ], $entries[1]->getEMailAddresses()); + ], $entries[1]->getEMailAddresses()); } public function testGetContactsHidesOwnEntry() { @@ -103,7 +103,7 @@ class ContactsStoreTest extends TestCase { 'darren@roner.au' ], ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); @@ -131,7 +131,7 @@ class ContactsStoreTest extends TestCase { ], 'PHOTO' => base64_encode('photophotophoto'), ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); @@ -160,7 +160,7 @@ class ContactsStoreTest extends TestCase { ], 'PHOTO' => 'VALUE=uri:https://photo', ], - ]); + ]); $user->expects($this->once()) ->method('getUID') ->willReturn('user123'); diff --git a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php index 85ffd1e72b..ac90260d16 100644 --- a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php +++ b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php @@ -67,7 +67,7 @@ class EMailproviderTest extends TestCase { ->method('getEMailAddresses') ->willReturn([ 'user@example.com', - ]); + ]); $this->actionFactory->expects($this->once()) ->method('newEMailAction') ->with($this->equalTo($iconUrl), $this->equalTo('user@example.com'), $this->equalTo('user@example.com')) @@ -94,7 +94,7 @@ class EMailproviderTest extends TestCase { ->method('getEMailAddresses') ->willReturn([ '', - ]); + ]); $this->actionFactory->expects($this->never()) ->method('newEMailAction'); $entry->expects($this->never()) diff --git a/tests/lib/DirectEditing/ManagerTest.php b/tests/lib/DirectEditing/ManagerTest.php index 004292eb47..ef72a4e81d 100644 --- a/tests/lib/DirectEditing/ManagerTest.php +++ b/tests/lib/DirectEditing/ManagerTest.php @@ -23,7 +23,7 @@ use Test\TestCase; class CreateEmpty extends ACreateEmpty { public function getId(): string { - return 'createEmpty'; + return 'createEmpty'; } public function getName(): string { @@ -42,7 +42,7 @@ class CreateEmpty extends ACreateEmpty { class Editor implements IEditor { public function getId(): string { - return 'testeditor'; + return 'testeditor'; } public function getName(): string { diff --git a/tests/lib/ErrorHandlerTest.php b/tests/lib/ErrorHandlerTest.php index 179b5c1212..4cea21b427 100644 --- a/tests/lib/ErrorHandlerTest.php +++ b/tests/lib/ErrorHandlerTest.php @@ -35,7 +35,7 @@ class ErrorHandlerTest extends \Test\TestCase { ['user', 'pass@word'], ['us:er', 'password'], ['user', 'pass:word'], - ]; + ]; } diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 3befe64c82..1965dc405f 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -71,7 +71,7 @@ class DetectionTest extends \Test\TestCase { public function dataDetectContent(): array { return [ ['/', 'httpd/unix-directory'], -// ['/data.tar.gz', 'application/x-gzip'], TODO: fix as it fails hard on php7.4 now + // ['/data.tar.gz', 'application/x-gzip'], TODO: fix as it fails hard on php7.4 now ['/data.zip', 'application/zip'], ['/testimage.mp3', 'audio/mpeg'], ['/testimage.png', 'image/png'], diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index 73b315ac29..7fc16dfcc6 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -563,7 +563,7 @@ class ManagerTest extends TestCase { ->willReturnCallback(function($search, $limit, $offset) { switch($offset) { case 0 : return ['user3' => $this->getTestUser('user3'), - 'user33' => $this->getTestUser('user33')]; + 'user33' => $this->getTestUser('user33')]; case 2 : return []; } return null; @@ -622,7 +622,7 @@ class ManagerTest extends TestCase { ->willReturnCallback(function($search, $limit, $offset) { switch($offset) { case 0 : return ['user3' => $this->getTestUser('user3'), - 'user33' => $this->getTestUser('user33')]; + 'user33' => $this->getTestUser('user33')]; case 2 : return ['user333' => $this->getTestUser('user333')]; } return null; diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index 7d99316f47..98ae3bac9b 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -170,8 +170,8 @@ class CheckerTest extends TestCase { $expected = [ 'EXCEPTION' => [ - 'class' => 'OC\IntegrityCheck\Exceptions\InvalidSignatureException', - 'message' => 'Signature data not found.', + 'class' => 'OC\IntegrityCheck\Exceptions\InvalidSignatureException', + 'message' => 'Signature data not found.', ], ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp')); @@ -259,10 +259,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Signature could not get verified.', - ], + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Signature could not get verified.', + ], ]; $this->assertEquals($expected, $this->checker->verifyAppSignature('SomeApp')); } @@ -310,20 +310,20 @@ class CheckerTest extends TestCase { $expected = [ 'INVALID_HASH' => [ 'AnotherFile.txt' => [ - 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', - 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', + 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', + 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', ], ], 'FILE_MISSING' => [ 'subfolder/file.txt' => [ - 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', - 'current' => '', + 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', + 'current' => '', ], ], 'EXTRA_FILE' => [ 'UnecessaryFile' => [ - 'expected' => '', - 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', + 'expected' => '', + 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], ], @@ -371,24 +371,24 @@ class CheckerTest extends TestCase { $expected = [ - 'INVALID_HASH' => [ - 'AnotherFile.txt' => [ - 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', - 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', - ], + 'INVALID_HASH' => [ + 'AnotherFile.txt' => [ + 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', + 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', ], - 'FILE_MISSING' => [ - 'subfolder/file.txt' => [ - 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', - 'current' => '', - ], + ], + 'FILE_MISSING' => [ + 'subfolder/file.txt' => [ + 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', + 'current' => '', ], - 'EXTRA_FILE' => [ - 'UnecessaryFile' => [ - 'expected' => '', - 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', - ], + ], + 'EXTRA_FILE' => [ + 'UnecessaryFile' => [ + 'expected' => '', + 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], + ], ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp', \OC::$SERVERROOT . '/tests/data/integritycheck/appWithInvalidData/')); @@ -432,10 +432,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Certificate is not valid for required scope. (Requested: SomeApp, current: CN=AnotherScope)', - ], + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Certificate is not valid for required scope. (Requested: SomeApp, current: CN=AnotherScope)', + ], ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp')); } @@ -781,215 +781,215 @@ class CheckerTest extends TestCase { ->method('getOnlyDefaultAliases') ->willReturn( [ - '_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', - '_comment4' => 'After any change to mimetypealiases.json run:', - '_comment5' => './occ maintenance:mimetype:update-js', - '_comment6' => 'Otherwise your update won\'t propagate through the system.', - 'application/coreldraw' => 'image', - 'application/epub+zip' => 'text', - 'application/font-sfnt' => 'image', - 'application/font-woff' => 'image', - 'application/gpx+xml' => 'location', - 'application/illustrator' => 'image', - 'application/javascript' => 'text/code', - 'application/json' => 'text/code', - 'application/msaccess' => 'file', - 'application/msexcel' => 'x-office/spreadsheet', - 'application/msonenote' => 'x-office/document', - 'application/mspowerpoint' => 'x-office/presentation', - 'application/msword' => 'x-office/document', - 'application/octet-stream' => 'file', - 'application/postscript' => 'image', - 'application/rss+xml' => 'application/xml', - 'application/vnd.android.package-archive' => 'package/x-generic', - 'application/vnd.lotus-wordpro' => 'x-office/document', - 'application/vnd.garmin.tcx+xml' => 'location', - 'application/vnd.google-earth.kml+xml' => 'location', - 'application/vnd.google-earth.kmz' => 'location', - 'application/vnd.ms-excel' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-fontobject' => 'image', - 'application/vnd.ms-powerpoint' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', - 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.template' => 'application/vnd.visio', - 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', - 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', - 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.text' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', - 'application/vnd.visio' => 'x-office/document', - 'application/vnd.wordperfect' => 'x-office/document', - 'application/x-7z-compressed' => 'package/x-generic', - 'application/x-bzip2' => 'package/x-generic', - 'application/x-cbr' => 'text', - 'application/x-compressed' => 'package/x-generic', - 'application/x-dcraw' => 'image', - 'application/x-deb' => 'package/x-generic', - 'application/x-fictionbook+xml' => 'text', - 'application/x-font' => 'image', - 'application/x-gimp' => 'image', - 'application/x-gzip' => 'package/x-generic', - 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', - 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', - 'application/x-iwork-pages-sffpages' => 'x-office/document', - 'application/x-mobipocket-ebook' => 'text', - 'application/x-perl' => 'text/code', - 'application/x-photoshop' => 'image', - 'application/x-php' => 'text/code', - 'application/x-rar-compressed' => 'package/x-generic', - 'application/x-tar' => 'package/x-generic', - 'application/x-tex' => 'text', - 'application/xml' => 'text/html', - 'application/yaml' => 'text/code', - 'application/zip' => 'package/x-generic', - 'database' => 'file', - 'httpd/unix-directory' => 'dir', - 'text/css' => 'text/code', - 'text/csv' => 'x-office/spreadsheet', - 'text/html' => 'text/code', - 'text/x-c' => 'text/code', - 'text/x-c++src' => 'text/code', - 'text/x-h' => 'text/code', - 'text/x-java-source' => 'text/code', - 'text/x-ldif' => 'text/code', - 'text/x-python' => 'text/code', - 'text/x-shellscript' => 'text/code', - 'web' => 'text/code', - 'application/internet-shortcut' => 'link', - ]); + '_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', + '_comment4' => 'After any change to mimetypealiases.json run:', + '_comment5' => './occ maintenance:mimetype:update-js', + '_comment6' => 'Otherwise your update won\'t propagate through the system.', + 'application/coreldraw' => 'image', + 'application/epub+zip' => 'text', + 'application/font-sfnt' => 'image', + 'application/font-woff' => 'image', + 'application/gpx+xml' => 'location', + 'application/illustrator' => 'image', + 'application/javascript' => 'text/code', + 'application/json' => 'text/code', + 'application/msaccess' => 'file', + 'application/msexcel' => 'x-office/spreadsheet', + 'application/msonenote' => 'x-office/document', + 'application/mspowerpoint' => 'x-office/presentation', + 'application/msword' => 'x-office/document', + 'application/octet-stream' => 'file', + 'application/postscript' => 'image', + 'application/rss+xml' => 'application/xml', + 'application/vnd.android.package-archive' => 'package/x-generic', + 'application/vnd.lotus-wordpro' => 'x-office/document', + 'application/vnd.garmin.tcx+xml' => 'location', + 'application/vnd.google-earth.kml+xml' => 'location', + 'application/vnd.google-earth.kmz' => 'location', + 'application/vnd.ms-excel' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-fontobject' => 'image', + 'application/vnd.ms-powerpoint' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', + 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.template' => 'application/vnd.visio', + 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', + 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', + 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.text' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', + 'application/vnd.visio' => 'x-office/document', + 'application/vnd.wordperfect' => 'x-office/document', + 'application/x-7z-compressed' => 'package/x-generic', + 'application/x-bzip2' => 'package/x-generic', + 'application/x-cbr' => 'text', + 'application/x-compressed' => 'package/x-generic', + 'application/x-dcraw' => 'image', + 'application/x-deb' => 'package/x-generic', + 'application/x-fictionbook+xml' => 'text', + 'application/x-font' => 'image', + 'application/x-gimp' => 'image', + 'application/x-gzip' => 'package/x-generic', + 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', + 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', + 'application/x-iwork-pages-sffpages' => 'x-office/document', + 'application/x-mobipocket-ebook' => 'text', + 'application/x-perl' => 'text/code', + 'application/x-photoshop' => 'image', + 'application/x-php' => 'text/code', + 'application/x-rar-compressed' => 'package/x-generic', + 'application/x-tar' => 'package/x-generic', + 'application/x-tex' => 'text', + 'application/xml' => 'text/html', + 'application/yaml' => 'text/code', + 'application/zip' => 'package/x-generic', + 'database' => 'file', + 'httpd/unix-directory' => 'dir', + 'text/css' => 'text/code', + 'text/csv' => 'x-office/spreadsheet', + 'text/html' => 'text/code', + 'text/x-c' => 'text/code', + 'text/x-c++src' => 'text/code', + 'text/x-h' => 'text/code', + 'text/x-java-source' => 'text/code', + 'text/x-ldif' => 'text/code', + 'text/x-python' => 'text/code', + 'text/x-shellscript' => 'text/code', + 'web' => 'text/code', + 'application/internet-shortcut' => 'link', + ]); $this->mimeTypeDetector ->expects($this->once()) ->method('getAllAliases') ->willReturn( [ - '_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', - '_comment4' => 'After any change to mimetypealiases.json run:', - '_comment5' => './occ maintenance:mimetype:update-js', - '_comment6' => 'Otherwise your update won\'t propagate through the system.', - 'application/coreldraw' => 'image', - 'application/test' => 'image', - 'application/epub+zip' => 'text', - 'application/font-sfnt' => 'image', - 'application/font-woff' => 'image', - 'application/gpx+xml' => 'location', - 'application/illustrator' => 'image', - 'application/javascript' => 'text/code', - 'application/json' => 'text/code', - 'application/msaccess' => 'file', - 'application/msexcel' => 'x-office/spreadsheet', - 'application/msonenote' => 'x-office/document', - 'application/mspowerpoint' => 'x-office/presentation', - 'application/msword' => 'x-office/document', - 'application/octet-stream' => 'file', - 'application/postscript' => 'image', - 'application/rss+xml' => 'application/xml', - 'application/vnd.android.package-archive' => 'package/x-generic', - 'application/vnd.lotus-wordpro' => 'x-office/document', - 'application/vnd.garmin.tcx+xml' => 'location', - 'application/vnd.google-earth.kml+xml' => 'location', - 'application/vnd.google-earth.kmz' => 'location', - 'application/vnd.ms-excel' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', - 'application/vnd.ms-fontobject' => 'image', - 'application/vnd.ms-powerpoint' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', - 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', - 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', - 'application/vnd.ms-visio.template' => 'application/vnd.visio', - 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', - 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', - 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', - 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', - 'application/vnd.oasis.opendocument.text' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', - 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', - 'application/vnd.visio' => 'x-office/document', - 'application/vnd.wordperfect' => 'x-office/document', - 'application/x-7z-compressed' => 'package/x-generic', - 'application/x-bzip2' => 'package/x-generic', - 'application/x-cbr' => 'text', - 'application/x-compressed' => 'package/x-generic', - 'application/x-dcraw' => 'image', - 'application/x-deb' => 'package/x-generic', - 'application/x-fictionbook+xml' => 'text', - 'application/x-font' => 'image', - 'application/x-gimp' => 'image', - 'application/x-gzip' => 'package/x-generic', - 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', - 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', - 'application/x-iwork-pages-sffpages' => 'x-office/document', - 'application/x-mobipocket-ebook' => 'text', - 'application/x-perl' => 'text/code', - 'application/x-photoshop' => 'image', - 'application/x-php' => 'text/code', - 'application/x-rar-compressed' => 'package/x-generic', - 'application/x-tar' => 'package/x-generic', - 'application/x-tex' => 'text', - 'application/xml' => 'text/html', - 'application/yaml' => 'text/code', - 'application/zip' => 'package/x-generic', - 'database' => 'file', - 'httpd/unix-directory' => 'dir', - 'text/css' => 'text/code', - 'text/csv' => 'x-office/spreadsheet', - 'text/html' => 'text/code', - 'text/x-c' => 'text/code', - 'text/x-c++src' => 'text/code', - 'text/x-h' => 'text/code', - 'text/x-java-source' => 'text/code', - 'text/x-ldif' => 'text/code', - 'text/x-python' => 'text/code', - 'text/x-shellscript' => 'text/code', - 'web' => 'text/code', - 'application/internet-shortcut' => 'link', - ]); + '_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', + '_comment4' => 'After any change to mimetypealiases.json run:', + '_comment5' => './occ maintenance:mimetype:update-js', + '_comment6' => 'Otherwise your update won\'t propagate through the system.', + 'application/coreldraw' => 'image', + 'application/test' => 'image', + 'application/epub+zip' => 'text', + 'application/font-sfnt' => 'image', + 'application/font-woff' => 'image', + 'application/gpx+xml' => 'location', + 'application/illustrator' => 'image', + 'application/javascript' => 'text/code', + 'application/json' => 'text/code', + 'application/msaccess' => 'file', + 'application/msexcel' => 'x-office/spreadsheet', + 'application/msonenote' => 'x-office/document', + 'application/mspowerpoint' => 'x-office/presentation', + 'application/msword' => 'x-office/document', + 'application/octet-stream' => 'file', + 'application/postscript' => 'image', + 'application/rss+xml' => 'application/xml', + 'application/vnd.android.package-archive' => 'package/x-generic', + 'application/vnd.lotus-wordpro' => 'x-office/document', + 'application/vnd.garmin.tcx+xml' => 'location', + 'application/vnd.google-earth.kml+xml' => 'location', + 'application/vnd.google-earth.kmz' => 'location', + 'application/vnd.ms-excel' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.addin.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-excel.template.macroEnabled.12' => 'x-office/spreadsheet', + 'application/vnd.ms-fontobject' => 'image', + 'application/vnd.ms-powerpoint' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-powerpoint.template.macroEnabled.12' => 'x-office/presentation', + 'application/vnd.ms-visio.drawing.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.drawing' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.stencil' => 'application/vnd.visio', + 'application/vnd.ms-visio.template.macroEnabled.12' => 'application/vnd.visio', + 'application/vnd.ms-visio.template' => 'application/vnd.visio', + 'application/vnd.ms-word.document.macroEnabled.12' => 'x-office/document', + 'application/vnd.ms-word.template.macroEnabled.12' => 'x-office/document', + 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', + 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', + 'application/vnd.oasis.opendocument.text' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', + 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'x-office/document', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'x-office/document', + 'application/vnd.visio' => 'x-office/document', + 'application/vnd.wordperfect' => 'x-office/document', + 'application/x-7z-compressed' => 'package/x-generic', + 'application/x-bzip2' => 'package/x-generic', + 'application/x-cbr' => 'text', + 'application/x-compressed' => 'package/x-generic', + 'application/x-dcraw' => 'image', + 'application/x-deb' => 'package/x-generic', + 'application/x-fictionbook+xml' => 'text', + 'application/x-font' => 'image', + 'application/x-gimp' => 'image', + 'application/x-gzip' => 'package/x-generic', + 'application/x-iwork-keynote-sffkey' => 'x-office/presentation', + 'application/x-iwork-numbers-sffnumbers' => 'x-office/spreadsheet', + 'application/x-iwork-pages-sffpages' => 'x-office/document', + 'application/x-mobipocket-ebook' => 'text', + 'application/x-perl' => 'text/code', + 'application/x-photoshop' => 'image', + 'application/x-php' => 'text/code', + 'application/x-rar-compressed' => 'package/x-generic', + 'application/x-tar' => 'package/x-generic', + 'application/x-tex' => 'text', + 'application/xml' => 'text/html', + 'application/yaml' => 'text/code', + 'application/zip' => 'package/x-generic', + 'database' => 'file', + 'httpd/unix-directory' => 'dir', + 'text/css' => 'text/code', + 'text/csv' => 'x-office/spreadsheet', + 'text/html' => 'text/code', + 'text/x-c' => 'text/code', + 'text/x-c++src' => 'text/code', + 'text/x-h' => 'text/code', + 'text/x-java-source' => 'text/code', + 'text/x-ldif' => 'text/code', + 'text/x-python' => 'text/code', + 'text/x-shellscript' => 'text/code', + 'web' => 'text/code', + 'application/internet-shortcut' => 'link', + ]); $this->environmentHelper ->expects($this->any()) @@ -1101,10 +1101,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Signature could not get verified.', - ] + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Signature could not get verified.', + ] ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); } @@ -1148,24 +1148,24 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'INVALID_HASH' => [ - 'AnotherFile.txt' => [ - 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', - 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', - ], + 'INVALID_HASH' => [ + 'AnotherFile.txt' => [ + 'expected' => '1570ca9420e37629de4328f48c51da29840ddeaa03ae733da4bf1d854b8364f594aac560601270f9e1797ed4cd57c1aea87bf44cf4245295c94f2e935a2f0112', + 'current' => '7322348ba269c6d5522efe02f424fa3a0da319a7cd9c33142a5afe32a2d9af2da3a411f086fcfc96ff4301ea566f481dba0960c2abeef3594c4d930462f6584c', ], - 'FILE_MISSING' => [ - 'subfolder/file.txt' => [ - 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', - 'current' => '', - ], + ], + 'FILE_MISSING' => [ + 'subfolder/file.txt' => [ + 'expected' => '410738545fb623c0a5c8a71f561e48ea69e3ada0981a455e920a5ae9bf17c6831ae654df324f9328ff8453de179276ae51931cca0fa71fe8ccde6c083ca0574b', + 'current' => '', ], - 'EXTRA_FILE' => [ - 'UnecessaryFile' => [ - 'expected' => '', - 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', - ], + ], + 'EXTRA_FILE' => [ + 'UnecessaryFile' => [ + 'expected' => '', + 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], + ], ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); @@ -1210,10 +1210,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Certificate is not valid.', - ] + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Certificate is not valid.', + ] ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); } @@ -1257,10 +1257,10 @@ class CheckerTest extends TestCase { ->willReturn(file_get_contents(__DIR__ .'/../../data/integritycheck/root.crt')); $expected = [ - 'EXCEPTION' => [ - 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', - 'message' => 'Certificate is not valid for required scope. (Requested: core, current: CN=SomeApp)', - ] + 'EXCEPTION' => [ + 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', + 'message' => 'Certificate is not valid for required scope. (Requested: core, current: CN=SomeApp)', + ] ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); } diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php index f6e85ea188..8fa339dbba 100644 --- a/tests/lib/LegacyHelperTest.php +++ b/tests/lib/LegacyHelperTest.php @@ -69,11 +69,11 @@ class LegacyHelperTest extends \Test\TestCase { $arrayStart = [ "Foo" => "bar", "Bar" => "foo", - ]; + ]; $arrayResult = [ "foo" => "bar", "bar" => "foo", - ]; + ]; $result = OC_Helper::mb_array_change_key_case($arrayStart); $expected = $arrayResult; $this->assertEquals($result, $expected); @@ -81,11 +81,11 @@ class LegacyHelperTest extends \Test\TestCase { $arrayStart = [ "foo" => "bar", "bar" => "foo", - ]; + ]; $arrayResult = [ "FOO" => "bar", "BAR" => "foo", - ]; + ]; $result = OC_Helper::mb_array_change_key_case($arrayStart, MB_CASE_UPPER); $expected = $arrayResult; $this->assertEquals($result, $expected); @@ -95,7 +95,7 @@ class LegacyHelperTest extends \Test\TestCase { $haystack = [ "Foo" => "own", "Bar" => "Cloud", - ]; + ]; $result = OC_Helper::recursiveArraySearch($haystack, "own"); $expected = "Foo"; diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 74cb3948c5..e2ab0e3fdd 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -228,9 +228,9 @@ class NavigationManagerTest extends TestCase { $this->userSession->expects($this->any())->method('getUser')->willReturn($user); $this->userSession->expects($this->any())->method('isLoggedIn')->willReturn(true); $this->appManager->expects($this->once()) - ->method('getEnabledAppsForUser') - ->with($user) - ->willReturn(['test']); + ->method('getEnabledAppsForUser') + ->with($user) + ->willReturn(['test']); $this->groupManager->expects($this->any())->method('isAdmin')->willReturn($isAdmin); $subadmin = $this->createMock(SubAdmin::class); $subadmin->expects($this->any())->method('isSubAdmin')->with($user)->willReturn(false); diff --git a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php index 218a59caa3..30df6474b8 100644 --- a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php +++ b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php @@ -73,9 +73,9 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase { */ public function testShouldRun($from, $expected) { $this->config->expects($this->any()) - ->method('getSystemValue') - ->with('version', '0.0.0.0') - ->willReturn($from); + ->method('getSystemValue') + ->with('version', '0.0.0.0') + ->willReturn($from); $this->assertEquals($expected, $this->invokePrivate($this->repair, 'shouldRun')); } diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php index 80dc8694b1..d17988f4d1 100644 --- a/tests/lib/Share/ShareTest.php +++ b/tests/lib/Share/ShareTest.php @@ -276,44 +276,44 @@ class ShareTest extends \Test\TestCase { [ // 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 [ [ // 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 [ [ // 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/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 396f0cbad8..c3f663052e 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -302,7 +302,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->rootFolder ->method('getUserFolder') ->willReturnMap([ - ['shareOwner', $shareOwnerFolder], + ['shareOwner', $shareOwnerFolder], ]); $share = $this->provider->getShareById($id); @@ -385,7 +385,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->rootFolder ->method('getUserFolder') ->willReturnMap([ - ['shareOwner', $shareOwnerFolder], + ['shareOwner', $shareOwnerFolder], ]); $share = $this->provider->getShareById($id); @@ -761,8 +761,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->rootFolder ->method('getUserFolder') ->willReturnMap([ - ['sharedBy', $userFolder], - ['shareOwner', $ownerFolder], + ['sharedBy', $userFolder], + ['shareOwner', $ownerFolder], ]); $userFolder->method('getById') diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index e46e019c6e..f48d776eb0 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -124,8 +124,8 @@ class ManagerTest extends \Test\TestCase { $this->l = $this->createMock(IL10N::class); $this->l->method('t') ->willReturnCallback(function($text, $parameters = []) { - return vsprintf($text, $parameters); - }); + return vsprintf($text, $parameters); + }); $this->factory = new DummyFactory(\OC::$server); @@ -492,7 +492,7 @@ class ManagerTest extends \Test\TestCase { public function testVerifyPasswordNull() { $this->config->method('getAppValue')->willReturnMap([ - ['core', 'shareapi_enforce_links_password', 'no', 'no'], + ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); $result = self::invokePrivate($this->manager, 'verifyPassword', [null]); @@ -501,7 +501,7 @@ class ManagerTest extends \Test\TestCase { public function testVerifyPasswordHook() { $this->config->method('getAppValue')->willReturnMap([ - ['core', 'shareapi_enforce_links_password', 'no', 'no'], + ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); $this->eventDispatcher->expects($this->once())->method('dispatch') @@ -522,7 +522,7 @@ class ManagerTest extends \Test\TestCase { $this->expectExceptionMessage('password not accepted'); $this->config->method('getAppValue')->willReturnMap([ - ['core', 'shareapi_enforce_links_password', 'no', 'no'], + ['core', 'shareapi_enforce_links_password', 'no', 'no'], ]); $this->eventDispatcher->expects($this->once())->method('dispatch') @@ -1096,7 +1096,7 @@ class ManagerTest extends \Test\TestCase { } - public function testUserCreateChecksIdenticalPathSharedViaGroup() { + public function testUserCreateChecksIdenticalPathSharedViaGroup() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Path is already shared with this user'); @@ -1137,7 +1137,7 @@ class ManagerTest extends \Test\TestCase { self::invokePrivate($this->manager, 'userCreateChecks', [$share]); } - public function testUserCreateChecksIdenticalPathSharedViaDeletedGroup() { + public function testUserCreateChecksIdenticalPathSharedViaDeletedGroup() { $share = $this->manager->newShare(); $sharedWith = $this->createMock(IUser::class); @@ -2410,8 +2410,8 @@ class ManagerTest extends \Test\TestCase { ->expects($this->at(1)) ->method('getAppValue') ->willReturnMap([ - ['core', 'shareapi_allow_public_upload', 'yes', 'no'], - ]); + ['core', 'shareapi_allow_public_upload', 'yes', 'no'], + ]); $this->defaultProvider->expects($this->once()) ->method('getShareByToken') diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index 7aa1eb177d..8c1eb66d30 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -69,8 +69,8 @@ class CSSResourceLocatorTest extends \Test\TestCase { private function cssResourceLocator() { /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ - $factory = $this->createMock(Factory::class); - $factory->method('get')->with('css')->willReturn($this->appData); + $factory = $this->createMock(Factory::class); + $factory->method('get')->with('css')->willReturn($this->appData); $scssCacher = new SCSSCacher( $this->logger, $factory, @@ -130,10 +130,10 @@ class CSSResourceLocatorTest extends \Test\TestCase { // Use the symlink as the app path \OC::$APPSROOTS[] = [ - 'path' => $new_apps_path_symlink, - 'url' => '/css-apps-test', - 'writable' => false, - ]; + 'path' => $new_apps_path_symlink, + 'url' => '/css-apps-test', + 'writable' => false, + ]; $locator = $this->cssResourceLocator(); $locator->find(['test-css-app/test-file']); diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index 8c8fc99c96..0e6b217ec5 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -110,10 +110,10 @@ class JSResourceLocatorTest extends \Test\TestCase { // Use the symlink as the app path \OC::$APPSROOTS[] = [ - 'path' => $new_apps_path_symlink, - 'url' => '/js-apps-test', - 'writable' => false, - ]; + 'path' => $new_apps_path_symlink, + 'url' => '/js-apps-test', + 'writable' => false, + ]; $locator = $this->jsResourceLocator(); $locator->find(['test-js-app/test-file']);