Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xappinfo/app.php4
-rw-r--r--appinfo/routes.php1
-rw-r--r--composer.lock135
-rw-r--r--lib/Account.php1
-rw-r--r--lib/Address.php2
-rw-r--r--lib/AddressList.php23
-rw-r--r--lib/AppInfo/Application.php2
-rw-r--r--lib/AppInfo/BootstrapSingleton.php5
-rw-r--r--lib/BackgroundJob/SyncJob.php5
-rw-r--r--lib/Cache/Cache.php3
-rw-r--r--lib/Command/CreateAccount.php28
-rw-r--r--lib/Command/DiagnoseAccount.php2
-rw-r--r--lib/Command/ExportAccount.php4
-rw-r--r--lib/Command/SyncAccount.php10
-rw-r--r--lib/Contracts/IMailManager.php1
-rw-r--r--lib/Contracts/IMailSearch.php5
-rw-r--r--lib/Controller/AccountsController.php1
-rw-r--r--lib/Controller/AutoCompleteController.php1
-rw-r--r--lib/Controller/AvatarsController.php1
-rw-r--r--lib/Controller/FoldersController.php3
-rw-r--r--lib/Controller/LocalAttachmentsController.php1
-rwxr-xr-xlib/Controller/MessagesController.php13
-rw-r--r--lib/Controller/PageController.php1
-rw-r--r--lib/Controller/PreferencesController.php1
-rw-r--r--lib/Controller/ProxyController.php1
-rw-r--r--lib/Controller/SettingsController.php5
-rw-r--r--lib/Db/Alias.php1
-rw-r--r--lib/Db/AliasMapper.php1
-rw-r--r--lib/Db/CollectedAddress.php2
-rw-r--r--lib/Db/CollectedAddressMapper.php1
-rw-r--r--lib/Db/LocalAttachment.php1
-rw-r--r--lib/Db/LocalAttachmentMapper.php1
-rw-r--r--lib/Db/MailAccount.php1
-rw-r--r--lib/Db/MailAccountMapper.php4
-rw-r--r--lib/Db/Mailbox.php6
-rw-r--r--lib/Db/MailboxMapper.php5
-rw-r--r--lib/Db/Message.php6
-rw-r--r--lib/Db/MessageMapper.php25
-rw-r--r--lib/Events/BeforeMessageDeletedEvent.php6
-rw-r--r--lib/Events/DraftSavedEvent.php5
-rw-r--r--lib/Events/MessageDeletedEvent.php6
-rw-r--r--lib/Events/MessageFlaggedEvent.php1
-rw-r--r--lib/Events/MessageSentEvent.php5
-rw-r--r--lib/Events/SaveDraftEvent.php5
-rw-r--r--lib/Exception/AttachmentNotFoundException.php1
-rw-r--r--lib/Exception/ClientException.php2
-rw-r--r--lib/Exception/IncompleteSyncException.php1
-rw-r--r--lib/Exception/MailboxLockedException.php6
-rw-r--r--lib/Exception/MailboxNotCachedException.php6
-rw-r--r--lib/Exception/NotImplemented.php1
-rw-r--r--lib/Exception/ServiceException.php1
-rw-r--r--lib/Exception/UidValidityChangedException.php5
-rw-r--r--lib/Exception/UploadException.php1
-rw-r--r--lib/Folder.php1
-rw-r--r--lib/HordeTranslationHandler.php2
-rw-r--r--lib/Http/AttachmentDownloadResponse.php1
-rw-r--r--lib/Http/AvatarDownloadResponse.php1
-rw-r--r--lib/Http/HtmlResponse.php1
-rw-r--r--lib/Http/JsonResponse.php2
-rw-r--r--lib/Http/Middleware/ErrorMiddleware.php1
-rw-r--r--lib/Http/Middleware/ProvisioningMiddleware.php1
-rw-r--r--lib/Http/ProxyDownloadResponse.php1
-rw-r--r--lib/IMAP/FolderMapper.php3
-rw-r--r--lib/IMAP/FolderStats.php1
-rw-r--r--lib/IMAP/IMAPClientFactory.php1
-rw-r--r--lib/IMAP/MailboxSync.php5
-rw-r--r--lib/IMAP/MessageMapper.php3
-rw-r--r--lib/IMAP/MessageStructureData.php1
-rw-r--r--lib/IMAP/PreviewEnhancer.php1
-rw-r--r--lib/IMAP/Search/Provider.php5
-rw-r--r--lib/IMAP/Sync/Request.php1
-rw-r--r--lib/IMAP/Sync/Response.php1
-rw-r--r--lib/IMAP/Sync/Synchronizer.php1
-rw-r--r--lib/Integration/KItinerary/ItineraryExtractor.php5
-rw-r--r--lib/Integration/Psr/LoggerAdapter.php5
-rw-r--r--lib/Listener/AddressCollectionListener.php5
-rw-r--r--lib/Listener/DeleteDraftListener.php7
-rw-r--r--lib/Listener/DraftMailboxCreatorListener.php5
-rw-r--r--lib/Listener/FlagRepliedMessageListener.php6
-rw-r--r--lib/Listener/InteractionListener.php1
-rw-r--r--lib/Listener/MessageCacheUpdaterListener.php1
-rw-r--r--lib/Listener/SaveSentMessageListener.php5
-rw-r--r--lib/Listener/TrashMailboxCreatorListener.php5
-rw-r--r--lib/Mailbox.php4
-rw-r--r--lib/Migration/FixAccountSyncs.php2
-rw-r--r--lib/Migration/FixCollectedAddresses.php1
-rw-r--r--lib/Migration/MakeItineraryExtractorExecutable.php1
-rw-r--r--lib/Migration/MigrateProvisioningConfig.php1
-rw-r--r--lib/Migration/ProvisionAccounts.php1
-rw-r--r--lib/Migration/Version0130Date20190408134101.php1
-rw-r--r--lib/Migration/Version0156Date20190828140357.php5
-rw-r--r--lib/Migration/Version0161Date20190902103559.php5
-rw-r--r--lib/Migration/Version0161Date20190902103701.php5
-rw-r--r--lib/Migration/Version0161Date20190902114635.php5
-rw-r--r--lib/Migration/Version0180Date20190927124207.php5
-rw-r--r--lib/Migration/Version0190Date20191118160843.php1
-rw-r--r--lib/Migration/Version0210Date20191212144925.php1
-rw-r--r--lib/Migration/Version1020Date20191002091034.php5
-rw-r--r--lib/Migration/Version1020Date20191002091035.php5
-rw-r--r--lib/Migration/Version1020Date20200206134751.php1
-rw-r--r--lib/Migration/Version1030Date20200228105714.php1
-rw-r--r--lib/Model/ConvertAddresses.php2
-rw-r--r--lib/Model/IMAPMessage.php2
-rw-r--r--lib/Model/Message.php2
-rw-r--r--lib/Model/NewMessageData.php1
-rw-r--r--lib/Model/RepliedMessageData.php1
-rw-r--r--lib/SMTP/SmtpClientFactory.php1
-rw-r--r--lib/Service/AccountService.php4
-rw-r--r--lib/Service/Attachment/AttachmentService.php1
-rw-r--r--lib/Service/Attachment/AttachmentStorage.php1
-rw-r--r--lib/Service/Attachment/UploadedFile.php1
-rw-r--r--lib/Service/AutoCompletion/AddressCollector.php1
-rw-r--r--lib/Service/AutoCompletion/AutoCompleteService.php1
-rw-r--r--lib/Service/AutoConfig/AutoConfig.php1
-rw-r--r--lib/Service/AutoConfig/ConfigurationDetector.php1
-rw-r--r--lib/Service/AutoConfig/ConnectivityTester.php4
-rw-r--r--lib/Service/AutoConfig/ImapConnectivityTester.php1
-rw-r--r--lib/Service/AutoConfig/ImapConnector.php2
-rw-r--r--lib/Service/AutoConfig/ImapServerDetector.php1
-rw-r--r--lib/Service/AutoConfig/IspDb.php1
-rw-r--r--lib/Service/AutoConfig/IspDbConfigurationDetector.php1
-rw-r--r--lib/Service/AutoConfig/MxRecord.php3
-rw-r--r--lib/Service/AutoConfig/SmtpConnectivityTester.php1
-rw-r--r--lib/Service/AutoConfig/SmtpServerDetector.php1
-rw-r--r--lib/Service/Avatar/AddressbookSource.php1
-rw-r--r--lib/Service/Avatar/Avatar.php1
-rw-r--r--lib/Service/Avatar/AvatarFactory.php1
-rw-r--r--lib/Service/Avatar/Cache.php3
-rw-r--r--lib/Service/Avatar/CompositeAvatarSource.php1
-rw-r--r--lib/Service/Avatar/Downloader.php1
-rw-r--r--lib/Service/Avatar/FaviconSource.php5
-rw-r--r--lib/Service/Avatar/GravatarSource.php1
-rw-r--r--lib/Service/AvatarService.php1
-rw-r--r--lib/Service/ContactsIntegration.php1
-rw-r--r--lib/Service/Group/ContactsGroupService.php2
-rw-r--r--lib/Service/Group/IGroupService.php2
-rw-r--r--lib/Service/GroupsIntegration.php1
-rwxr-xr-xlib/Service/Html.php1
-rw-r--r--lib/Service/HtmlPurify/CidURIScheme.php1
-rwxr-xr-xlib/Service/HtmlPurify/TransformHTMLLinks.php1
-rw-r--r--lib/Service/HtmlPurify/TransformURLScheme.php2
-rw-r--r--lib/Service/IMailBox.php1
-rw-r--r--lib/Service/ItineraryService.php7
-rw-r--r--lib/Service/MailManager.php1
-rw-r--r--lib/Service/MailTransmission.php1
-rw-r--r--lib/Service/Provisioning/Config.php2
-rw-r--r--lib/Service/Provisioning/ConfigMapper.php6
-rw-r--r--lib/Service/Provisioning/Manager.php1
-rw-r--r--lib/Service/Search/FilterStringParser.php6
-rw-r--r--lib/Service/Search/MailSearch.php5
-rw-r--r--lib/Service/Search/SearchQuery.php5
-rw-r--r--lib/Service/SetupService.php3
-rw-r--r--lib/Service/Sync/ImapToDbSynchronizer.php7
-rw-r--r--lib/Service/Sync/SyncService.php1
-rw-r--r--lib/Service/UserPreferenceSevice.php1
-rw-r--r--lib/Settings/AdminSettings.php1
-rw-r--r--lib/Support/HostNameFactory.php1
-rw-r--r--lib/Support/PerformanceLogger.php5
-rw-r--r--lib/Support/PerformanceLoggerTask.php5
-rw-r--r--tests/AddressListTest.php2
-rw-r--r--tests/AddressTest.php2
-rw-r--r--tests/FolderTest.php1
-rw-r--r--tests/HordeTranslationHandlerTest.php2
-rw-r--r--tests/Integration/Db/AliasMapperTest.php22
-rw-r--r--tests/Integration/Db/CollectedAddressMapperTest.php2
-rw-r--r--tests/Integration/Db/MailAccountMapperTest.php9
-rw-r--r--tests/Integration/Db/MailAccountTest.php8
-rw-r--r--tests/Integration/Db/MailboxMapperTest.php6
-rw-r--r--tests/Integration/Framework/ImapTest.php11
-rw-r--r--tests/Integration/Framework/ImapTestAccount.php1
-rw-r--r--tests/Integration/Framework/MessageBuilder.php1
-rw-r--r--tests/Integration/Framework/SelfTest.php2
-rw-r--r--tests/Integration/Framework/SimpleMessage.php15
-rw-r--r--tests/Integration/IMAP/AbstractTest.php2
-rw-r--r--tests/Integration/IMAP/AccountTest.php1
-rw-r--r--tests/Integration/IMAP/IMAPClientFactoryTest.php5
-rw-r--r--tests/Integration/KItinerary/ItineraryExtractorTest.php5
-rw-r--r--tests/Integration/MailboxSynchronizationTest.php2
-rw-r--r--tests/Integration/Service/Avatar/FaviconSourceTest.php5
-rw-r--r--tests/Integration/Service/AvatarServiceIntegrationTest.php1
-rw-r--r--tests/Integration/Service/FolderMapperIntegrationTest.php1
-rw-r--r--tests/Integration/Service/MailTransmissionIntegrationTest.php2
-rw-r--r--tests/Integration/TestCase.php2
-rw-r--r--tests/Service/ItineraryServiceTest.php5
-rw-r--r--tests/Unit/AppInfo/ApplicationTest.php2
-rw-r--r--tests/Unit/Command/CreateAccountTest.php2
-rw-r--r--tests/Unit/Controller/AccountsControllerTest.php9
-rw-r--r--tests/Unit/Controller/AutoconfigControllerTest.php2
-rw-r--r--tests/Unit/Controller/AvatarControllerTest.php3
-rw-r--r--tests/Unit/Controller/FoldersControllerTest.php1
-rw-r--r--tests/Unit/Controller/LocalAttachmentsControllerTest.php1
-rw-r--r--tests/Unit/Controller/MessagesControllerTest.php1
-rw-r--r--tests/Unit/Controller/PageControllerTest.php5
-rw-r--r--tests/Unit/Controller/PreferencesControllerTest.php1
-rw-r--r--tests/Unit/Controller/ProxyControllerTest.php1
-rw-r--r--tests/Unit/Controller/SettingsControllerTest.php4
-rw-r--r--tests/Unit/Http/AttachmentDownloadResponseTest.php3
-rw-r--r--tests/Unit/Http/AvatarDownloadResponseTest.php2
-rw-r--r--tests/Unit/Http/HtmlResponseTest.php4
-rw-r--r--tests/Unit/Http/Middleware/ErrorMiddlewareTest.php1
-rw-r--r--tests/Unit/Http/Middleware/ProvisioningMiddlewareTest.php5
-rw-r--r--tests/Unit/Http/ProxyDownloadResponseTest.php3
-rw-r--r--tests/Unit/IMAP/FolderMapperTest.php13
-rw-r--r--tests/Unit/IMAP/MailboxSyncTest.php1
-rw-r--r--tests/Unit/IMAP/MessageMapperTest.php1
-rw-r--r--tests/Unit/IMAP/Sync/RequestTest.php1
-rw-r--r--tests/Unit/IMAP/Sync/ResponseTest.php2
-rw-r--r--tests/Unit/IMAP/Sync/SynchronizerTest.php5
-rw-r--r--tests/Unit/Listener/AddressCollectionListenerTest.php5
-rw-r--r--tests/Unit/Listener/DeleteDraftListenerTest.php1
-rw-r--r--tests/Unit/Listener/DraftMailboxCreatorListenerTest.php5
-rw-r--r--tests/Unit/Listener/FlagRepliedMessageListenerTest.php5
-rw-r--r--tests/Unit/Listener/InteractionListenerTest.php1
-rw-r--r--tests/Unit/Listener/MessageCacheUpdaterListenerTest.php1
-rw-r--r--tests/Unit/Listener/SaveSentMessageListenerTest.php5
-rw-r--r--tests/Unit/Listener/TrashMailboxCreatorListenerTest.php5
-rw-r--r--tests/Unit/Migration/FixCollectedAddressesTest.php49
-rw-r--r--tests/Unit/Migration/MigrateProvisioningConfigTest.php5
-rw-r--r--tests/Unit/Model/IMAPMessageTest.php6
-rw-r--r--tests/Unit/Model/MessageTest.php2
-rw-r--r--tests/Unit/Model/NewMessageDataTest.php2
-rw-r--r--tests/Unit/Model/RepliedMessageTest.php2
-rw-r--r--tests/Unit/SMTP/SmtpClientFactoryTest.php1
-rw-r--r--tests/Unit/Service/AccountServiceTest.php1
-rw-r--r--tests/Unit/Service/AliasesServiceTest.php17
-rw-r--r--tests/Unit/Service/Attachment/AttachmentServiceTest.php21
-rw-r--r--tests/Unit/Service/Attachment/AttachmentStorageTest.php2
-rw-r--r--tests/Unit/Service/Attachment/UploadedFileTest.php2
-rw-r--r--tests/Unit/Service/Autocompletion/AddressCollectorTest.php2
-rw-r--r--tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/AutoConfigTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/ImapConnectorTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/IspDbTest.php2
-rw-r--r--tests/Unit/Service/Autoconfig/MxRecordTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php1
-rw-r--r--tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php1
-rw-r--r--tests/Unit/Service/Avatar/AddressbookSourceTest.php1
-rw-r--r--tests/Unit/Service/Avatar/CacheTest.php4
-rw-r--r--tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php1
-rw-r--r--tests/Unit/Service/Avatar/DownloaderTest.php1
-rw-r--r--tests/Unit/Service/Avatar/FaviconSourceTest.php5
-rw-r--r--tests/Unit/Service/Avatar/GravatarSouceTest.php1
-rw-r--r--tests/Unit/Service/AvatarServiceTest.php4
-rw-r--r--tests/Unit/Service/ContactsIntegrationTest.php1
-rw-r--r--tests/Unit/Service/Group/ContactsGroupServiceTest.php5
-rw-r--r--tests/Unit/Service/Group/NextcloudGroupServiceTest.php4
-rw-r--r--tests/Unit/Service/GroupsIntegrationTest.php6
-rw-r--r--tests/Unit/Service/HtmlTest.php7
-rw-r--r--tests/Unit/Service/MailManagerTest.php5
-rw-r--r--tests/Unit/Service/MailTransmissionTest.php5
-rw-r--r--tests/Unit/Service/Provisioning/ConfigMapperTest.php5
-rw-r--r--tests/Unit/Service/Provisioning/ConfigTest.php2
-rw-r--r--tests/Unit/Service/Provisioning/TestConfig.php6
-rw-r--r--tests/Unit/Service/Search/MailSearchTest.php5
-rw-r--r--tests/Unit/Service/SetupServiceTest.php1
-rw-r--r--tests/Unit/Service/UserPreferenceServiceTest.php1
-rw-r--r--tests/Unit/Settings/AdminSettingsTest.php4
261 files changed, 493 insertions, 536 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 8d40b4ea7..d66f63c7a 100755
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -39,8 +39,8 @@ $g = \OC::$server->getURLGenerator();
[
'id' => 'mail',
'order' => 3,
- 'href' => $g->linkToRoute( 'mail.page.index' ),
- 'icon' => $g->imagePath( 'mail', 'mail.svg' ),
+ 'href' => $g->linkToRoute('mail.page.index'),
+ 'icon' => $g->imagePath('mail', 'mail.svg'),
'name' => $l->t('Mail'),
]
);
diff --git a/appinfo/routes.php b/appinfo/routes.php
index d479c5df3..79a85b922 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/composer.lock b/composer.lock
index c21da345a..522849dc1 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1336,6 +1336,12 @@
"Xdebug",
"performance"
],
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ }
+ ],
"time": "2020-03-01T12:26:26+00:00"
},
{
@@ -4045,6 +4051,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-03-27T16:54:36+00:00"
},
{
@@ -4153,6 +4173,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-03-27T16:54:36+00:00"
},
{
@@ -4202,6 +4236,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-03-27T16:54:36+00:00"
},
{
@@ -4256,6 +4304,20 @@
"configuration",
"options"
],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-03-27T16:54:36+00:00"
},
{
@@ -4314,6 +4376,20 @@
"polyfill",
"portable"
],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-02-27T09:26:54+00:00"
},
{
@@ -4373,6 +4449,20 @@
"portable",
"shim"
],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-03-09T19:04:49+00:00"
},
{
@@ -4487,6 +4577,20 @@
"portable",
"shim"
],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-02-27T09:26:54+00:00"
},
{
@@ -4545,6 +4649,20 @@
"portable",
"shim"
],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-02-27T09:26:54+00:00"
},
{
@@ -4702,6 +4820,20 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"time": "2020-03-27T16:54:36+00:00"
},
{
@@ -5008,5 +5140,6 @@
"platform-dev": [],
"platform-overrides": {
"php": "7.2"
- }
+ },
+ "plugin-api-version": "1.1.0"
}
diff --git a/lib/Account.php b/lib/Account.php
index 213a6e3c0..2934aebed 100644
--- a/lib/Account.php
+++ b/lib/Account.php
@@ -233,5 +233,4 @@ class Account implements JsonSerializable {
public function newMessage() {
return new Message();
}
-
}
diff --git a/lib/Address.php b/lib/Address.php
index c099893fd..aaac62adf 100644
--- a/lib/Address.php
+++ b/lib/Address.php
@@ -30,7 +30,6 @@ use Horde_Mail_Rfc822_Address;
use JsonSerializable;
class Address implements JsonSerializable {
-
public const TYPE_FROM = 0;
public const TYPE_TO = 1;
public const TYPE_CC = 2;
@@ -95,5 +94,4 @@ class Address implements JsonSerializable {
return $this->getEmail() === $object->getEmail()
&& $this->getLabel() === $object->getLabel();
}
-
}
diff --git a/lib/AddressList.php b/lib/AddressList.php
index 5319e5303..0fed80385 100644
--- a/lib/AddressList.php
+++ b/lib/AddressList.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -60,12 +62,12 @@ class AddressList implements Countable, JsonSerializable {
* @return AddressList
*/
public static function fromHorde(Horde_Mail_Rfc822_List $hordeList) {
- $addresses = array_map(function(Horde_Mail_Rfc822_Address $addr) {
+ $addresses = array_map(function (Horde_Mail_Rfc822_Address $addr) {
return new Address($addr->personal, $addr->bare_address);
- }, array_filter(iterator_to_array($hordeList), function(Horde_Mail_Rfc822_Object $obj) {
- // TODO: how to handle non-addresses? This doesn't seem right …
- return $obj instanceof Horde_Mail_Rfc822_Address;
- }));
+ }, array_filter(iterator_to_array($hordeList), function (Horde_Mail_Rfc822_Object $obj) {
+ // TODO: how to handle non-addresses? This doesn't seem right …
+ return $obj instanceof Horde_Mail_Rfc822_Address;
+ }));
return new AddressList($addresses);
}
@@ -94,7 +96,7 @@ class AddressList implements Countable, JsonSerializable {
* @return array
*/
public function jsonSerialize() {
- return array_map(function(Address $address) {
+ return array_map(function (Address $address) {
return $address->jsonSerialize();
}, $this->addresses);
}
@@ -126,8 +128,8 @@ class AddressList implements Countable, JsonSerializable {
public function merge(AddressList $other) {
$addresses = $this->addresses;
- array_walk($other->addresses, function(Address $address) use (&$addresses) {
- $same = array_filter($addresses, function(Address $our) use ($address) {
+ array_walk($other->addresses, function (Address $address) use (&$addresses) {
+ $same = array_filter($addresses, function (Address $our) use ($address) {
// Check whether our array contains the other address
return $our->equals($address);
});
@@ -145,10 +147,9 @@ class AddressList implements Countable, JsonSerializable {
* @return Horde_Mail_Rfc822_List
*/
public function toHorde() {
- $hordeAddresses = array_map(function(Address $address) {
+ $hordeAddresses = array_map(function (Address $address) {
return $address->toHorde();
}, $this->addresses);
return new Horde_Mail_Rfc822_List($hordeAddresses);
}
-
}
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index baee1c147..efa0a3f35 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -27,7 +27,6 @@ namespace OCA\Mail\AppInfo;
use OCP\AppFramework\App;
class Application extends App {
-
public const APP_ID = 'mail';
public function __construct(array $urlParams = []) {
@@ -35,5 +34,4 @@ class Application extends App {
BootstrapSingleton::getInstance($this->getContainer())->boot();
}
-
}
diff --git a/lib/AppInfo/BootstrapSingleton.php b/lib/AppInfo/BootstrapSingleton.php
index c40c80f57..1e605b794 100644
--- a/lib/AppInfo/BootstrapSingleton.php
+++ b/lib/AppInfo/BootstrapSingleton.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -135,5 +137,4 @@ class BootstrapSingleton {
$dispatcher->addServiceListener(MessageSentEvent::class, SaveSentMessageListener::class);
$dispatcher->addServiceListener(SaveDraftEvent::class, DraftMailboxCreatorListener::class);
}
-
}
diff --git a/lib/BackgroundJob/SyncJob.php b/lib/BackgroundJob/SyncJob.php
index 5fc7c05c0..262355483 100644
--- a/lib/BackgroundJob/SyncJob.php
+++ b/lib/BackgroundJob/SyncJob.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
*
@@ -80,5 +82,4 @@ class SyncJob extends TimedJob {
$this->logger->logException($e);
}
}
-
}
diff --git a/lib/Cache/Cache.php b/lib/Cache/Cache.php
index e78b5fc61..3d935bc3a 100644
--- a/lib/Cache/Cache.php
+++ b/lib/Cache/Cache.php
@@ -35,7 +35,7 @@ use InvalidArgumentException;
class Cache extends Horde_Imap_Client_Cache_Backend {
/** Cache structure version. */
- const VERSION = 3;
+ public const VERSION = 3;
/**
* The cache object.
@@ -476,5 +476,4 @@ class Cache extends Horde_Imap_Client_Cache_Backend {
$this->save();
return parent::serialize();
}
-
}
diff --git a/lib/Command/CreateAccount.php b/lib/Command/CreateAccount.php
index bd90e8b62..0a0e3e2d5 100644
--- a/lib/Command/CreateAccount.php
+++ b/lib/Command/CreateAccount.php
@@ -32,20 +32,19 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateAccount extends Command {
-
- const ARGUMENT_USER_ID = 'user-id';
- const ARGUMENT_NAME = 'name';
- const ARGUMENT_EMAIL = 'email';
- const ARGUMENT_IMAP_HOST = 'imap-host';
- const ARGUMENT_IMAP_PORT = 'imap-port';
- const ARGUMENT_IMAP_SSL_MODE = 'imap-ssl-mode';
- const ARGUMENT_IMAP_USER = 'imap-user';
- const ARGUMENT_IMAP_PASSWORD = 'imap-password';
- const ARGUMENT_SMTP_HOST = 'smtp-host';
- const ARGUMENT_SMTP_PORT = 'smtp-port';
- const ARGUMENT_SMTP_SSL_MODE = 'smtp-ssl-mode';
- const ARGUMENT_SMTP_USER = 'smtp-user';
- const ARGUMENT_SMTP_PASSWORD = 'smtp-password';
+ public const ARGUMENT_USER_ID = 'user-id';
+ public const ARGUMENT_NAME = 'name';
+ public const ARGUMENT_EMAIL = 'email';
+ public const ARGUMENT_IMAP_HOST = 'imap-host';
+ public const ARGUMENT_IMAP_PORT = 'imap-port';
+ public const ARGUMENT_IMAP_SSL_MODE = 'imap-ssl-mode';
+ public const ARGUMENT_IMAP_USER = 'imap-user';
+ public const ARGUMENT_IMAP_PASSWORD = 'imap-password';
+ public const ARGUMENT_SMTP_HOST = 'smtp-host';
+ public const ARGUMENT_SMTP_PORT = 'smtp-port';
+ public const ARGUMENT_SMTP_SSL_MODE = 'smtp-ssl-mode';
+ public const ARGUMENT_SMTP_USER = 'smtp-user';
+ public const ARGUMENT_SMTP_PASSWORD = 'smtp-password';
/** @var AccountService */
private $accountService;
@@ -124,5 +123,4 @@ class CreateAccount extends Command {
$output->writeln("<info>Account $email created</info>");
}
-
}
diff --git a/lib/Command/DiagnoseAccount.php b/lib/Command/DiagnoseAccount.php
index 18e5ed29d..5d49be23a 100644
--- a/lib/Command/DiagnoseAccount.php
+++ b/lib/Command/DiagnoseAccount.php
@@ -40,7 +40,6 @@ use function json_decode;
use function sort;
class DiagnoseAccount extends Command {
-
private const ARGUMENT_ACCOUNT_ID = 'account-id';
/** @var AccountService */
@@ -139,5 +138,4 @@ class DiagnoseAccount extends Command {
}, 0);
$output->writeln("Account has " . $messages . " messages in " . count($mailboxes) . " mailboxes");
}
-
}
diff --git a/lib/Command/ExportAccount.php b/lib/Command/ExportAccount.php
index 4a0298ea2..0dfe13348 100644
--- a/lib/Command/ExportAccount.php
+++ b/lib/Command/ExportAccount.php
@@ -29,8 +29,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ExportAccount extends Command {
-
- const ARGUMENT_USER_ID = 'user-id';
+ public const ARGUMENT_USER_ID = 'user-id';
/** @var AccountService */
private $accountService;
@@ -72,5 +71,4 @@ class ExportAccount extends Command {
$output->writeln("- SMTP host: " . $account->getMailAccount()->getOutboundHost() . ":" . $account->getMailAccount()->getOutboundPort() . ", security: " . $account->getMailAccount()->getOutboundSslMode());
}
}
-
}
diff --git a/lib/Command/SyncAccount.php b/lib/Command/SyncAccount.php
index accc03265..f8a206691 100644
--- a/lib/Command/SyncAccount.php
+++ b/lib/Command/SyncAccount.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -37,9 +39,8 @@ use Symfony\Component\Console\Output\OutputInterface;
use function memory_get_peak_usage;
class SyncAccount extends Command {
-
- const ARGUMENT_ACCOUNT_ID = 'account-id';
- const OPTION_FORCE = 'force';
+ public const ARGUMENT_ACCOUNT_ID = 'account-id';
+ public const OPTION_FORCE = 'force';
/** @var AccountService */
private $accountService;
@@ -98,5 +99,4 @@ class SyncAccount extends Command {
$this->sync($account, $force, $output);
}
}
-
}
diff --git a/lib/Contracts/IMailManager.php b/lib/Contracts/IMailManager.php
index 2b86e621c..d8e839c2b 100644
--- a/lib/Contracts/IMailManager.php
+++ b/lib/Contracts/IMailManager.php
@@ -126,5 +126,4 @@ interface IMailManager {
* @throws ServiceException
*/
public function flagMessage(Account $account, string $mailbox, int $uid, string $flag, bool $value): void;
-
}
diff --git a/lib/Contracts/IMailSearch.php b/lib/Contracts/IMailSearch.php
index 721fa4c4c..4ce094ffc 100644
--- a/lib/Contracts/IMailSearch.php
+++ b/lib/Contracts/IMailSearch.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -55,5 +57,4 @@ interface IMailSearch {
* @throws ServiceException
*/
public function findMessages(Account $account, string $mailboxName, ?string $filter, ?int $cursor): array;
-
}
diff --git a/lib/Controller/AccountsController.php b/lib/Controller/AccountsController.php
index b97b60e1a..9b342eab9 100644
--- a/lib/Controller/AccountsController.php
+++ b/lib/Controller/AccountsController.php
@@ -388,5 +388,4 @@ class AccountsController extends Controller {
throw $ex;
}
}
-
}
diff --git a/lib/Controller/AutoCompleteController.php b/lib/Controller/AutoCompleteController.php
index b714c5e1d..b4e556867 100644
--- a/lib/Controller/AutoCompleteController.php
+++ b/lib/Controller/AutoCompleteController.php
@@ -51,5 +51,4 @@ class AutoCompleteController extends Controller {
public function index(string $term): JSONResponse {
return new JSONResponse($this->service->findMatches($term));
}
-
}
diff --git a/lib/Controller/AvatarsController.php b/lib/Controller/AvatarsController.php
index 7d5d26b7e..8d843996a 100644
--- a/lib/Controller/AvatarsController.php
+++ b/lib/Controller/AvatarsController.php
@@ -124,5 +124,4 @@ class AvatarsController extends Controller {
$response->cacheFor(0);
return $response;
}
-
}
diff --git a/lib/Controller/FoldersController.php b/lib/Controller/FoldersController.php
index c00eae5bd..fd83394e5 100644
--- a/lib/Controller/FoldersController.php
+++ b/lib/Controller/FoldersController.php
@@ -124,7 +124,7 @@ class FoldersController extends Controller {
$account,
base64_decode($folderId),
Horde_Imap_Client::SYNC_NEWMSGSUIDS | Horde_Imap_Client::SYNC_FLAGSUIDS | Horde_Imap_Client::SYNC_VANISHEDUIDS,
- array_map(function($uid) {
+ array_map(function ($uid) {
return (int) $uid;
}, $uids),
!$init,
@@ -212,5 +212,4 @@ class FoldersController extends Controller {
return new JSONResponse($this->mailManager->createFolder($account, $name));
}
-
}
diff --git a/lib/Controller/LocalAttachmentsController.php b/lib/Controller/LocalAttachmentsController.php
index ce98814ba..bcf6af69e 100644
--- a/lib/Controller/LocalAttachmentsController.php
+++ b/lib/Controller/LocalAttachmentsController.php
@@ -71,5 +71,4 @@ class LocalAttachmentsController extends Controller {
return new JSONResponse($attachment, Http::STATUS_CREATED);
}
-
}
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
index f73d78445..32c520d91 100755
--- a/lib/Controller/MessagesController.php
+++ b/lib/Controller/MessagesController.php
@@ -416,8 +416,8 @@ class MessagesController extends Controller {
$attachment = $mailBox->getAttachment($messageId, $attachmentId);
$fileName = $attachment->getName() ?? $this->l10n->t('Embedded message %s', [
- $attachmentId,
- ]) . '.eml';
+ $attachmentId,
+ ]) . '.eml';
$fileParts = pathinfo($fileName);
$fileName = $fileParts['filename'];
$fileExtension = $fileParts['extension'];
@@ -540,10 +540,10 @@ class MessagesController extends Controller {
private function attachmentIsImage(array $attachment): bool {
return in_array(
$attachment['mime'], [
- 'image/jpeg',
- 'image/png',
- 'image/gif'
- ]);
+ 'image/jpeg',
+ 'image/png',
+ 'image/gif'
+ ]);
}
/**
@@ -554,5 +554,4 @@ class MessagesController extends Controller {
private function attachmentIsCalendarEvent(array $attachment): bool {
return in_array($attachment['mime'], ['text/calendar', 'application/ics'], true);
}
-
}
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 93d975381..59d95c0ee 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -185,5 +185,4 @@ class PageController extends Controller {
$baseUrl = $this->urlGenerator->linkToRoute("mail.page.index");
return new RedirectResponse($baseUrl . $hashParams);
}
-
}
diff --git a/lib/Controller/PreferencesController.php b/lib/Controller/PreferencesController.php
index 280f70422..201b8be38 100644
--- a/lib/Controller/PreferencesController.php
+++ b/lib/Controller/PreferencesController.php
@@ -80,5 +80,4 @@ class PreferencesController extends Controller {
'value' => $newValue,
]);
}
-
}
diff --git a/lib/Controller/ProxyController.php b/lib/Controller/ProxyController.php
index 3f1acffef..1cafae9ce 100644
--- a/lib/Controller/ProxyController.php
+++ b/lib/Controller/ProxyController.php
@@ -124,5 +124,4 @@ class ProxyController extends Controller {
$content = $response->getBody();
return new ProxyDownloadResponse($content, $src, 'application/octet-stream');
}
-
}
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php
index ccd80549d..32c7516ff 100644
--- a/lib/Controller/SettingsController.php
+++ b/lib/Controller/SettingsController.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -69,5 +71,4 @@ class SettingsController extends Controller {
return new JSONResponse(null);
}
-
}
diff --git a/lib/Db/Alias.php b/lib/Db/Alias.php
index eae912b5d..0124d1535 100644
--- a/lib/Db/Alias.php
+++ b/lib/Db/Alias.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/lib/Db/AliasMapper.php b/lib/Db/AliasMapper.php
index 6c9eabe8f..4673bdcae 100644
--- a/lib/Db/AliasMapper.php
+++ b/lib/Db/AliasMapper.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/lib/Db/CollectedAddress.php b/lib/Db/CollectedAddress.php
index aed152166..7d611d762 100644
--- a/lib/Db/CollectedAddress.php
+++ b/lib/Db/CollectedAddress.php
@@ -32,9 +32,7 @@ use OCP\AppFramework\Db\Entity;
* @method string getDisplayName()
*/
class CollectedAddress extends Entity {
-
protected $userId;
protected $email;
protected $displayName;
-
}
diff --git a/lib/Db/CollectedAddressMapper.php b/lib/Db/CollectedAddressMapper.php
index 780e04153..e01073478 100644
--- a/lib/Db/CollectedAddressMapper.php
+++ b/lib/Db/CollectedAddressMapper.php
@@ -100,5 +100,4 @@ class CollectedAddressMapper extends QBMapper {
return $this->findEntities($query);
}
-
}
diff --git a/lib/Db/LocalAttachment.php b/lib/Db/LocalAttachment.php
index a10d697a3..f6dd8c50e 100644
--- a/lib/Db/LocalAttachment.php
+++ b/lib/Db/LocalAttachment.php
@@ -50,5 +50,4 @@ class LocalAttachment extends Entity implements JsonSerializable {
'fileName' => $this->fileName,
];
}
-
}
diff --git a/lib/Db/LocalAttachmentMapper.php b/lib/Db/LocalAttachmentMapper.php
index 2c6a182fb..c809e7b59 100644
--- a/lib/Db/LocalAttachmentMapper.php
+++ b/lib/Db/LocalAttachmentMapper.php
@@ -53,5 +53,4 @@ class LocalAttachmentMapper extends QBMapper {
return $this->findEntity($query);
}
-
}
diff --git a/lib/Db/MailAccount.php b/lib/Db/MailAccount.php
index 974e31b72..e4ee35a35 100644
--- a/lib/Db/MailAccount.php
+++ b/lib/Db/MailAccount.php
@@ -69,7 +69,6 @@ use OCP\AppFramework\Db\Entity;
* @method void setOrder(int $order)
*/
class MailAccount extends Entity {
-
protected $userId;
protected $name;
protected $email;
diff --git a/lib/Db/MailAccountMapper.php b/lib/Db/MailAccountMapper.php
index 90a7d2ac7..8635113af 100644
--- a/lib/Db/MailAccountMapper.php
+++ b/lib/Db/MailAccountMapper.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
@@ -136,7 +137,7 @@ class MailAccountMapper extends QBMapper {
$delete->execute();
}
- public function getAllAccounts(): array {
+ public function getAllAccounts(): array {
$qb = $this->db->getQueryBuilder();
$query = $qb
->select('*')
@@ -144,5 +145,4 @@ class MailAccountMapper extends QBMapper {
return $this->findEntities($query);
}
-
}
diff --git a/lib/Db/Mailbox.php b/lib/Db/Mailbox.php
index 544f8d599..3af793d50 100644
--- a/lib/Db/Mailbox.php
+++ b/lib/Db/Mailbox.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -61,7 +63,6 @@ use function strtolower;
* @method void setSpecialUse(string $specialUse)
*/
class Mailbox extends Entity {
-
protected $name;
protected $accountId;
protected $syncNewToken;
@@ -126,5 +127,4 @@ class Mailbox extends Entity {
|| $this->getSyncChangedLock() !== null
|| $this->getSyncVanishedLock() !== null;
}
-
}
diff --git a/lib/Db/MailboxMapper.php b/lib/Db/MailboxMapper.php
index 29f302ffc..28a48ceeb 100644
--- a/lib/Db/MailboxMapper.php
+++ b/lib/Db/MailboxMapper.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -192,5 +194,4 @@ class MailboxMapper extends QBMapper {
$this->update($mailbox);
}
-
}
diff --git a/lib/Db/Message.php b/lib/Db/Message.php
index 0a791378b..e2c0bbb4b 100644
--- a/lib/Db/Message.php
+++ b/lib/Db/Message.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -65,7 +67,6 @@ use function in_array;
* @method int getUpdatedAt()
*/
class Message extends Entity implements JsonSerializable {
-
private const MUTABLE_FLAGS = [
'answered',
'deleted',
@@ -216,5 +217,4 @@ class Message extends Entity implements JsonSerializable {
'bcc' => $this->getBcc()->jsonSerialize(),
];
}
-
}
diff --git a/lib/Db/MessageMapper.php b/lib/Db/MessageMapper.php
index 9679a6b4d..901cd462a 100644
--- a/lib/Db/MessageMapper.php
+++ b/lib/Db/MessageMapper.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -330,16 +332,16 @@ class MessageMapper extends QBMapper {
$flags = $query->getFlags();
$flagKeys = array_keys($flags);
foreach ([
- Horde_Imap_Client::FLAG_ANSWERED,
- Horde_Imap_Client::FLAG_DELETED,
- Horde_Imap_Client::FLAG_DRAFT,
- Horde_Imap_Client::FLAG_FLAGGED,
- Horde_Imap_Client::FLAG_RECENT,
- Horde_Imap_Client::FLAG_SEEN,
- Horde_Imap_Client::FLAG_FORWARDED,
- Horde_Imap_Client::FLAG_JUNK,
- Horde_Imap_Client::FLAG_NOTJUNK,
- ] as $flag) {
+ Horde_Imap_Client::FLAG_ANSWERED,
+ Horde_Imap_Client::FLAG_DELETED,
+ Horde_Imap_Client::FLAG_DRAFT,
+ Horde_Imap_Client::FLAG_FLAGGED,
+ Horde_Imap_Client::FLAG_RECENT,
+ Horde_Imap_Client::FLAG_SEEN,
+ Horde_Imap_Client::FLAG_FORWARDED,
+ Horde_Imap_Client::FLAG_JUNK,
+ Horde_Imap_Client::FLAG_NOTJUNK,
+ ] as $flag) {
if (in_array($flag, $flagKeys, true)) {
$key = ltrim($flag, '\\');
$select->andWhere($qb->expr()->eq("flag_$key", $qb->createNamedParameter($flags[$flag], IQueryBuilder::PARAM_BOOL)));
@@ -459,5 +461,4 @@ class MessageMapper extends QBMapper {
return $this->findRecipients($this->findEntities($select));
}
-
}
diff --git a/lib/Events/BeforeMessageDeletedEvent.php b/lib/Events/BeforeMessageDeletedEvent.php
index be2b107e9..a77e4075f 100644
--- a/lib/Events/BeforeMessageDeletedEvent.php
+++ b/lib/Events/BeforeMessageDeletedEvent.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -55,6 +57,4 @@ class BeforeMessageDeletedEvent extends Event {
public function getMessageId(): int {
return $this->messageId;
}
-
-
}
diff --git a/lib/Events/DraftSavedEvent.php b/lib/Events/DraftSavedEvent.php
index 79a385530..f8b6368da 100644
--- a/lib/Events/DraftSavedEvent.php
+++ b/lib/Events/DraftSavedEvent.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -58,5 +60,4 @@ class DraftSavedEvent extends Event {
public function getDraftUid(): ?int {
return $this->draftUid;
}
-
}
diff --git a/lib/Events/MessageDeletedEvent.php b/lib/Events/MessageDeletedEvent.php
index 46d9b0367..344f5f3d3 100644
--- a/lib/Events/MessageDeletedEvent.php
+++ b/lib/Events/MessageDeletedEvent.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -58,6 +60,4 @@ class MessageDeletedEvent extends Event {
public function getMessageId(): int {
return $this->messageId;
}
-
-
}
diff --git a/lib/Events/MessageFlaggedEvent.php b/lib/Events/MessageFlaggedEvent.php
index 976648fc0..a5e5fa97e 100644
--- a/lib/Events/MessageFlaggedEvent.php
+++ b/lib/Events/MessageFlaggedEvent.php
@@ -78,5 +78,4 @@ class MessageFlaggedEvent extends Event {
public function isSet(): bool {
return $this->set;
}
-
}
diff --git a/lib/Events/MessageSentEvent.php b/lib/Events/MessageSentEvent.php
index c0642e68a..563467c4c 100644
--- a/lib/Events/MessageSentEvent.php
+++ b/lib/Events/MessageSentEvent.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -88,5 +90,4 @@ class MessageSentEvent extends Event {
public function getMail(): Horde_Mime_Mail {
return $this->mail;
}
-
}
diff --git a/lib/Events/SaveDraftEvent.php b/lib/Events/SaveDraftEvent.php
index 699a63ae7..1f5590281 100644
--- a/lib/Events/SaveDraftEvent.php
+++ b/lib/Events/SaveDraftEvent.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -58,5 +60,4 @@ class SaveDraftEvent extends Event {
public function getDraftUid(): ?int {
return $this->draftUid;
}
-
}
diff --git a/lib/Exception/AttachmentNotFoundException.php b/lib/Exception/AttachmentNotFoundException.php
index 5f84bd78d..be1720e49 100644
--- a/lib/Exception/AttachmentNotFoundException.php
+++ b/lib/Exception/AttachmentNotFoundException.php
@@ -24,5 +24,4 @@ declare(strict_types=1);
namespace OCA\Mail\Exception;
class AttachmentNotFoundException extends ServiceException {
-
}
diff --git a/lib/Exception/ClientException.php b/lib/Exception/ClientException.php
index 3619ee04d..0daa4f8f9 100644
--- a/lib/Exception/ClientException.php
+++ b/lib/Exception/ClientException.php
@@ -30,9 +30,7 @@ use Exception;
use OCP\AppFramework\Http;
class ClientException extends Exception {
-
public function getHttpCode(): int {
return Http::STATUS_BAD_REQUEST;
}
-
}
diff --git a/lib/Exception/IncompleteSyncException.php b/lib/Exception/IncompleteSyncException.php
index 199a45e0b..b4af8f1f3 100644
--- a/lib/Exception/IncompleteSyncException.php
+++ b/lib/Exception/IncompleteSyncException.php
@@ -26,5 +26,4 @@ declare(strict_types=1);
namespace OCA\Mail\Exception;
class IncompleteSyncException extends ServiceException {
-
}
diff --git a/lib/Exception/MailboxLockedException.php b/lib/Exception/MailboxLockedException.php
index 8f66e50af..6fd5503c3 100644
--- a/lib/Exception/MailboxLockedException.php
+++ b/lib/Exception/MailboxLockedException.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -27,7 +29,6 @@ use OCA\Mail\Db\Mailbox;
use OCP\AppFramework\Http;
class MailboxLockedException extends ClientException {
-
public static function from(Mailbox $mailbox): self {
return new self($mailbox->getId() . ' is already being synced');
}
@@ -35,5 +36,4 @@ class MailboxLockedException extends ClientException {
public function getHttpCode(): int {
return Http::STATUS_CONFLICT;
}
-
}
diff --git a/lib/Exception/MailboxNotCachedException.php b/lib/Exception/MailboxNotCachedException.php
index 728700c92..5ae68de6b 100644
--- a/lib/Exception/MailboxNotCachedException.php
+++ b/lib/Exception/MailboxNotCachedException.php
@@ -1,13 +1,13 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
namespace OCA\Mail\Exception;
use OCA\Mail\Db\Mailbox;
class MailboxNotCachedException extends ClientException {
-
public static function from(Mailbox $mailbox): self {
return new self("mailbox {$mailbox->getId()} is not cached");
}
-
}
diff --git a/lib/Exception/NotImplemented.php b/lib/Exception/NotImplemented.php
index 7148c388b..bb1069675 100644
--- a/lib/Exception/NotImplemented.php
+++ b/lib/Exception/NotImplemented.php
@@ -29,5 +29,4 @@ namespace OCA\Mail\Exception;
use Exception;
class NotImplemented extends Exception {
-
}
diff --git a/lib/Exception/ServiceException.php b/lib/Exception/ServiceException.php
index 3387287d4..68e8a7de0 100644
--- a/lib/Exception/ServiceException.php
+++ b/lib/Exception/ServiceException.php
@@ -26,5 +26,4 @@ namespace OCA\Mail\Exception;
use Exception;
class ServiceException extends Exception {
-
}
diff --git a/lib/Exception/UidValidityChangedException.php b/lib/Exception/UidValidityChangedException.php
index 9000909c2..7f8171ae9 100644
--- a/lib/Exception/UidValidityChangedException.php
+++ b/lib/Exception/UidValidityChangedException.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -26,5 +28,4 @@ namespace OCA\mail\lib\Exception;
use OCA\Mail\Exception\ServiceException;
class UidValidityChangedException extends ServiceException {
-
}
diff --git a/lib/Exception/UploadException.php b/lib/Exception/UploadException.php
index bacc619a0..c766c1a94 100644
--- a/lib/Exception/UploadException.php
+++ b/lib/Exception/UploadException.php
@@ -24,5 +24,4 @@ declare(strict_types=1);
namespace OCA\Mail\Exception;
class UploadException extends ServiceException {
-
}
diff --git a/lib/Folder.php b/lib/Folder.php
index 2052add40..d17ed0b9b 100644
--- a/lib/Folder.php
+++ b/lib/Folder.php
@@ -160,5 +160,4 @@ class Folder implements JsonSerializable {
public function isSelectable(): bool {
return !in_array('\noselect', $this->attributes);
}
-
}
diff --git a/lib/HordeTranslationHandler.php b/lib/HordeTranslationHandler.php
index 77530c22d..1ac40cba2 100644
--- a/lib/HordeTranslationHandler.php
+++ b/lib/HordeTranslationHandler.php
@@ -23,7 +23,7 @@ namespace OCA\Mail;
use Horde_Translation_Handler;
-class HordeTranslationHandler implements Horde_Translation_Handler {
+class HordeTranslationHandler implements Horde_Translation_Handler {
/**
* Returns the translation of a message.
*
diff --git a/lib/Http/AttachmentDownloadResponse.php b/lib/Http/AttachmentDownloadResponse.php
index 7784a0fe5..d9789a423 100644
--- a/lib/Http/AttachmentDownloadResponse.php
+++ b/lib/Http/AttachmentDownloadResponse.php
@@ -53,5 +53,4 @@ class AttachmentDownloadResponse extends DownloadResponse {
public function render(): string {
return $this->content;
}
-
}
diff --git a/lib/Http/AvatarDownloadResponse.php b/lib/Http/AvatarDownloadResponse.php
index 532c464c5..70cce9756 100644
--- a/lib/Http/AvatarDownloadResponse.php
+++ b/lib/Http/AvatarDownloadResponse.php
@@ -44,5 +44,4 @@ class AvatarDownloadResponse extends DownloadResponse {
public function render(): string {
return $this->content;
}
-
}
diff --git a/lib/Http/HtmlResponse.php b/lib/Http/HtmlResponse.php
index a61a826a4..cae7c97bb 100644
--- a/lib/Http/HtmlResponse.php
+++ b/lib/Http/HtmlResponse.php
@@ -45,5 +45,4 @@ class HtmlResponse extends Response {
public function render(): string {
return $this->content;
}
-
}
diff --git a/lib/Http/JsonResponse.php b/lib/Http/JsonResponse.php
index 8c5cc9396..b811fbddb 100644
--- a/lib/Http/JsonResponse.php
+++ b/lib/Http/JsonResponse.php
@@ -39,7 +39,6 @@ use function get_class;
* @see https://github.com/omniti-labs/jsend
*/
class JsonResponse extends Base {
-
public function __construct($data = [],
int $statusCode = Http::STATUS_OK) {
parent::__construct($data, $statusCode);
@@ -127,5 +126,4 @@ class JsonResponse extends Base {
array_flip(['file', 'line', 'function', 'class']));
}, $original);
}
-
}
diff --git a/lib/Http/Middleware/ErrorMiddleware.php b/lib/Http/Middleware/ErrorMiddleware.php
index be0735ef5..c7e2cb0ad 100644
--- a/lib/Http/Middleware/ErrorMiddleware.php
+++ b/lib/Http/Middleware/ErrorMiddleware.php
@@ -129,5 +129,4 @@ class ErrorMiddleware extends Middleware {
return false;
}
-
}
diff --git a/lib/Http/Middleware/ProvisioningMiddleware.php b/lib/Http/Middleware/ProvisioningMiddleware.php
index bcbb180fa..6d36a2360 100644
--- a/lib/Http/Middleware/ProvisioningMiddleware.php
+++ b/lib/Http/Middleware/ProvisioningMiddleware.php
@@ -79,5 +79,4 @@ class ProvisioningMiddleware extends Middleware {
return;
}
}
-
}
diff --git a/lib/Http/ProxyDownloadResponse.php b/lib/Http/ProxyDownloadResponse.php
index 72929b8c3..b8977bd8d 100644
--- a/lib/Http/ProxyDownloadResponse.php
+++ b/lib/Http/ProxyDownloadResponse.php
@@ -60,5 +60,4 @@ class ProxyDownloadResponse extends DownloadResponse {
public function render(): string {
return $this->content;
}
-
}
diff --git a/lib/IMAP/FolderMapper.php b/lib/IMAP/FolderMapper.php
index d217ad260..4f677f853 100644
--- a/lib/IMAP/FolderMapper.php
+++ b/lib/IMAP/FolderMapper.php
@@ -62,7 +62,7 @@ class FolderMapper {
'special_use' => true,
]);
- return array_filter(array_map(function(array $mailbox) use ($account) {
+ return array_filter(array_map(function (array $mailbox) use ($account) {
if (in_array($mailbox['mailbox']->utf8, self::DOVECOT_SIEVE_FOLDERS, true)) {
// This is a special folder that must not be shown
return null;
@@ -219,5 +219,4 @@ class FolderMapper {
}
}
}
-
}
diff --git a/lib/IMAP/FolderStats.php b/lib/IMAP/FolderStats.php
index 9b41b91d8..a1e39ed9b 100644
--- a/lib/IMAP/FolderStats.php
+++ b/lib/IMAP/FolderStats.php
@@ -36,7 +36,6 @@ class FolderStats implements JsonSerializable {
private $unread;
public function __construct(int $total, int $unread) {
-
$this->total = $total;
$this->unread = $unread;
}
diff --git a/lib/IMAP/IMAPClientFactory.php b/lib/IMAP/IMAPClientFactory.php
index e89266aca..6ef1c7b33 100644
--- a/lib/IMAP/IMAPClientFactory.php
+++ b/lib/IMAP/IMAPClientFactory.php
@@ -98,5 +98,4 @@ class IMAPClientFactory {
return $this->cache[$account->getId()];
}
-
}
diff --git a/lib/IMAP/MailboxSync.php b/lib/IMAP/MailboxSync.php
index e1ec145df..e1461189a 100644
--- a/lib/IMAP/MailboxSync.php
+++ b/lib/IMAP/MailboxSync.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -145,5 +147,4 @@ class MailboxSync {
$mailbox->setSpecialUse(json_encode($folder->getSpecialUse()));
$this->mailboxMapper->insert($mailbox);
}
-
}
diff --git a/lib/IMAP/MessageMapper.php b/lib/IMAP/MessageMapper.php
index a048bfaaf..be8240410 100644
--- a/lib/IMAP/MessageMapper.php
+++ b/lib/IMAP/MessageMapper.php
@@ -23,14 +23,12 @@ declare(strict_types=1);
namespace OCA\Mail\IMAP;
-use Generator;
use Horde_Imap_Client;
use Horde_Imap_Client_Base;
use Horde_Imap_Client_Data_Fetch;
use Horde_Imap_Client_Exception;
use Horde_Imap_Client_Fetch_Query;
use Horde_Imap_Client_Ids;
-use Horde_Imap_Client_Search_Query;
use Horde_Imap_Client_Socket;
use Horde_Mime_Mail;
use Horde_Mime_Part;
@@ -552,5 +550,4 @@ class MessageMapper {
return new MessageStructureData($hasAttachments, $text);
}, iterator_to_array($structures->getIterator()));
}
-
}
diff --git a/lib/IMAP/MessageStructureData.php b/lib/IMAP/MessageStructureData.php
index 5abe99976..d5084db82 100644
--- a/lib/IMAP/MessageStructureData.php
+++ b/lib/IMAP/MessageStructureData.php
@@ -46,5 +46,4 @@ class MessageStructureData {
public function getPreviewText(): string {
return $this->previewText;
}
-
}
diff --git a/lib/IMAP/PreviewEnhancer.php b/lib/IMAP/PreviewEnhancer.php
index de2170eb3..f7fc5472d 100644
--- a/lib/IMAP/PreviewEnhancer.php
+++ b/lib/IMAP/PreviewEnhancer.php
@@ -112,5 +112,4 @@ class PreviewEnhancer {
return $message;
}, $messages));
}
-
}
diff --git a/lib/IMAP/Search/Provider.php b/lib/IMAP/Search/Provider.php
index 4f39f29ae..57f53c748 100644
--- a/lib/IMAP/Search/Provider.php
+++ b/lib/IMAP/Search/Provider.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -85,5 +87,4 @@ class Provider {
new Horde_Imap_Client_Search_Query()
);
}
-
}
diff --git a/lib/IMAP/Sync/Request.php b/lib/IMAP/Sync/Request.php
index 5e8b890ee..ecf7061b6 100644
--- a/lib/IMAP/Sync/Request.php
+++ b/lib/IMAP/Sync/Request.php
@@ -67,5 +67,4 @@ class Request {
public function getUids(): array {
return $this->uids;
}
-
}
diff --git a/lib/IMAP/Sync/Response.php b/lib/IMAP/Sync/Response.php
index a690c673d..9e95b342e 100644
--- a/lib/IMAP/Sync/Response.php
+++ b/lib/IMAP/Sync/Response.php
@@ -87,5 +87,4 @@ class Response implements JsonSerializable {
array_merge($this->getVanishedMessageUids(), $other->getVanishedMessageUids())
);
}
-
}
diff --git a/lib/IMAP/Sync/Synchronizer.php b/lib/IMAP/Sync/Synchronizer.php
index 3b5b07fd4..43d0f5d75 100644
--- a/lib/IMAP/Sync/Synchronizer.php
+++ b/lib/IMAP/Sync/Synchronizer.php
@@ -74,5 +74,4 @@ class Synchronizer {
return new Response($newMessages, $changedMessages, $vanishedMessageUids);
}
-
}
diff --git a/lib/Integration/KItinerary/ItineraryExtractor.php b/lib/Integration/KItinerary/ItineraryExtractor.php
index 9e6e6e932..e38f96f84 100644
--- a/lib/Integration/KItinerary/ItineraryExtractor.php
+++ b/lib/Integration/KItinerary/ItineraryExtractor.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -84,5 +86,4 @@ class ItineraryExtractor {
return new Itinerary();
}
}
-
}
diff --git a/lib/Integration/Psr/LoggerAdapter.php b/lib/Integration/Psr/LoggerAdapter.php
index abcd068a4..a676b848c 100644
--- a/lib/Integration/Psr/LoggerAdapter.php
+++ b/lib/Integration/Psr/LoggerAdapter.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -154,5 +156,4 @@ class LoggerAdapter implements LoggerInterface {
public function log($level, $message, array $context = []) {
$this->logger->log($level, $message, $context);
}
-
}
diff --git a/lib/Listener/AddressCollectionListener.php b/lib/Listener/AddressCollectionListener.php
index 2f227157d..22d079537 100644
--- a/lib/Listener/AddressCollectionListener.php
+++ b/lib/Listener/AddressCollectionListener.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -74,5 +76,4 @@ class AddressCollectionListener implements IEventListener {
]);
}
}
-
}
diff --git a/lib/Listener/DeleteDraftListener.php b/lib/Listener/DeleteDraftListener.php
index 8c204bfc9..0e76adec6 100644
--- a/lib/Listener/DeleteDraftListener.php
+++ b/lib/Listener/DeleteDraftListener.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -70,7 +72,7 @@ class DeleteDraftListener implements IEventListener {
public function handle(Event $event): void {
if ($event instanceof DraftSavedEvent && $event->getDraftUid() !== null) {
$this->deleteDraft($event->getAccount(), $event->getDraftUid());
- } else if ($event instanceof MessageSentEvent && $event->getDraftUid() !== null) {
+ } elseif ($event instanceof MessageSentEvent && $event->getDraftUid() !== null) {
$this->deleteDraft($event->getAccount(), $event->getDraftUid());
}
}
@@ -138,5 +140,4 @@ class DeleteDraftListener implements IEventListener {
// TODO: find a more elegant solution for updating the mailbox cache
$this->mailboxSync->sync($account, true);
}
-
}
diff --git a/lib/Listener/DraftMailboxCreatorListener.php b/lib/Listener/DraftMailboxCreatorListener.php
index fdb705f1a..384a39221 100644
--- a/lib/Listener/DraftMailboxCreatorListener.php
+++ b/lib/Listener/DraftMailboxCreatorListener.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -94,5 +96,4 @@ class DraftMailboxCreatorListener implements IEventListener {
// TODO: find a more elegant solution for updating the mailbox cache
$this->mailboxSync->sync($account, true);
}
-
}
diff --git a/lib/Listener/FlagRepliedMessageListener.php b/lib/Listener/FlagRepliedMessageListener.php
index eb2c3b73d..07e13bb13 100644
--- a/lib/Listener/FlagRepliedMessageListener.php
+++ b/lib/Listener/FlagRepliedMessageListener.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -53,7 +55,6 @@ class FlagRepliedMessageListener implements IEventListener {
MailboxMapper $mailboxMapper,
MessageMapper $mapper,
ILogger $logger) {
-
$this->imapClientFactory = $imapClientFactory;
$this->mailboxMapper = $mailboxMapper;
$this->messageMapper = $mapper;
@@ -94,5 +95,4 @@ class FlagRepliedMessageListener implements IEventListener {
]);
}
}
-
}
diff --git a/lib/Listener/InteractionListener.php b/lib/Listener/InteractionListener.php
index ce48b5635..58c3e22b9 100644
--- a/lib/Listener/InteractionListener.php
+++ b/lib/Listener/InteractionListener.php
@@ -84,5 +84,4 @@ class InteractionListener implements IEventListener {
$this->dispatcher->dispatch(ContactInteractedWithEvent::class, $interactionEvent);
}
}
-
}
diff --git a/lib/Listener/MessageCacheUpdaterListener.php b/lib/Listener/MessageCacheUpdaterListener.php
index bd710adb1..6c952ed63 100644
--- a/lib/Listener/MessageCacheUpdaterListener.php
+++ b/lib/Listener/MessageCacheUpdaterListener.php
@@ -66,5 +66,4 @@ class MessageCacheUpdaterListener implements IEventListener {
);
}
}
-
}
diff --git a/lib/Listener/SaveSentMessageListener.php b/lib/Listener/SaveSentMessageListener.php
index 3f6bf9375..ed093d222 100644
--- a/lib/Listener/SaveSentMessageListener.php
+++ b/lib/Listener/SaveSentMessageListener.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -122,5 +124,4 @@ class SaveSentMessageListener implements IEventListener {
return $this->mailboxMapper->findSpecial($account, 'sent');
}
-
}
diff --git a/lib/Listener/TrashMailboxCreatorListener.php b/lib/Listener/TrashMailboxCreatorListener.php
index a3a00b2b1..a4cb09336 100644
--- a/lib/Listener/TrashMailboxCreatorListener.php
+++ b/lib/Listener/TrashMailboxCreatorListener.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -97,5 +99,4 @@ class TrashMailboxCreatorListener implements IEventListener {
]);
}
}
-
}
diff --git a/lib/Mailbox.php b/lib/Mailbox.php
index 128fe3c06..09daef680 100644
--- a/lib/Mailbox.php
+++ b/lib/Mailbox.php
@@ -251,7 +251,7 @@ class Mailbox implements IMailBox {
strtolower(Horde_Imap_Client::SPECIALUSE_TRASH)
];
- $attributes = array_map(function($n) {
+ $attributes = array_map(function ($n) {
return strtolower($n);
}, $this->attributes);
@@ -272,7 +272,6 @@ class Mailbox implements IMailBox {
* @return void
*/
protected function guessSpecialRole(): void {
-
$specialFoldersDict = [
'inbox' => ['inbox'],
'sent' => ['sent', 'sent items', 'sent messages', 'sent-mail', 'sentmail'],
@@ -321,5 +320,4 @@ class Mailbox implements IMailBox {
return reset($uids);
}
-
}
diff --git a/lib/Migration/FixAccountSyncs.php b/lib/Migration/FixAccountSyncs.php
index 319e0cb4e..ba2166e85 100644
--- a/lib/Migration/FixAccountSyncs.php
+++ b/lib/Migration/FixAccountSyncs.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
@@ -60,5 +61,4 @@ class FixAccountSyncs implements IRepairStep {
$output->finishProgress();
}
-
}
diff --git a/lib/Migration/FixCollectedAddresses.php b/lib/Migration/FixCollectedAddresses.php
index 7ab0a98f5..85e18e383 100644
--- a/lib/Migration/FixCollectedAddresses.php
+++ b/lib/Migration/FixCollectedAddresses.php
@@ -82,5 +82,4 @@ class FixCollectedAddresses implements IRepairStep {
$this->mapper->delete($address);
}
}
-
}
diff --git a/lib/Migration/MakeItineraryExtractorExecutable.php b/lib/Migration/MakeItineraryExtractorExecutable.php
index 93d26bd32..3d085f0b0 100644
--- a/lib/Migration/MakeItineraryExtractorExecutable.php
+++ b/lib/Migration/MakeItineraryExtractorExecutable.php
@@ -74,5 +74,4 @@ class MakeItineraryExtractorExecutable implements IRepairStep {
return;
}
}
-
}
diff --git a/lib/Migration/MigrateProvisioningConfig.php b/lib/Migration/MigrateProvisioningConfig.php
index 7f8bbe29d..12b90c8f8 100644
--- a/lib/Migration/MigrateProvisioningConfig.php
+++ b/lib/Migration/MigrateProvisioningConfig.php
@@ -62,5 +62,4 @@ class MigrateProvisioningConfig implements IRepairStep {
$this->config->deleteSystemValue('app.mail.accounts.default');
$output->info("Config migrated. Accounts not updated yet");
}
-
}
diff --git a/lib/Migration/ProvisionAccounts.php b/lib/Migration/ProvisionAccounts.php
index 21d6e8b30..8487492ca 100644
--- a/lib/Migration/ProvisionAccounts.php
+++ b/lib/Migration/ProvisionAccounts.php
@@ -56,5 +56,4 @@ class ProvisionAccounts implements IRepairStep {
$cnt = $this->provisioningManager->provision($config);
$output->info("$cnt accounts provisioned");
}
-
}
diff --git a/lib/Migration/Version0130Date20190408134101.php b/lib/Migration/Version0130Date20190408134101.php
index 71b087979..f50a3a7d1 100644
--- a/lib/Migration/Version0130Date20190408134101.php
+++ b/lib/Migration/Version0130Date20190408134101.php
@@ -51,5 +51,4 @@ class Version0130Date20190408134101 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version0156Date20190828140357.php b/lib/Migration/Version0156Date20190828140357.php
index 42268400a..4afca33a5 100644
--- a/lib/Migration/Version0156Date20190828140357.php
+++ b/lib/Migration/Version0156Date20190828140357.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -87,5 +89,4 @@ class Version0156Date20190828140357 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version0161Date20190902103559.php b/lib/Migration/Version0161Date20190902103559.php
index 2e387d811..8f5ba58aa 100644
--- a/lib/Migration/Version0161Date20190902103559.php
+++ b/lib/Migration/Version0161Date20190902103559.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -44,5 +46,4 @@ class Version0161Date20190902103559 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version0161Date20190902103701.php b/lib/Migration/Version0161Date20190902103701.php
index 14cf6a64b..99fa87645 100644
--- a/lib/Migration/Version0161Date20190902103701.php
+++ b/lib/Migration/Version0161Date20190902103701.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -104,5 +106,4 @@ class Version0161Date20190902103701 extends SimpleMigrationStep {
->set('last_mailbox_sync', $update->createNamedParameter(0));
$update->execute();
}
-
}
diff --git a/lib/Migration/Version0161Date20190902114635.php b/lib/Migration/Version0161Date20190902114635.php
index d3e9e718a..05534acfb 100644
--- a/lib/Migration/Version0161Date20190902114635.php
+++ b/lib/Migration/Version0161Date20190902114635.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -66,5 +68,4 @@ class Version0161Date20190902114635 extends SimpleMigrationStep {
$update->execute();
}
-
}
diff --git a/lib/Migration/Version0180Date20190927124207.php b/lib/Migration/Version0180Date20190927124207.php
index fc775a5d9..20b259c0a 100644
--- a/lib/Migration/Version0180Date20190927124207.php
+++ b/lib/Migration/Version0180Date20190927124207.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -50,5 +52,4 @@ class Version0180Date20190927124207 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version0190Date20191118160843.php b/lib/Migration/Version0190Date20191118160843.php
index 5ea0f4548..11624c166 100644
--- a/lib/Migration/Version0190Date20191118160843.php
+++ b/lib/Migration/Version0190Date20191118160843.php
@@ -55,5 +55,4 @@ class Version0190Date20191118160843 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version0210Date20191212144925.php b/lib/Migration/Version0210Date20191212144925.php
index 96257093c..3016e1eaf 100644
--- a/lib/Migration/Version0210Date20191212144925.php
+++ b/lib/Migration/Version0210Date20191212144925.php
@@ -51,5 +51,4 @@ class Version0210Date20191212144925 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version1020Date20191002091034.php b/lib/Migration/Version1020Date20191002091034.php
index 4020be614..f5cbb3b68 100644
--- a/lib/Migration/Version1020Date20191002091034.php
+++ b/lib/Migration/Version1020Date20191002091034.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
namespace OCA\Mail\Migration;
@@ -29,5 +31,4 @@ class Version1020Date20191002091034 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version1020Date20191002091035.php b/lib/Migration/Version1020Date20191002091035.php
index d0cb3b054..bd35180d1 100644
--- a/lib/Migration/Version1020Date20191002091035.php
+++ b/lib/Migration/Version1020Date20191002091035.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
namespace OCA\Mail\Migration;
@@ -153,5 +155,4 @@ class Version1020Date20191002091035 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version1020Date20200206134751.php b/lib/Migration/Version1020Date20200206134751.php
index 658cf2891..a9765a016 100644
--- a/lib/Migration/Version1020Date20200206134751.php
+++ b/lib/Migration/Version1020Date20200206134751.php
@@ -37,5 +37,4 @@ class Version1020Date20200206134751 extends SimpleMigrationStep {
return $schema;
}
-
}
diff --git a/lib/Migration/Version1030Date20200228105714.php b/lib/Migration/Version1030Date20200228105714.php
index c2765626e..68b48e5dd 100644
--- a/lib/Migration/Version1030Date20200228105714.php
+++ b/lib/Migration/Version1030Date20200228105714.php
@@ -24,5 +24,4 @@ class Version1030Date20200228105714 extends SimpleMigrationStep {
->set('last_mailbox_sync', $update->createNamedParameter(0));
$update->execute();
}
-
}
diff --git a/lib/Model/ConvertAddresses.php b/lib/Model/ConvertAddresses.php
index e375002a1..7ccd49bf3 100644
--- a/lib/Model/ConvertAddresses.php
+++ b/lib/Model/ConvertAddresses.php
@@ -28,7 +28,6 @@ use Horde_Mail_Rfc822_List;
use Horde_Mail_Rfc822_Address;
trait ConvertAddresses {
-
private function hordeToString(Horde_Mail_Rfc822_Address $address): string {
return $address->writeAddress();
}
@@ -67,5 +66,4 @@ trait ConvertAddresses {
}
return $list;
}
-
}
diff --git a/lib/Model/IMAPMessage.php b/lib/Model/IMAPMessage.php
index 180ea30d5..3b7be1060 100644
--- a/lib/Model/IMAPMessage.php
+++ b/lib/Model/IMAPMessage.php
@@ -51,7 +51,6 @@ use function base64_encode;
use function mb_convert_encoding;
class IMAPMessage implements IMessage, JsonSerializable {
-
use ConvertAddresses;
/**
@@ -651,5 +650,4 @@ class IMAPMessage implements IMessage, JsonSerializable {
return $msg;
}
-
}
diff --git a/lib/Model/Message.php b/lib/Model/Message.php
index 716127873..55ebcf743 100644
--- a/lib/Model/Message.php
+++ b/lib/Model/Message.php
@@ -30,7 +30,6 @@ use OCP\Files\File;
use OCP\Files\SimpleFS\ISimpleFile;
class Message implements IMessage {
-
use ConvertAddresses;
/** @var string */
@@ -253,5 +252,4 @@ class Message implements IMessage {
$part->setType($file->getMimeType());
$this->localAttachments[] = $part;
}
-
}
diff --git a/lib/Model/NewMessageData.php b/lib/Model/NewMessageData.php
index f802b2033..f578e049d 100644
--- a/lib/Model/NewMessageData.php
+++ b/lib/Model/NewMessageData.php
@@ -162,5 +162,4 @@ class NewMessageData {
public function isHtml(): bool {
return $this->isHtml;
}
-
}
diff --git a/lib/Model/RepliedMessageData.php b/lib/Model/RepliedMessageData.php
index 65f5be8c3..d12584874 100644
--- a/lib/Model/RepliedMessageData.php
+++ b/lib/Model/RepliedMessageData.php
@@ -64,5 +64,4 @@ class RepliedMessageData {
public function getId(): int {
return $this->id;
}
-
}
diff --git a/lib/SMTP/SmtpClientFactory.php b/lib/SMTP/SmtpClientFactory.php
index 40d69f6a6..6e4d50874 100644
--- a/lib/SMTP/SmtpClientFactory.php
+++ b/lib/SMTP/SmtpClientFactory.php
@@ -88,5 +88,4 @@ class SmtpClientFactory {
}
return new Horde_Mail_Transport_Smtphorde($params);
}
-
}
diff --git a/lib/Service/AccountService.php b/lib/Service/AccountService.php
index 0795237ee..c18b92c64 100644
--- a/lib/Service/AccountService.php
+++ b/lib/Service/AccountService.php
@@ -68,7 +68,8 @@ class AccountService {
if ($this->accounts === null) {
return $this->accounts = array_map(function ($a) {
return new Account($a);
- }, $this->mapper->findByUserId($currentUserId));;
+ }, $this->mapper->findByUserId($currentUserId));
+ ;
}
return $this->accounts;
@@ -153,5 +154,4 @@ class AccountService {
$mailAccount->setSignature($signature);
$this->mapper->save($mailAccount);
}
-
}
diff --git a/lib/Service/Attachment/AttachmentService.php b/lib/Service/Attachment/AttachmentService.php
index d9fe9c693..431873884 100644
--- a/lib/Service/Attachment/AttachmentService.php
+++ b/lib/Service/Attachment/AttachmentService.php
@@ -101,5 +101,4 @@ class AttachmentService implements IAttachmentService {
}
$this->storage->delete($userId, $id);
}
-
}
diff --git a/lib/Service/Attachment/AttachmentStorage.php b/lib/Service/Attachment/AttachmentStorage.php
index 7616e1a40..528ab6f82 100644
--- a/lib/Service/Attachment/AttachmentStorage.php
+++ b/lib/Service/Attachment/AttachmentStorage.php
@@ -111,5 +111,4 @@ class AttachmentStorage {
public function delete(string $userId, int $attachmentId): void {
throw new Exception('not implemented');
}
-
}
diff --git a/lib/Service/Attachment/UploadedFile.php b/lib/Service/Attachment/UploadedFile.php
index f28ddbf7e..e99fb5f20 100644
--- a/lib/Service/Attachment/UploadedFile.php
+++ b/lib/Service/Attachment/UploadedFile.php
@@ -49,5 +49,4 @@ class UploadedFile {
public function getTempPath() {
return isset($this->fileData['tmp_name']) ? $this->fileData['tmp_name'] : null;
}
-
}
diff --git a/lib/Service/AutoCompletion/AddressCollector.php b/lib/Service/AutoCompletion/AddressCollector.php
index d1304d62f..8dbf5270c 100644
--- a/lib/Service/AutoCompletion/AddressCollector.php
+++ b/lib/Service/AutoCompletion/AddressCollector.php
@@ -105,5 +105,4 @@ class AddressCollector {
$this->logger->debug("found " . count($result) . " matches in collected addresses");
return $result;
}
-
}
diff --git a/lib/Service/AutoCompletion/AutoCompleteService.php b/lib/Service/AutoCompletion/AutoCompleteService.php
index ddf8a88e2..f17f8d7ff 100644
--- a/lib/Service/AutoCompletion/AutoCompleteService.php
+++ b/lib/Service/AutoCompletion/AutoCompleteService.php
@@ -61,5 +61,4 @@ class AutoCompleteService {
return array_merge($recipientsFromContacts, $recipientsFromCollector, $recipientGroups);
}
-
}
diff --git a/lib/Service/AutoConfig/AutoConfig.php b/lib/Service/AutoConfig/AutoConfig.php
index a93cfc9c7..9166a638b 100644
--- a/lib/Service/AutoConfig/AutoConfig.php
+++ b/lib/Service/AutoConfig/AutoConfig.php
@@ -56,5 +56,4 @@ class AutoConfig {
}
return $this->configDetector->detectImapAndSmtp($email, $password, $name);
}
-
}
diff --git a/lib/Service/AutoConfig/ConfigurationDetector.php b/lib/Service/AutoConfig/ConfigurationDetector.php
index 3f15fc8e7..4776f4dd1 100644
--- a/lib/Service/AutoConfig/ConfigurationDetector.php
+++ b/lib/Service/AutoConfig/ConfigurationDetector.php
@@ -61,5 +61,4 @@ class ConfigurationDetector {
return $account;
}
-
}
diff --git a/lib/Service/AutoConfig/ConnectivityTester.php b/lib/Service/AutoConfig/ConnectivityTester.php
index 5313ae466..322c262c5 100644
--- a/lib/Service/AutoConfig/ConnectivityTester.php
+++ b/lib/Service/AutoConfig/ConnectivityTester.php
@@ -26,8 +26,7 @@ namespace OCA\Mail\Service\AutoConfig;
use OCP\ILogger;
class ConnectivityTester {
-
- const CONNECTION_TIMEOUT = 5;
+ public const CONNECTION_TIMEOUT = 5;
/** @var ILogger */
protected $logger;
@@ -55,5 +54,4 @@ class ConnectivityTester {
$this->logger->debug("cannot connect to <$url> on port <$port>");
return false;
}
-
}
diff --git a/lib/Service/AutoConfig/ImapConnectivityTester.php b/lib/Service/AutoConfig/ImapConnectivityTester.php
index 5c72de91c..b68310f72 100644
--- a/lib/Service/AutoConfig/ImapConnectivityTester.php
+++ b/lib/Service/AutoConfig/ImapConnectivityTester.php
@@ -96,5 +96,4 @@ class ImapConnectivityTester {
}
return null;
}
-
}
diff --git a/lib/Service/AutoConfig/ImapConnector.php b/lib/Service/AutoConfig/ImapConnector.php
index 52c8de0a8..7df5854d6 100644
--- a/lib/Service/AutoConfig/ImapConnector.php
+++ b/lib/Service/AutoConfig/ImapConnector.php
@@ -72,7 +72,6 @@ class ImapConnector {
int $port,
string $encryptionProtocol,
string $user): MailAccount {
-
$account = new MailAccount();
$account->setUserId($this->userId);
$account->setName($name);
@@ -90,5 +89,4 @@ class ImapConnector {
$this->logger->info("Test-Account-Successful: $this->userId, $host, $port, $user, $encryptionProtocol");
return $account;
}
-
}
diff --git a/lib/Service/AutoConfig/ImapServerDetector.php b/lib/Service/AutoConfig/ImapServerDetector.php
index 725383ebf..95edc22bd 100644
--- a/lib/Service/AutoConfig/ImapServerDetector.php
+++ b/lib/Service/AutoConfig/ImapServerDetector.php
@@ -93,5 +93,4 @@ class ImapServerDetector {
$name
);
}
-
}
diff --git a/lib/Service/AutoConfig/IspDb.php b/lib/Service/AutoConfig/IspDb.php
index 7621f9272..74636f150 100644
--- a/lib/Service/AutoConfig/IspDb.php
+++ b/lib/Service/AutoConfig/IspDb.php
@@ -130,5 +130,4 @@ class IspDb {
}
return $provider;
}
-
}
diff --git a/lib/Service/AutoConfig/IspDbConfigurationDetector.php b/lib/Service/AutoConfig/IspDbConfigurationDetector.php
index f83f34839..e56a60118 100644
--- a/lib/Service/AutoConfig/IspDbConfigurationDetector.php
+++ b/lib/Service/AutoConfig/IspDbConfigurationDetector.php
@@ -233,5 +233,4 @@ class IspDbConfigurationDetector {
}
return false;
}
-
}
diff --git a/lib/Service/AutoConfig/MxRecord.php b/lib/Service/AutoConfig/MxRecord.php
index 209c5787a..037b3f25d 100644
--- a/lib/Service/AutoConfig/MxRecord.php
+++ b/lib/Service/AutoConfig/MxRecord.php
@@ -43,7 +43,7 @@ class MxRecord {
$this->logger->debug("no MX records for host <$host> found");
return false;
}
- $mxRecords = array_filter($mxRecords, function($record) {
+ $mxRecords = array_filter($mxRecords, function ($record) {
return !empty($record);
});
if (empty(($mxRecords))) {
@@ -56,5 +56,4 @@ class MxRecord {
// TODO: sort by weight
return $mxRecords;
}
-
}
diff --git a/lib/Service/AutoConfig/SmtpConnectivityTester.php b/lib/Service/AutoConfig/SmtpConnectivityTester.php
index 8890ed5f6..40c1af76f 100644
--- a/lib/Service/AutoConfig/SmtpConnectivityTester.php
+++ b/lib/Service/AutoConfig/SmtpConnectivityTester.php
@@ -137,5 +137,4 @@ class SmtpConnectivityTester {
$smtp = $this->clientFactory->create($account);
$smtp->getSMTPObject();
}
-
}
diff --git a/lib/Service/AutoConfig/SmtpServerDetector.php b/lib/Service/AutoConfig/SmtpServerDetector.php
index c7b3bdbac..67741d228 100644
--- a/lib/Service/AutoConfig/SmtpServerDetector.php
+++ b/lib/Service/AutoConfig/SmtpServerDetector.php
@@ -85,5 +85,4 @@ class SmtpServerDetector {
*/
return $this->smtpConnectivityTester->test($account, $host, [$user, $email], $password, true);
}
-
}
diff --git a/lib/Service/Avatar/AddressbookSource.php b/lib/Service/Avatar/AddressbookSource.php
index f79449279..73a332b2a 100644
--- a/lib/Service/Avatar/AddressbookSource.php
+++ b/lib/Service/Avatar/AddressbookSource.php
@@ -62,5 +62,4 @@ class AddressbookSource implements IAvatarSource {
return $factory->createInternal($url, null);
}
-
}
diff --git a/lib/Service/Avatar/Avatar.php b/lib/Service/Avatar/Avatar.php
index 8f8b6106b..92340146d 100644
--- a/lib/Service/Avatar/Avatar.php
+++ b/lib/Service/Avatar/Avatar.php
@@ -83,5 +83,4 @@ class Avatar implements JsonSerializable {
'url' => $this->url,
];
}
-
}
diff --git a/lib/Service/Avatar/AvatarFactory.php b/lib/Service/Avatar/AvatarFactory.php
index deda0b604..e3dd2773c 100644
--- a/lib/Service/Avatar/AvatarFactory.php
+++ b/lib/Service/Avatar/AvatarFactory.php
@@ -48,5 +48,4 @@ class AvatarFactory {
public function createExternal(string $url, string $mime): Avatar {
return new Avatar($url, $mime);
}
-
}
diff --git a/lib/Service/Avatar/Cache.php b/lib/Service/Avatar/Cache.php
index 5437e0c13..f52a7f81a 100644
--- a/lib/Service/Avatar/Cache.php
+++ b/lib/Service/Avatar/Cache.php
@@ -32,7 +32,7 @@ use OCP\ICacheFactory;
class Cache {
// Cache for one week
- const CACHE_TTL = 7 * 24 * 60 * 60;
+ public const CACHE_TTL = 7 * 24 * 60 * 60;
/** @var ICache */
private $cache;
@@ -112,5 +112,4 @@ class Cache {
public function addImage(string $url, string $uid, string $image): void {
$this->cache->set($this->buildImageKey($url, $uid), $image, self::CACHE_TTL);
}
-
}
diff --git a/lib/Service/Avatar/CompositeAvatarSource.php b/lib/Service/Avatar/CompositeAvatarSource.php
index cd684a9ad..6ce5c7d80 100644
--- a/lib/Service/Avatar/CompositeAvatarSource.php
+++ b/lib/Service/Avatar/CompositeAvatarSource.php
@@ -69,5 +69,4 @@ class CompositeAvatarSource {
return null;
}
-
}
diff --git a/lib/Service/Avatar/Downloader.php b/lib/Service/Avatar/Downloader.php
index 1c7f4191a..7215648d3 100644
--- a/lib/Service/Avatar/Downloader.php
+++ b/lib/Service/Avatar/Downloader.php
@@ -53,5 +53,4 @@ class Downloader {
return $resp->getBody();
}
-
}
diff --git a/lib/Service/Avatar/FaviconSource.php b/lib/Service/Avatar/FaviconSource.php
index cc62a15fd..5fd760702 100644
--- a/lib/Service/Avatar/FaviconSource.php
+++ b/lib/Service/Avatar/FaviconSource.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -89,5 +91,4 @@ class FaviconSource implements IAvatarSource {
return $factory->createExternal($iconUrl, $mime);
}
-
}
diff --git a/lib/Service/Avatar/GravatarSource.php b/lib/Service/Avatar/GravatarSource.php
index db75441d9..33ade4569 100644
--- a/lib/Service/Avatar/GravatarSource.php
+++ b/lib/Service/Avatar/GravatarSource.php
@@ -72,5 +72,4 @@ class GravatarSource implements IAvatarSource {
// TODO: check whether it's really always a jpeg
return $factory->createExternal($avatarUrl, 'image/jpeg');
}
-
}
diff --git a/lib/Service/AvatarService.php b/lib/Service/AvatarService.php
index 11e51c515..657b7c657 100644
--- a/lib/Service/AvatarService.php
+++ b/lib/Service/AvatarService.php
@@ -149,5 +149,4 @@ class AvatarService implements IAvatarService {
return [$avatar, $image];
}
-
}
diff --git a/lib/Service/ContactsIntegration.php b/lib/Service/ContactsIntegration.php
index 15efff7dc..cded586ed 100644
--- a/lib/Service/ContactsIntegration.php
+++ b/lib/Service/ContactsIntegration.php
@@ -117,5 +117,4 @@ class ContactsIntegration {
return null;
}
}
-
}
diff --git a/lib/Service/Group/ContactsGroupService.php b/lib/Service/Group/ContactsGroupService.php
index 60e94eabe..169064797 100644
--- a/lib/Service/Group/ContactsGroupService.php
+++ b/lib/Service/Group/ContactsGroupService.php
@@ -109,7 +109,7 @@ class ContactsGroupService implements IGroupService {
if (!is_array($emails)) {
$emails = [$emails];
}
- foreach($emails as $email) {
+ foreach ($emails as $email) {
$receivers[] = [
'email' => $email
];
diff --git a/lib/Service/Group/IGroupService.php b/lib/Service/Group/IGroupService.php
index 9df81f096..480965059 100644
--- a/lib/Service/Group/IGroupService.php
+++ b/lib/Service/Group/IGroupService.php
@@ -47,6 +47,4 @@ interface IGroupService {
* @return array with group's users as associative arrays
*/
public function getUsers(string $groupId): array;
-
}
-
diff --git a/lib/Service/GroupsIntegration.php b/lib/Service/GroupsIntegration.php
index 5ad8714d6..39f00af80 100644
--- a/lib/Service/GroupsIntegration.php
+++ b/lib/Service/GroupsIntegration.php
@@ -107,5 +107,4 @@ class GroupsIntegration {
}, $carry);
}, $recipients);
}
-
}
diff --git a/lib/Service/Html.php b/lib/Service/Html.php
index 3fa3538ee..0703c5de9 100755
--- a/lib/Service/Html.php
+++ b/lib/Service/Html.php
@@ -153,5 +153,4 @@ class Html {
}
return $result;
}
-
}
diff --git a/lib/Service/HtmlPurify/CidURIScheme.php b/lib/Service/HtmlPurify/CidURIScheme.php
index 1c75c515b..4b82a68a5 100644
--- a/lib/Service/HtmlPurify/CidURIScheme.php
+++ b/lib/Service/HtmlPurify/CidURIScheme.php
@@ -29,7 +29,6 @@ use HTMLPurifier_URI;
use HTMLPurifier_URIScheme;
class CidURIScheme extends HTMLPurifier_URIScheme {
-
public $default_port = null;
public $browsable = true;
public $hierarchical = true;
diff --git a/lib/Service/HtmlPurify/TransformHTMLLinks.php b/lib/Service/HtmlPurify/TransformHTMLLinks.php
index 8a8dfacc9..b6efa6cae 100755
--- a/lib/Service/HtmlPurify/TransformHTMLLinks.php
+++ b/lib/Service/HtmlPurify/TransformHTMLLinks.php
@@ -59,5 +59,4 @@ class TransformHTMLLinks extends HTMLPurifier_AttrTransform {
return $attr;
}
-
}
diff --git a/lib/Service/HtmlPurify/TransformURLScheme.php b/lib/Service/HtmlPurify/TransformURLScheme.php
index da0955267..3ec93e73b 100644
--- a/lib/Service/HtmlPurify/TransformURLScheme.php
+++ b/lib/Service/HtmlPurify/TransformURLScheme.php
@@ -33,7 +33,6 @@ use OCP\IRequest;
use OCP\IURLGenerator;
class TransformURLScheme extends HTMLPurifier_URIFilter {
-
public $name = 'TransformURLScheme';
public $post = true;
@@ -138,5 +137,4 @@ class TransformURLScheme extends HTMLPurifier_URIFilter {
return $uri;
}
}
-
}
diff --git a/lib/Service/IMailBox.php b/lib/Service/IMailBox.php
index 1d6d98646..093e3d7f1 100644
--- a/lib/Service/IMailBox.php
+++ b/lib/Service/IMailBox.php
@@ -58,5 +58,4 @@ interface IMailBox {
* @return array
*/
public function getStatus(int $flags = Horde_Imap_Client::STATUS_ALL): array;
-
}
diff --git a/lib/Service/ItineraryService.php b/lib/Service/ItineraryService.php
index e8207c850..3b5a7a18e 100644
--- a/lib/Service/ItineraryService.php
+++ b/lib/Service/ItineraryService.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -87,7 +89,7 @@ class ItineraryService {
$this->logger->debug('Message does not have an HTML body, can\'t extract itinerary info');
}
$attachments = $this->messageMapper->getRawAttachments($client, $mailbox->getName(), $id);
- $itinerary = array_reduce($attachments, function(Itinerary $combined, string $attachment) {
+ $itinerary = array_reduce($attachments, function (Itinerary $combined, string $attachment) {
$extracted = $this->extractor->extract($attachment);
$this->logger->debug('Extracted ' . count($extracted) . ' itinerary entries from an attachment');
return $combined->merge($extracted);
@@ -102,5 +104,4 @@ class ItineraryService {
return $final;
}
-
}
diff --git a/lib/Service/MailManager.php b/lib/Service/MailManager.php
index 547a312e5..04787ea63 100644
--- a/lib/Service/MailManager.php
+++ b/lib/Service/MailManager.php
@@ -316,5 +316,4 @@ class MailManager implements IMailManager {
)
);
}
-
}
diff --git a/lib/Service/MailTransmission.php b/lib/Service/MailTransmission.php
index 537dcebaf..e31d25639 100644
--- a/lib/Service/MailTransmission.php
+++ b/lib/Service/MailTransmission.php
@@ -357,5 +357,4 @@ class MailTransmission implements IMailTransmission {
$message->addAttachmentFromFiles($file);
}
}
-
}
diff --git a/lib/Service/Provisioning/Config.php b/lib/Service/Provisioning/Config.php
index 886e66037..2af2f1827 100644
--- a/lib/Service/Provisioning/Config.php
+++ b/lib/Service/Provisioning/Config.php
@@ -27,7 +27,6 @@ use JsonSerializable;
use OCP\IUser;
class Config implements JsonSerializable {
-
private const VERSION = 1;
/** @var mixed[] */
@@ -146,5 +145,4 @@ class Config implements JsonSerializable {
$this->data
);
}
-
}
diff --git a/lib/Service/Provisioning/ConfigMapper.php b/lib/Service/Provisioning/ConfigMapper.php
index 5aef20f8f..2f9b2de31 100644
--- a/lib/Service/Provisioning/ConfigMapper.php
+++ b/lib/Service/Provisioning/ConfigMapper.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -27,7 +29,6 @@ use OCA\Mail\AppInfo\Application;
use OCP\IConfig;
class ConfigMapper {
-
private const CONFIG_KEY = 'provisioning_settings';
/** @var IConfig */
@@ -58,5 +59,4 @@ class ConfigMapper {
return $config;
}
-
}
diff --git a/lib/Service/Provisioning/Manager.php b/lib/Service/Provisioning/Manager.php
index d0088dbbf..931f9fd94 100644
--- a/lib/Service/Provisioning/Manager.php
+++ b/lib/Service/Provisioning/Manager.php
@@ -178,5 +178,4 @@ class Manager {
// Nothing to update
}
}
-
}
diff --git a/lib/Service/Search/FilterStringParser.php b/lib/Service/Search/FilterStringParser.php
index ad7e314ea..364fb02ac 100644
--- a/lib/Service/Search/FilterStringParser.php
+++ b/lib/Service/Search/FilterStringParser.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -26,7 +28,6 @@ namespace OCA\Mail\Service\Search;
use Horde_Imap_Client;
class FilterStringParser {
-
private const FLAG_MAP = [
'answered' => [Horde_Imap_Client::FLAG_ANSWERED, true],
'read' => [Horde_Imap_Client::FLAG_SEEN, true],
@@ -85,5 +86,4 @@ class FilterStringParser {
return false;
}
-
}
diff --git a/lib/Service/Search/MailSearch.php b/lib/Service/Search/MailSearch.php
index 9d1d9ab26..6c7c05a66 100644
--- a/lib/Service/Search/MailSearch.php
+++ b/lib/Service/Search/MailSearch.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -162,5 +164,4 @@ class MailSearch implements IMailSearch {
);
return $this->messageMapper->findUidsByQuery($mailbox, $query, $fromImap);
}
-
}
diff --git a/lib/Service/Search/SearchQuery.php b/lib/Service/Search/SearchQuery.php
index 560420d90..01e2f6c4c 100644
--- a/lib/Service/Search/SearchQuery.php
+++ b/lib/Service/Search/SearchQuery.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -139,5 +141,4 @@ class SearchQuery {
public function addTextToken(string $textToken): void {
$this->textTokens[] = $textToken;
}
-
}
diff --git a/lib/Service/SetupService.php b/lib/Service/SetupService.php
index 6ce93d378..fd6eacbdf 100644
--- a/lib/Service/SetupService.php
+++ b/lib/Service/SetupService.php
@@ -130,7 +130,6 @@ class SetupService {
return new Account($newAccount);
}
- return null;
+ return null;
}
-
}
diff --git a/lib/Service/Sync/ImapToDbSynchronizer.php b/lib/Service/Sync/ImapToDbSynchronizer.php
index 178b51319..fe4c7aef1 100644
--- a/lib/Service/Sync/ImapToDbSynchronizer.php
+++ b/lib/Service/Sync/ImapToDbSynchronizer.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -48,7 +50,7 @@ use function array_map;
class ImapToDbSynchronizer {
/** @var int */
- const MAX_NEW_MESSAGES = 5000;
+ public const MAX_NEW_MESSAGES = 5000;
/** @var DatabaseMessageMapper */
private $dbMapper;
@@ -301,5 +303,4 @@ class ImapToDbSynchronizer {
$this->mailboxMapper->update($mailbox);
$perf->end();
}
-
}
diff --git a/lib/Service/Sync/SyncService.php b/lib/Service/Sync/SyncService.php
index cfc121e3a..7da0649e5 100644
--- a/lib/Service/Sync/SyncService.php
+++ b/lib/Service/Sync/SyncService.php
@@ -156,5 +156,4 @@ class SyncService {
$vanished
);
}
-
}
diff --git a/lib/Service/UserPreferenceSevice.php b/lib/Service/UserPreferenceSevice.php
index 330ca42f8..f6881fbc6 100644
--- a/lib/Service/UserPreferenceSevice.php
+++ b/lib/Service/UserPreferenceSevice.php
@@ -61,5 +61,4 @@ class UserPreferenceSevice implements IUserPreferences {
public function getPreference($key, $default = null) {
return $this->config->getUserValue($this->UserId, 'mail', $key, $default);
}
-
}
diff --git a/lib/Settings/AdminSettings.php b/lib/Settings/AdminSettings.php
index 582532471..532749c85 100644
--- a/lib/Settings/AdminSettings.php
+++ b/lib/Settings/AdminSettings.php
@@ -74,5 +74,4 @@ class AdminSettings implements ISettings {
public function getPriority() {
return 90;
}
-
}
diff --git a/lib/Support/HostNameFactory.php b/lib/Support/HostNameFactory.php
index aba0c477c..4107f58b4 100644
--- a/lib/Support/HostNameFactory.php
+++ b/lib/Support/HostNameFactory.php
@@ -44,5 +44,4 @@ class HostNameFactory {
public function getHostName(): string {
return Util::getServerHostName();
}
-
}
diff --git a/lib/Support/PerformanceLogger.php b/lib/Support/PerformanceLogger.php
index 7043fbb36..56061011f 100644
--- a/lib/Support/PerformanceLogger.php
+++ b/lib/Support/PerformanceLogger.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -47,5 +49,4 @@ class PerformanceLogger {
$this->logger
);
}
-
}
diff --git a/lib/Support/PerformanceLoggerTask.php b/lib/Support/PerformanceLoggerTask.php
index 1452f2754..db4866b61 100644
--- a/lib/Support/PerformanceLoggerTask.php
+++ b/lib/Support/PerformanceLoggerTask.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -68,5 +70,4 @@ class PerformanceLoggerTask {
$this->logger->debug($this->task . " took ${passed}s");
}
-
}
diff --git a/tests/AddressListTest.php b/tests/AddressListTest.php
index 80a783dd4..80d660527 100644
--- a/tests/AddressListTest.php
+++ b/tests/AddressListTest.php
@@ -32,7 +32,6 @@ use OCA\Mail\Address;
use OCA\Mail\AddressList;
class AddressListTest extends TestCase {
-
public function testSerialize() {
$list = new AddressList([
new Address('User 1', 'user1@domain.tld'),
@@ -182,5 +181,4 @@ class AddressListTest extends TestCase {
$this->assertCount(2, $c);
}
-
}
diff --git a/tests/AddressTest.php b/tests/AddressTest.php
index 7c57446c8..1c7dcb7f6 100644
--- a/tests/AddressTest.php
+++ b/tests/AddressTest.php
@@ -29,7 +29,6 @@ use Horde_Mail_Rfc822_Address;
use OCA\Mail\Address;
class AddressTest extends TestCase {
-
public function testSerialization() {
$address = new Address('Christoph Wurst', 'christoph@domain.tld');
@@ -86,5 +85,4 @@ class AddressTest extends TestCase {
$this->assertFalse($equals);
}
-
}
diff --git a/tests/FolderTest.php b/tests/FolderTest.php
index 73d8fe64e..f2c7798ba 100644
--- a/tests/FolderTest.php
+++ b/tests/FolderTest.php
@@ -149,5 +149,4 @@ class FolderTest extends TestCase {
];
$this->assertEquals($expected, $this->folder->jsonSerialize());
}
-
}
diff --git a/tests/HordeTranslationHandlerTest.php b/tests/HordeTranslationHandlerTest.php
index 9bc7cb552..692dce84e 100644
--- a/tests/HordeTranslationHandlerTest.php
+++ b/tests/HordeTranslationHandlerTest.php
@@ -24,7 +24,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use OCA\Mail\HordeTranslationHandler;
class HordeTranslationHandlerTest extends TestCase {
-
private $handler;
protected function setUp(): void {
@@ -62,5 +61,4 @@ class HordeTranslationHandlerTest extends TestCase {
$this->assertEquals($expected, $actual);
}
-
}
diff --git a/tests/Integration/Db/AliasMapperTest.php b/tests/Integration/Db/AliasMapperTest.php
index 4cb11acdc..ed79edf1e 100644
--- a/tests/Integration/Db/AliasMapperTest.php
+++ b/tests/Integration/Db/AliasMapperTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Tahaa Karim <tahaalibra@gmail.com>
@@ -34,7 +36,6 @@ use OCP\IDBConnection;
* @group DB
*/
class AliasMapperTest extends TestCase {
-
use DatabaseTransaction;
/** @var AliasMapper */
@@ -83,17 +84,16 @@ class AliasMapperTest extends TestCase {
$this->assertEquals(
[
- 'accountId' => $this->alias->getAccountId(),
- 'name' => $this->alias->getName(),
- 'alias' => $this->alias->getAlias(),
- 'id' => $this->alias->getId()
+ 'accountId' => $this->alias->getAccountId(),
+ 'name' => $this->alias->getName(),
+ 'alias' => $this->alias->getAlias(),
+ 'id' => $this->alias->getId()
], [
- 'accountId' => $result->getAccountId(),
- 'name' => $result->getName(),
- 'alias' => $result->getAlias(),
- 'id' => $result->getId()
+ 'accountId' => $result->getAccountId(),
+ 'name' => $result->getName(),
+ 'alias' => $result->getAlias(),
+ 'id' => $result->getId()
]
);
}
-
}
diff --git a/tests/Integration/Db/CollectedAddressMapperTest.php b/tests/Integration/Db/CollectedAddressMapperTest.php
index 810398632..7c04ba628 100644
--- a/tests/Integration/Db/CollectedAddressMapperTest.php
+++ b/tests/Integration/Db/CollectedAddressMapperTest.php
@@ -33,7 +33,6 @@ use OCP\IDBConnection;
* @group DB
*/
class CollectedAddressMapperTest extends TestCase {
-
use DatabaseTransaction;
/** @var IDBConnection */
@@ -159,5 +158,4 @@ class CollectedAddressMapperTest extends TestCase {
$this->assertCount(2, $chunk);
}
-
}
diff --git a/tests/Integration/Db/MailAccountMapperTest.php b/tests/Integration/Db/MailAccountMapperTest.php
index 8c2a5792a..9dc9b5021 100644
--- a/tests/Integration/Db/MailAccountMapperTest.php
+++ b/tests/Integration/Db/MailAccountMapperTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Thomas Müller <thomas.mueller@tmit.eu>
@@ -32,7 +34,6 @@ use OCP\IDBConnection;
* @group DB
*/
class MailAccountMapperTest extends TestCase {
-
use DatabaseTransaction;
/** @var MailAccountMapper */
@@ -71,7 +72,7 @@ class MailAccountMapperTest extends TestCase {
$this->account->setOrder(27);
}
- public function testFind(){
+ public function testFind() {
/** @var MailAccount $b */
$b = $this->mapper->insert($this->account);
@@ -79,7 +80,7 @@ class MailAccountMapperTest extends TestCase {
$this->assertEquals($b->toJson(), $result->toJson());
$result = $this->mapper->findByUserId($b->getUserId());
- $c = array_filter($result, function($a) use($b){
+ $c = array_filter($result, function ($a) use ($b) {
/** @var MailAccount $a */
return $a->getId() === $b->getId();
});
diff --git a/tests/Integration/Db/MailAccountTest.php b/tests/Integration/Db/MailAccountTest.php
index f208660f7..22b0528c4 100644
--- a/tests/Integration/Db/MailAccountTest.php
+++ b/tests/Integration/Db/MailAccountTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Thomas Müller <thomas.mueller@tmit.eu>
@@ -25,7 +27,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use OCA\Mail\Db\MailAccount;
class MailAccountTest extends TestCase {
-
public function testToAPI() {
$a = new MailAccount();
$a->setId(3);
@@ -62,7 +63,7 @@ class MailAccountTest extends TestCase {
'editorMode' => 'html',
'provisioned' => false,
'order' => 13,
- ], $a->toJson());
+ ], $a->toJson());
}
public function testMailAccountConstruct() {
@@ -89,5 +90,4 @@ class MailAccountTest extends TestCase {
unset($expected['accountName']);
$this->assertEquals($expected, $a->toJson());
}
-
}
diff --git a/tests/Integration/Db/MailboxMapperTest.php b/tests/Integration/Db/MailboxMapperTest.php
index 0200b0f55..d086d993a 100644
--- a/tests/Integration/Db/MailboxMapperTest.php
+++ b/tests/Integration/Db/MailboxMapperTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -34,7 +36,6 @@ use OCP\IDBConnection;
use PHPUnit\Framework\MockObject\MockObject;
class MailboxMapperTest extends TestCase {
-
use DatabaseTransaction;
/** @var IDBConnection */
@@ -162,5 +163,4 @@ class MailboxMapperTest extends TestCase {
$this->assertSame('Trash', $result->getName());
}
-
}
diff --git a/tests/Integration/Framework/ImapTest.php b/tests/Integration/Framework/ImapTest.php
index c09eef861..7e9f93cd2 100644
--- a/tests/Integration/Framework/ImapTest.php
+++ b/tests/Integration/Framework/ImapTest.php
@@ -95,7 +95,7 @@ trait ImapTest {
* @return array<string>
*/
private function listMailboxes(Horde_Imap_Client_Socket $client) {
- return array_map(function($mailbox) {
+ return array_map(function ($mailbox) {
return $mailbox['mailbox'];
}, $client->listMailboxes('*'));
}
@@ -145,10 +145,10 @@ trait ImapTest {
$data = stream_get_contents($raw);
return $client->append($mailbox, [
- [
- 'data' => $data,
- ]
- ])->ids[0];
+ [
+ 'data' => $data,
+ ]
+ ])->ids[0];
}
public function flagMessage($mailbox, $id, MailAccount $account = null) {
@@ -252,5 +252,4 @@ trait ImapTest {
}
return $client;
}
-
}
diff --git a/tests/Integration/Framework/ImapTestAccount.php b/tests/Integration/Framework/ImapTestAccount.php
index 30271542a..c87db9dbe 100644
--- a/tests/Integration/Framework/ImapTestAccount.php
+++ b/tests/Integration/Framework/ImapTestAccount.php
@@ -67,5 +67,4 @@ trait ImapTestAccount {
return $acc;
}
-
}
diff --git a/tests/Integration/Framework/MessageBuilder.php b/tests/Integration/Framework/MessageBuilder.php
index 1eeb83062..c22604253 100644
--- a/tests/Integration/Framework/MessageBuilder.php
+++ b/tests/Integration/Framework/MessageBuilder.php
@@ -117,5 +117,4 @@ class MessageBuilder {
public function finish() {
return new SimpleMessage($this->from, $this->to, $this->cc, $this->bcc, $this->date, $this->subject, $this->body);
}
-
}
diff --git a/tests/Integration/Framework/SelfTest.php b/tests/Integration/Framework/SelfTest.php
index 1ab2f1bfb..0b00bf977 100644
--- a/tests/Integration/Framework/SelfTest.php
+++ b/tests/Integration/Framework/SelfTest.php
@@ -27,7 +27,6 @@ use OCA\Mail\Tests\Integration\TestCase;
* Tests the IMAP test framework functionality
*/
class SelfTest extends TestCase {
-
use ImapTest;
public function testResetAccount() {
@@ -51,5 +50,4 @@ class SelfTest extends TestCase {
$this->assertMessageCount(1, 'INBOX');
$this->assertIsInt($id);
}
-
}
diff --git a/tests/Integration/Framework/SimpleMessage.php b/tests/Integration/Framework/SimpleMessage.php
index 8c734867c..c9d55c647 100644
--- a/tests/Integration/Framework/SimpleMessage.php
+++ b/tests/Integration/Framework/SimpleMessage.php
@@ -66,50 +66,49 @@ class SimpleMessage {
/**
* @return string
*/
- function getFrom() {
+ public function getFrom() {
return $this->from;
}
/**
* @return string
*/
- function getTo() {
+ public function getTo() {
return $this->to;
}
/**
* @return string
*/
- function getCc() {
+ public function getCc() {
return $this->cc;
}
/**
* @return string
*/
- function getBcc() {
+ public function getBcc() {
return $this->bcc;
}
/**
* @return string
*/
- function getDate() {
+ public function getDate() {
return $this->date;
}
/**
* @return string
*/
- function getSubject() {
+ public function getSubject() {
return $this->subject;
}
/**
* @return string
*/
- function getBody() {
+ public function getBody() {
return $this->body;
}
-
}
diff --git a/tests/Integration/IMAP/AbstractTest.php b/tests/Integration/IMAP/AbstractTest.php
index 1aed23c94..334c395a9 100644
--- a/tests/Integration/IMAP/AbstractTest.php
+++ b/tests/Integration/IMAP/AbstractTest.php
@@ -73,7 +73,6 @@ abstract class AbstractTest extends TestCase {
try {
self::deleteMailbox($createdMailbox);
} catch (Exception $ex) {
-
}
}
}
@@ -147,5 +146,4 @@ MIME-Version: 1.0
$contents";
$mailbox->saveMessage($message);
}
-
}
diff --git a/tests/Integration/IMAP/AccountTest.php b/tests/Integration/IMAP/AccountTest.php
index e3779082b..3f8f1c60f 100644
--- a/tests/Integration/IMAP/AccountTest.php
+++ b/tests/Integration/IMAP/AccountTest.php
@@ -24,7 +24,6 @@
namespace OCA\Mail\Tests\Integration\IMAP;
-
/**
* @group IMAP
*/
diff --git a/tests/Integration/IMAP/IMAPClientFactoryTest.php b/tests/Integration/IMAP/IMAPClientFactoryTest.php
index 675b1ebe9..657ad2462 100644
--- a/tests/Integration/IMAP/IMAPClientFactoryTest.php
+++ b/tests/Integration/IMAP/IMAPClientFactoryTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -93,5 +95,4 @@ class IMAPClientFactoryTest extends TestCase {
$client = $this->factory->getClient($account);
$client->login();
}
-
}
diff --git a/tests/Integration/KItinerary/ItineraryExtractorTest.php b/tests/Integration/KItinerary/ItineraryExtractorTest.php
index 16aebe5fa..5849922eb 100644
--- a/tests/Integration/KItinerary/ItineraryExtractorTest.php
+++ b/tests/Integration/KItinerary/ItineraryExtractorTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -99,5 +101,4 @@ class ItineraryExtractorTest extends TestCase {
$this->assertEquals([], $itinerary->jsonSerialize());
}
-
}
diff --git a/tests/Integration/MailboxSynchronizationTest.php b/tests/Integration/MailboxSynchronizationTest.php
index f806479f2..fe54bdab7 100644
--- a/tests/Integration/MailboxSynchronizationTest.php
+++ b/tests/Integration/MailboxSynchronizationTest.php
@@ -34,7 +34,6 @@ use OCA\Mail\Tests\Integration\Framework\ImapTest;
use OCA\Mail\Tests\Integration\Framework\ImapTestAccount;
class MailboxSynchronizationTest extends TestCase {
-
use ImapTest,
ImapTestAccount;
@@ -181,5 +180,4 @@ class MailboxSynchronizationTest extends TestCase {
// $this->assertCount(0, $syncJson['changedMessages']);
$this->assertCount(1, $syncJson['vanishedMessages']);
}
-
}
diff --git a/tests/Integration/Service/Avatar/FaviconSourceTest.php b/tests/Integration/Service/Avatar/FaviconSourceTest.php
index dfbad9f4e..7b0582f9e 100644
--- a/tests/Integration/Service/Avatar/FaviconSourceTest.php
+++ b/tests/Integration/Service/Avatar/FaviconSourceTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -84,5 +86,4 @@ class FaviconSourceTest extends TestCase {
$this->assertNotNull($avatar);
$this->assertEmpty(iterator_to_array($this->getCacheFiles()));
}
-
}
diff --git a/tests/Integration/Service/AvatarServiceIntegrationTest.php b/tests/Integration/Service/AvatarServiceIntegrationTest.php
index 78e588414..c991584b6 100644
--- a/tests/Integration/Service/AvatarServiceIntegrationTest.php
+++ b/tests/Integration/Service/AvatarServiceIntegrationTest.php
@@ -73,5 +73,4 @@ class AvatarServiceIntegrationTest extends TestCase {
$avatar = $this->service->getAvatar('christoph@winzerhof-wurst.at', 'jan');
$this->assertNull($avatar); // There is none
}
-
}
diff --git a/tests/Integration/Service/FolderMapperIntegrationTest.php b/tests/Integration/Service/FolderMapperIntegrationTest.php
index 1f8427f49..fd08c6961 100644
--- a/tests/Integration/Service/FolderMapperIntegrationTest.php
+++ b/tests/Integration/Service/FolderMapperIntegrationTest.php
@@ -63,5 +63,4 @@ class FolderMapperIntegrationTest extends TestCase {
$this->assertInstanceOf(Folder::class, $folder);
}
}
-
}
diff --git a/tests/Integration/Service/MailTransmissionIntegrationTest.php b/tests/Integration/Service/MailTransmissionIntegrationTest.php
index 4a9ad10ff..fcfed63f8 100644
--- a/tests/Integration/Service/MailTransmissionIntegrationTest.php
+++ b/tests/Integration/Service/MailTransmissionIntegrationTest.php
@@ -44,7 +44,6 @@ use OCP\IUser;
use OCP\Security\ICrypto;
class MailTransmissionIntegrationTest extends TestCase {
-
use ImapTest,
TestUser;
@@ -212,5 +211,4 @@ class MailTransmissionIntegrationTest extends TestCase {
$this->assertMessageCount(1, 'Drafts');
}
-
}
diff --git a/tests/Integration/TestCase.php b/tests/Integration/TestCase.php
index 694f989e1..b8f98234a 100644
--- a/tests/Integration/TestCase.php
+++ b/tests/Integration/TestCase.php
@@ -25,7 +25,6 @@ use OCA\Mail\Tests\Integration\Framework\ImapTest;
use ChristophWurst\Nextcloud\Testing\TestCase as Base;
class TestCase extends Base {
-
protected function setUp(): void {
parent::setUp();
@@ -34,5 +33,4 @@ class TestCase extends Base {
$this->resetImapAccount();
}
}
-
}
diff --git a/tests/Service/ItineraryServiceTest.php b/tests/Service/ItineraryServiceTest.php
index 00041c46b..eaa18c751 100644
--- a/tests/Service/ItineraryServiceTest.php
+++ b/tests/Service/ItineraryServiceTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -134,5 +136,4 @@ class ItineraryServiceTest extends TestCase {
$this->assertEquals(['datafrompdf'], $itinerary->jsonSerialize());
}
-
}
diff --git a/tests/Unit/AppInfo/ApplicationTest.php b/tests/Unit/AppInfo/ApplicationTest.php
index eb851449d..a1d51015b 100644
--- a/tests/Unit/AppInfo/ApplicationTest.php
+++ b/tests/Unit/AppInfo/ApplicationTest.php
@@ -25,12 +25,10 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use OCA\Mail\AppInfo\Application;
class ApplicationTest extends TestCase {
-
public function testConstrucor() {
// Not really a test – it's just about code coverage
new Application();
$this->addToAssertionCount(1);
}
-
}
diff --git a/tests/Unit/Command/CreateAccountTest.php b/tests/Unit/Command/CreateAccountTest.php
index 6ded877e5..317b2fa8a 100644
--- a/tests/Unit/Command/CreateAccountTest.php
+++ b/tests/Unit/Command/CreateAccountTest.php
@@ -25,7 +25,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use OCA\Mail\Command\CreateAccount;
class CreateAccountTest extends TestCase {
-
private $service;
private $crypto;
private $command;
@@ -72,5 +71,4 @@ class CreateAccountTest extends TestCase {
$this->assertTrue(in_array($actArg->getName(), $this->args));
}
}
-
}
diff --git a/tests/Unit/Controller/AccountsControllerTest.php b/tests/Unit/Controller/AccountsControllerTest.php
index 0d6082a9b..cbb0a816d 100644
--- a/tests/Unit/Controller/AccountsControllerTest.php
+++ b/tests/Unit/Controller/AccountsControllerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -121,8 +123,8 @@ class AccountsControllerTest extends TestCase {
$this->account->expects($this->once())
->method('jsonSerialize')
->will($this->returnValue([
- 'accountId' => 123,
- ]));
+ 'accountId' => 123,
+ ]));
$this->accountService->expects($this->once())
->method('findByUserId')
->with($this->equalTo($this->userId))
@@ -476,5 +478,4 @@ class AccountsControllerTest extends TestCase {
$this->assertEquals($expected, $actual);
}
-
}
diff --git a/tests/Unit/Controller/AutoconfigControllerTest.php b/tests/Unit/Controller/AutoconfigControllerTest.php
index 12e397473..4bd67d293 100644
--- a/tests/Unit/Controller/AutoconfigControllerTest.php
+++ b/tests/Unit/Controller/AutoconfigControllerTest.php
@@ -26,7 +26,6 @@ use OCA\Mail\Controller\AutoCompleteController;
use OCP\AppFramework\Http\JSONResponse;
class AutoConfigControllerTest extends TestCase {
-
private $request;
private $service;
private $controller;
@@ -59,5 +58,4 @@ class AutoConfigControllerTest extends TestCase {
$this->assertEquals(new JSONResponse($result), $response);
}
-
}
diff --git a/tests/Unit/Controller/AvatarControllerTest.php b/tests/Unit/Controller/AvatarControllerTest.php
index 20651c047..557a946cc 100644
--- a/tests/Unit/Controller/AvatarControllerTest.php
+++ b/tests/Unit/Controller/AvatarControllerTest.php
@@ -58,7 +58,7 @@ class AvatarControllerTest extends TestCase {
->method('getTime')
->willReturn(10000);
$this->oldFactory = \OC::$server->offsetGet(ITimeFactory::class);
- \OC::$server->registerService(ITimeFactory::class, function() use ($timeFactory) {
+ \OC::$server->registerService(ITimeFactory::class, function () use ($timeFactory) {
return $timeFactory;
});
@@ -130,5 +130,4 @@ class AvatarControllerTest extends TestCase {
$expected->cacheFor(0);
$this->assertEquals($expected, $resp);
}
-
}
diff --git a/tests/Unit/Controller/FoldersControllerTest.php b/tests/Unit/Controller/FoldersControllerTest.php
index b3a52327e..95e7312ae 100644
--- a/tests/Unit/Controller/FoldersControllerTest.php
+++ b/tests/Unit/Controller/FoldersControllerTest.php
@@ -160,5 +160,4 @@ class FoldersControllerTest extends TestCase {
$this->controller->update();
}
-
}
diff --git a/tests/Unit/Controller/LocalAttachmentsControllerTest.php b/tests/Unit/Controller/LocalAttachmentsControllerTest.php
index 41112b143..96b566afb 100644
--- a/tests/Unit/Controller/LocalAttachmentsControllerTest.php
+++ b/tests/Unit/Controller/LocalAttachmentsControllerTest.php
@@ -84,5 +84,4 @@ class LocalAttachmentsControllerTest extends TestCase {
$this->assertEquals(new JSONResponse($attachment, 201), $actual);
}
-
}
diff --git a/tests/Unit/Controller/MessagesControllerTest.php b/tests/Unit/Controller/MessagesControllerTest.php
index 42acc2725..6c7c5bd69 100644
--- a/tests/Unit/Controller/MessagesControllerTest.php
+++ b/tests/Unit/Controller/MessagesControllerTest.php
@@ -463,5 +463,4 @@ class MessagesControllerTest extends TestCase {
$this->controller->destroy($accountId, $folderId, $messageId);
}
-
}
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php
index e52245320..060b9ccb9 100644
--- a/tests/Unit/Controller/PageControllerTest.php
+++ b/tests/Unit/Controller/PageControllerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -296,5 +298,4 @@ class PageControllerTest extends TestCase {
$this->assertEquals($expected, $response);
}
-
}
diff --git a/tests/Unit/Controller/PreferencesControllerTest.php b/tests/Unit/Controller/PreferencesControllerTest.php
index d1680ef2e..ec60ffa91 100644
--- a/tests/Unit/Controller/PreferencesControllerTest.php
+++ b/tests/Unit/Controller/PreferencesControllerTest.php
@@ -73,5 +73,4 @@ class PreferencesControllerTest extends TestCase {
$this->assertEquals($expected, $actual);
}
-
}
diff --git a/tests/Unit/Controller/ProxyControllerTest.php b/tests/Unit/Controller/ProxyControllerTest.php
index e78cb9c95..7f81a6986 100644
--- a/tests/Unit/Controller/ProxyControllerTest.php
+++ b/tests/Unit/Controller/ProxyControllerTest.php
@@ -192,5 +192,4 @@ class ProxyControllerTest extends TestCase {
$this->assertEquals($expected, $response);
}
-
}
diff --git a/tests/Unit/Controller/SettingsControllerTest.php b/tests/Unit/Controller/SettingsControllerTest.php
index 4e3280c11..0c97f60f7 100644
--- a/tests/Unit/Controller/SettingsControllerTest.php
+++ b/tests/Unit/Controller/SettingsControllerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
diff --git a/tests/Unit/Http/AttachmentDownloadResponseTest.php b/tests/Unit/Http/AttachmentDownloadResponseTest.php
index 747880bec..11a9d79f9 100644
--- a/tests/Unit/Http/AttachmentDownloadResponseTest.php
+++ b/tests/Unit/Http/AttachmentDownloadResponseTest.php
@@ -46,8 +46,7 @@ class AttachmentDownloadResponseTest extends TestCase {
public function providesResponseData() {
return [
- ['1234567890', 'test.txt', 'text/plain']
+ ['1234567890', 'test.txt', 'text/plain']
];
}
-
}
diff --git a/tests/Unit/Http/AvatarDownloadResponseTest.php b/tests/Unit/Http/AvatarDownloadResponseTest.php
index 479b0923f..52064ebde 100644
--- a/tests/Unit/Http/AvatarDownloadResponseTest.php
+++ b/tests/Unit/Http/AvatarDownloadResponseTest.php
@@ -28,12 +28,10 @@ use OCA\Mail\Http\AvatarDownloadResponse;
use ChristophWurst\Nextcloud\Testing\TestCase;
class AvatarDownloadResponseTest extends TestCase {
-
public function testResponse() {
$response = new AvatarDownloadResponse('data');
$this->assertEquals('application/octet-stream', $response->getHeaders()['Content-Type']);
$this->assertEquals('data', $response->render());
}
-
}
diff --git a/tests/Unit/Http/HtmlResponseTest.php b/tests/Unit/Http/HtmlResponseTest.php
index 47d528a15..84d025210 100644
--- a/tests/Unit/Http/HtmlResponseTest.php
+++ b/tests/Unit/Http/HtmlResponseTest.php
@@ -34,15 +34,13 @@ class HtmlResponseTest extends TestCase {
* @param $contentType
*/
public function testIt($content) {
-
$resp = new HtmlResponse($content);
$this->assertEquals($content, $resp->render());
}
public function providesResponseData() {
return [
- ['1234567890']
+ ['1234567890']
];
}
-
}
diff --git a/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php b/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php
index a1cf2c229..d5623421c 100644
--- a/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php
+++ b/tests/Unit/Http/Middleware/ErrorMiddlewareTest.php
@@ -165,5 +165,4 @@ class ErrorMiddlewareTest extends TestCase {
$response->getStatus()
);
}
-
}
diff --git a/tests/Unit/Http/Middleware/ProvisioningMiddlewareTest.php b/tests/Unit/Http/Middleware/ProvisioningMiddlewareTest.php
index 3f42fe201..a894a446e 100644
--- a/tests/Unit/Http/Middleware/ProvisioningMiddlewareTest.php
+++ b/tests/Unit/Http/Middleware/ProvisioningMiddlewareTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -207,5 +209,4 @@ class ProvisioningMiddlewareTest extends TestCase {
'index'
);
}
-
}
diff --git a/tests/Unit/Http/ProxyDownloadResponseTest.php b/tests/Unit/Http/ProxyDownloadResponseTest.php
index 6c993f889..ac9d361b6 100644
--- a/tests/Unit/Http/ProxyDownloadResponseTest.php
+++ b/tests/Unit/Http/ProxyDownloadResponseTest.php
@@ -46,8 +46,7 @@ class ProxyDownloadResponseTest extends TestCase {
public function providesResponseData() {
return [
- ['1234567890', 'test.txt', 'text/plain']
+ ['1234567890', 'test.txt', 'text/plain']
];
}
-
}
diff --git a/tests/Unit/IMAP/FolderMapperTest.php b/tests/Unit/IMAP/FolderMapperTest.php
index d60460ade..b7d6f0790 100644
--- a/tests/Unit/IMAP/FolderMapperTest.php
+++ b/tests/Unit/IMAP/FolderMapperTest.php
@@ -53,7 +53,7 @@ class FolderMapperTest extends TestCase {
'delimiter' => true,
'attributes' => true,
'special_use' => true,
- ]))
+ ]))
->willReturn([]);
$folders = $this->mapper->getFolders($account, $client);
@@ -72,7 +72,7 @@ class FolderMapperTest extends TestCase {
'delimiter' => true,
'attributes' => true,
'special_use' => true,
- ]))
+ ]))
->willReturn([
[
'mailbox' => new Horde_Imap_Client_Mailbox('INBOX'),
@@ -86,7 +86,7 @@ class FolderMapperTest extends TestCase {
],
'delimiter' => '.',
],
- ]);
+ ]);
$expected = [
new Folder(27, new Horde_Imap_Client_Mailbox('INBOX'), [], '.'),
new Folder(27, new Horde_Imap_Client_Mailbox('Sent'), ['\sent'], '.'),
@@ -144,7 +144,7 @@ class FolderMapperTest extends TestCase {
'folder1' => [
'total' => 123
],
- ]);
+ ]);
$folders[0]->expects($this->once())
->method('setStatus');
@@ -167,7 +167,7 @@ class FolderMapperTest extends TestCase {
->with($this->equalTo(['folder1']))
->willReturn([
// Nothing reported for this folder
- ]);
+ ]);
$folders[0]->expects($this->never())
->method('setStatus');
@@ -219,7 +219,7 @@ class FolderMapperTest extends TestCase {
->method('getAttributes')
->willReturn([
Horde_Imap_Client::SPECIALUSE_SENT,
- ]);
+ ]);
$folders[0]->expects($this->once())
->method('addSpecialUse')
->with($this->equalTo('sent'));
@@ -252,5 +252,4 @@ class FolderMapperTest extends TestCase {
$this->mapper->detectFolderSpecialUse($folders);
}
-
}
diff --git a/tests/Unit/IMAP/MailboxSyncTest.php b/tests/Unit/IMAP/MailboxSyncTest.php
index dd1ebfb5d..fb8db39ab 100644
--- a/tests/Unit/IMAP/MailboxSyncTest.php
+++ b/tests/Unit/IMAP/MailboxSyncTest.php
@@ -117,5 +117,4 @@ class MailboxSyncTest extends TestCase {
$this->sync->sync($account);
}
-
}
diff --git a/tests/Unit/IMAP/MessageMapperTest.php b/tests/Unit/IMAP/MessageMapperTest.php
index 548cb2297..666b97219 100644
--- a/tests/Unit/IMAP/MessageMapperTest.php
+++ b/tests/Unit/IMAP/MessageMapperTest.php
@@ -78,5 +78,4 @@ class MessageMapperTest extends TestCase {
$this->assertEquals($expected, $result);
}
-
}
diff --git a/tests/Unit/IMAP/Sync/RequestTest.php b/tests/Unit/IMAP/Sync/RequestTest.php
index 902ce3a4f..a35da389f 100644
--- a/tests/Unit/IMAP/Sync/RequestTest.php
+++ b/tests/Unit/IMAP/Sync/RequestTest.php
@@ -51,5 +51,4 @@ class RequestTest extends TestCase {
public function testGetSyncToken() {
$this->assertEquals($this->syncToken, $this->request->getToken());
}
-
}
diff --git a/tests/Unit/IMAP/Sync/ResponseTest.php b/tests/Unit/IMAP/Sync/ResponseTest.php
index 892324abb..27fb3c6b5 100644
--- a/tests/Unit/IMAP/Sync/ResponseTest.php
+++ b/tests/Unit/IMAP/Sync/ResponseTest.php
@@ -25,7 +25,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use OCA\Mail\IMAP\Sync\Response;
class ResponseTest extends TestCase {
-
public function testJsonSerialize() {
$newMessages = [];
$changedMessages = [];
@@ -41,5 +40,4 @@ class ResponseTest extends TestCase {
$this->assertEquals($expected, $json);
}
-
}
diff --git a/tests/Unit/IMAP/Sync/SynchronizerTest.php b/tests/Unit/IMAP/Sync/SynchronizerTest.php
index 047221e27..ddfaba75f 100644
--- a/tests/Unit/IMAP/Sync/SynchronizerTest.php
+++ b/tests/Unit/IMAP/Sync/SynchronizerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -78,5 +80,4 @@ class SynchronizerTest extends TestCase {
$this->assertEquals($expected, $response);
}
-
}
diff --git a/tests/Unit/Listener/AddressCollectionListenerTest.php b/tests/Unit/Listener/AddressCollectionListenerTest.php
index 9d160a144..a9f57f10b 100644
--- a/tests/Unit/Listener/AddressCollectionListenerTest.php
+++ b/tests/Unit/Listener/AddressCollectionListenerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -136,5 +138,4 @@ class AddressCollectionListenerTest extends TestCase {
$this->addToAssertionCount(1);
}
-
}
diff --git a/tests/Unit/Listener/DeleteDraftListenerTest.php b/tests/Unit/Listener/DeleteDraftListenerTest.php
index 7b68f26e3..bafe771db 100644
--- a/tests/Unit/Listener/DeleteDraftListenerTest.php
+++ b/tests/Unit/Listener/DeleteDraftListenerTest.php
@@ -226,5 +226,4 @@ class DeleteDraftListenerTest extends TestCase {
$this->listener->handle($event);
}
-
}
diff --git a/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php b/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php
index eb9c69b73..885e6596c 100644
--- a/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php
+++ b/tests/Unit/Listener/DraftMailboxCreatorListenerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -146,5 +148,4 @@ class DraftMailboxCreatorListenerTest extends TestCase {
$this->listener->handle($event);
}
-
}
diff --git a/tests/Unit/Listener/FlagRepliedMessageListenerTest.php b/tests/Unit/Listener/FlagRepliedMessageListenerTest.php
index d70ad48eb..fae3b3705 100644
--- a/tests/Unit/Listener/FlagRepliedMessageListenerTest.php
+++ b/tests/Unit/Listener/FlagRepliedMessageListenerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -187,5 +189,4 @@ class FlagRepliedMessageListenerTest extends TestCase {
$this->listener->handle($event);
}
-
}
diff --git a/tests/Unit/Listener/InteractionListenerTest.php b/tests/Unit/Listener/InteractionListenerTest.php
index fa8ccb881..a22d81cea 100644
--- a/tests/Unit/Listener/InteractionListenerTest.php
+++ b/tests/Unit/Listener/InteractionListenerTest.php
@@ -102,5 +102,4 @@ class InteractionListenerTest extends TestCase {
$this->listener->handle($event);
}
-
}
diff --git a/tests/Unit/Listener/MessageCacheUpdaterListenerTest.php b/tests/Unit/Listener/MessageCacheUpdaterListenerTest.php
index 872528b5b..5fac913cf 100644
--- a/tests/Unit/Listener/MessageCacheUpdaterListenerTest.php
+++ b/tests/Unit/Listener/MessageCacheUpdaterListenerTest.php
@@ -105,5 +105,4 @@ class MessageCacheUpdaterListenerTest extends TestCase {
$this->assertTrue($message->getFlagJunk());
}
-
}
diff --git a/tests/Unit/Listener/SaveSentMessageListenerTest.php b/tests/Unit/Listener/SaveSentMessageListenerTest.php
index 3850ecb7d..b5a443c03 100644
--- a/tests/Unit/Listener/SaveSentMessageListenerTest.php
+++ b/tests/Unit/Listener/SaveSentMessageListenerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -265,5 +267,4 @@ class SaveSentMessageListenerTest extends TestCase {
$this->listener->handle($event);
}
-
}
diff --git a/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php b/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php
index 22e86e3b2..4ccc572a8 100644
--- a/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php
+++ b/tests/Unit/Listener/TrashMailboxCreatorListenerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -164,5 +166,4 @@ class TrashMailboxCreatorListenerTest extends TestCase {
$this->listener->handle($event);
}
-
}
diff --git a/tests/Unit/Migration/FixCollectedAddressesTest.php b/tests/Unit/Migration/FixCollectedAddressesTest.php
index 0c0ae04d9..40d888b1a 100644
--- a/tests/Unit/Migration/FixCollectedAddressesTest.php
+++ b/tests/Unit/Migration/FixCollectedAddressesTest.php
@@ -62,14 +62,14 @@ class FixCollectedAddressesTest extends TestCase {
$this->mapper->expects($this->exactly(2))
->method('getChunk')
->will($this->returnValueMap([
- [
- null, [
- $address1,
- $address2,
- ]],
- [
- 201, []]
- ]));
+ [
+ null, [
+ $address1,
+ $address2,
+ ]],
+ [
+ 201, []]
+ ]));
$this->mapper->expects($this->never())
->method('update');
@@ -89,14 +89,14 @@ class FixCollectedAddressesTest extends TestCase {
$this->mapper->expects($this->exactly(2))
->method('getChunk')
->will($this->returnValueMap([
- [
- null, [
- $address1,
- $address2,
- ]],
- [
- 201, []]
- ]));
+ [
+ null, [
+ $address1,
+ $address2,
+ ]],
+ [
+ 201, []]
+ ]));
$this->mapper->expects($this->once())
->method('update')
->with($address1);
@@ -120,19 +120,18 @@ class FixCollectedAddressesTest extends TestCase {
$this->mapper->expects($this->exactly(2))
->method('getChunk')
->will($this->returnValueMap([
- [
- null, [
- $address1,
- $address2,
- ]],
- [
- 201, []]
- ]));
+ [
+ null, [
+ $address1,
+ $address2,
+ ]],
+ [
+ 201, []]
+ ]));
$this->mapper->expects($this->once())
->method('delete')
->with($address1);
$this->repairStep->run($this->output);
}
-
}
diff --git a/tests/Unit/Migration/MigrateProvisioningConfigTest.php b/tests/Unit/Migration/MigrateProvisioningConfigTest.php
index b75d1bc06..7a0dc7862 100644
--- a/tests/Unit/Migration/MigrateProvisioningConfigTest.php
+++ b/tests/Unit/Migration/MigrateProvisioningConfigTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -102,5 +104,4 @@ class MigrateProvisioningConfigTest extends TestCase {
$this->assertEquals('Migrate Mail provisioning config from config.php to the database', $name);
}
-
}
diff --git a/tests/Unit/Model/IMAPMessageTest.php b/tests/Unit/Model/IMAPMessageTest.php
index cce7ed917..02d2144f7 100644
--- a/tests/Unit/Model/IMAPMessageTest.php
+++ b/tests/Unit/Model/IMAPMessageTest.php
@@ -31,7 +31,6 @@ use OCA\Mail\Model\IMAPMessage;
use OCA\Mail\Service\Html;
class IMAPMessageTest extends TestCase {
-
public function testNoFrom() {
$data = new Horde_Imap_Client_Data_Fetch();
$m = new IMAPMessage(null, 'INBOX', 123, $data);
@@ -56,8 +55,8 @@ class IMAPMessageTest extends TestCase {
$urlGenerator->expects($this->any())
->method('linkToRoute')
->will($this->returnCallback(function ($url) {
- return "https://docs.example.com/server/go.php?to=$url";
- }));
+ return "https://docs.example.com/server/go.php?to=$url";
+ }));
$htmlService = new Html($urlGenerator, $request);
// mock first fetch
@@ -91,5 +90,4 @@ class IMAPMessageTest extends TestCase {
$this->assertEquals(1234, $json['id']);
}
-
}
diff --git a/tests/Unit/Model/MessageTest.php b/tests/Unit/Model/MessageTest.php
index 675831903..1845b5c1e 100644
--- a/tests/Unit/Model/MessageTest.php
+++ b/tests/Unit/Model/MessageTest.php
@@ -28,7 +28,6 @@ use OCA\Mail\AddressList;
use OCA\Mail\Model\Message;
class MessageTest extends TestCase {
-
protected $message;
protected function setUp(): void {
@@ -166,5 +165,4 @@ class MessageTest extends TestCase {
$this->assertCount(1, $actual);
//$this->assertEquals($expected, $actual[0]);
}
-
}
diff --git a/tests/Unit/Model/NewMessageDataTest.php b/tests/Unit/Model/NewMessageDataTest.php
index 9aeadcfa5..55eb50941 100644
--- a/tests/Unit/Model/NewMessageDataTest.php
+++ b/tests/Unit/Model/NewMessageDataTest.php
@@ -27,7 +27,6 @@ use OCA\Mail\AddressList;
use OCA\Mail\Model\NewMessageData;
class NewMessageDataTest extends TestCase {
-
public function testConstructionFromSimpleRequestData() {
$account = $this->createMock(Account::class);
$to = '"Test" <test@domain.com>';
@@ -68,5 +67,4 @@ class NewMessageDataTest extends TestCase {
$this->assertEquals('Hi!', $messageData->getBody());
$this->assertEquals([], $messageData->getAttachments());
}
-
}
diff --git a/tests/Unit/Model/RepliedMessageTest.php b/tests/Unit/Model/RepliedMessageTest.php
index 2a59c0ec5..00cbe8bff 100644
--- a/tests/Unit/Model/RepliedMessageTest.php
+++ b/tests/Unit/Model/RepliedMessageTest.php
@@ -27,7 +27,6 @@ use OCA\Mail\Model\RepliedMessageData;
use PHPUnit\Framework\MockObject\MockObject;
class RepliedMessageTest extends TestCase {
-
public function testGetAccount() {
/** @var Account|MockObject $account */
$account = $this->createMock(Account::class);
@@ -53,5 +52,4 @@ class RepliedMessageTest extends TestCase {
$this->assertEquals($messageId, $data->getId());
}
-
}
diff --git a/tests/Unit/SMTP/SmtpClientFactoryTest.php b/tests/Unit/SMTP/SmtpClientFactoryTest.php
index d0c14bb1f..bcf076848 100644
--- a/tests/Unit/SMTP/SmtpClientFactoryTest.php
+++ b/tests/Unit/SMTP/SmtpClientFactoryTest.php
@@ -123,5 +123,4 @@ class SmtpClientFactoryTest extends TestCase {
$this->assertInstanceOf(Horde_Mail_Transport_Smtphorde::class, $transport);
$this->assertEquals($expected, $transport);
}
-
}
diff --git a/tests/Unit/Service/AccountServiceTest.php b/tests/Unit/Service/AccountServiceTest.php
index 9289b70c5..a129ca8d2 100644
--- a/tests/Unit/Service/AccountServiceTest.php
+++ b/tests/Unit/Service/AccountServiceTest.php
@@ -156,5 +156,4 @@ class AccountServiceTest extends TestCase {
$this->accountService->updateSignature($id, $uid, $signature);
}
-
}
diff --git a/tests/Unit/Service/AliasesServiceTest.php b/tests/Unit/Service/AliasesServiceTest.php
index 5da2a7344..98e8064e1 100644
--- a/tests/Unit/Service/AliasesServiceTest.php
+++ b/tests/Unit/Service/AliasesServiceTest.php
@@ -95,15 +95,15 @@ class AliasesServiceTest extends TestCase {
$this->assertEquals(
[
- 'accountId' => $aliasEntity->getAccountId(),
- 'name' => $aliasEntity->getName(),
- 'alias' => $aliasEntity->getAlias(),
- 'id' => $aliasEntity->getId()
+ 'accountId' => $aliasEntity->getAccountId(),
+ 'name' => $aliasEntity->getName(),
+ 'alias' => $aliasEntity->getAlias(),
+ 'id' => $aliasEntity->getId()
], [
- 'accountId' => $result->getAccountId(),
- 'name' => $result->getName(),
- 'alias' => $result->getAlias(),
- 'id' => $result->getId()
+ 'accountId' => $result->getAccountId(),
+ 'name' => $result->getName(),
+ 'alias' => $result->getAlias(),
+ 'id' => $result->getId()
]
);
}
@@ -120,5 +120,4 @@ class AliasesServiceTest extends TestCase {
$this->service->delete($aliasId, $this->user);
}
-
}
diff --git a/tests/Unit/Service/Attachment/AttachmentServiceTest.php b/tests/Unit/Service/Attachment/AttachmentServiceTest.php
index deff97cb8..fc0381826 100644
--- a/tests/Unit/Service/Attachment/AttachmentServiceTest.php
+++ b/tests/Unit/Service/Attachment/AttachmentServiceTest.php
@@ -57,13 +57,13 @@ class AttachmentServiceTest extends TestCase {
->method('getFileName')
->willReturn('cat.jpg');
$attachment = LocalAttachment::fromParams([
- 'userId' => $userId,
- 'fileName' => 'cat.jpg',
+ 'userId' => $userId,
+ 'fileName' => 'cat.jpg',
]);
$persistedAttachment = LocalAttachment::fromParams([
- 'id' => 123,
- 'userId' => $userId,
- 'fileName' => 'cat.jpg',
+ 'id' => 123,
+ 'userId' => $userId,
+ 'fileName' => 'cat.jpg',
]);
$this->mapper->expects($this->once())
->method('insert')
@@ -88,13 +88,13 @@ class AttachmentServiceTest extends TestCase {
->method('getFileName')
->willReturn('cat.jpg');
$attachment = LocalAttachment::fromParams([
- 'userId' => $userId,
- 'fileName' => 'cat.jpg',
+ 'userId' => $userId,
+ 'fileName' => 'cat.jpg',
]);
$persistedAttachment = LocalAttachment::fromParams([
- 'id' => 123,
- 'userId' => $userId,
- 'fileName' => 'cat.jpg',
+ 'id' => 123,
+ 'userId' => $userId,
+ 'fileName' => 'cat.jpg',
]);
$this->mapper->expects($this->once())
->method('insert')
@@ -106,5 +106,4 @@ class AttachmentServiceTest extends TestCase {
$this->service->addFile($userId, $uploadedFile);
}
-
}
diff --git a/tests/Unit/Service/Attachment/AttachmentStorageTest.php b/tests/Unit/Service/Attachment/AttachmentStorageTest.php
index 95089590b..fde5e3298 100644
--- a/tests/Unit/Service/Attachment/AttachmentStorageTest.php
+++ b/tests/Unit/Service/Attachment/AttachmentStorageTest.php
@@ -33,7 +33,6 @@ use OCP\Files\SimpleFS\ISimpleFolder;
use PHPUnit_Framework_MockObject_MockObject;
class AttachmentStorageTest extends TestCase {
-
private $tmpFilePath = '/tmp/nc_mail_attachment_test';
/** @var IAppData|PHPUnit_Framework_MockObject_MockObject */
@@ -168,5 +167,4 @@ class AttachmentStorageTest extends TestCase {
$this->storage->save('fritz', 123, $uploadedFile);
}
-
}
diff --git a/tests/Unit/Service/Attachment/UploadedFileTest.php b/tests/Unit/Service/Attachment/UploadedFileTest.php
index b4b3e51da..ab36ae6cb 100644
--- a/tests/Unit/Service/Attachment/UploadedFileTest.php
+++ b/tests/Unit/Service/Attachment/UploadedFileTest.php
@@ -25,7 +25,6 @@ use ChristophWurst\Nextcloud\Testing\TestCase;
use OCA\Mail\Service\Attachment\UploadedFile;
class UploadedFileTest extends TestCase {
-
public function testGetFileNameNotExisting() {
$file = new UploadedFile([]);
@@ -53,5 +52,4 @@ class UploadedFileTest extends TestCase {
$this->assertEquals('/tmp/path', $file->getTempPath());
}
-
}
diff --git a/tests/Unit/Service/Autocompletion/AddressCollectorTest.php b/tests/Unit/Service/Autocompletion/AddressCollectorTest.php
index 0b387896b..23e6424b0 100644
--- a/tests/Unit/Service/Autocompletion/AddressCollectorTest.php
+++ b/tests/Unit/Service/Autocompletion/AddressCollectorTest.php
@@ -28,7 +28,6 @@ use OCA\Mail\Service\AutoCompletion\AddressCollector;
use OCP\ILogger;
class AddressCollectorTest extends TestCase {
-
private $mapper;
private $userId = 'testuser';
private $logger;
@@ -109,5 +108,4 @@ class AddressCollectorTest extends TestCase {
$this->assertequals($mapperResult, $result);
}
-
}
diff --git a/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php b/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php
index 9bd24bec7..dd431a295 100644
--- a/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php
+++ b/tests/Unit/Service/Autocompletion/AutoCompleteServiceTest.php
@@ -30,7 +30,6 @@ use OCA\Mail\Service\ContactsIntegration;
use OCA\Mail\Service\GroupsIntegration;
class AutoCompleteServiceTest extends TestCase {
-
private $contactsIntegration;
private $groupsIntegration;
private $addressCollector;
@@ -91,5 +90,4 @@ class AutoCompleteServiceTest extends TestCase {
];
$this->assertEquals($expected, $response);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/AutoConfigTest.php b/tests/Unit/Service/Autoconfig/AutoConfigTest.php
index fe58d7013..23d087592 100644
--- a/tests/Unit/Service/Autoconfig/AutoConfigTest.php
+++ b/tests/Unit/Service/Autoconfig/AutoConfigTest.php
@@ -95,5 +95,4 @@ class AutoConfigTest extends TestCase {
$this->assertSame($account, $result);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php b/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php
index dcc92a433..423461cbd 100644
--- a/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php
+++ b/tests/Unit/Service/Autoconfig/ConfigurationDetectorTest.php
@@ -78,5 +78,4 @@ class ConfigurationDetectorTest extends TestCase {
$this->assertNotNull($result);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php b/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php
index d7f636fc6..99c6a19f4 100644
--- a/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php
+++ b/tests/Unit/Service/Autoconfig/ConnectivityTesterTest.php
@@ -65,5 +65,4 @@ class ConnectivityTesterTest extends TestCase {
$this->assertFalse($canConnect);
$this->assertLessThan(15, $after - $before);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php b/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php
index 6b1350513..9ef26961a 100644
--- a/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php
+++ b/tests/Unit/Service/Autoconfig/ImapConnectivityTesterTest.php
@@ -71,5 +71,4 @@ class ImapConnectivityTesterTest extends TestCase {
$this->assertNull($result);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/ImapConnectorTest.php b/tests/Unit/Service/Autoconfig/ImapConnectorTest.php
index 889917126..514fc3263 100644
--- a/tests/Unit/Service/Autoconfig/ImapConnectorTest.php
+++ b/tests/Unit/Service/Autoconfig/ImapConnectorTest.php
@@ -91,5 +91,4 @@ class ImapConnectorTest extends TestCase {
$this->fail('should not have been reached');
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php b/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php
index 28d98b483..364812228 100644
--- a/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php
+++ b/tests/Unit/Service/Autoconfig/ImapServerDetectorTest.php
@@ -103,5 +103,4 @@ class ImapServerDetectorTest extends TestCase {
$this->assertNull($account);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/IspDbTest.php b/tests/Unit/Service/Autoconfig/IspDbTest.php
index 9e765948c..2d3abc495 100644
--- a/tests/Unit/Service/Autoconfig/IspDbTest.php
+++ b/tests/Unit/Service/Autoconfig/IspDbTest.php
@@ -27,7 +27,6 @@ use OCA\Mail\Service\AutoConfig\IspDb;
use OCP\ILogger;
class IspDbtest extends TestCase {
-
private $logger;
protected function setUp(): void {
@@ -104,5 +103,4 @@ class IspDbtest extends TestCase {
$this->assertArrayHasKey('smtp', $data);
$this->assertTrue(count($data['smtp']) >= 1, 'no isp smtp data returned');
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/MxRecordTest.php b/tests/Unit/Service/Autoconfig/MxRecordTest.php
index 560ffdb73..c6c449843 100644
--- a/tests/Unit/Service/Autoconfig/MxRecordTest.php
+++ b/tests/Unit/Service/Autoconfig/MxRecordTest.php
@@ -49,5 +49,4 @@ class MxRecordTest extends TestCase {
$this->assertFalse($records);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php b/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php
index d82b99a55..311c96b32 100644
--- a/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php
+++ b/tests/Unit/Service/Autoconfig/SmtpConnectivityTesterTest.php
@@ -79,5 +79,4 @@ class SmtpConnectivityTesterTest extends TestCase {
$this->assertFalse($result);
}
-
}
diff --git a/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php b/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php
index 3179c6e14..fee8949d1 100644
--- a/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php
+++ b/tests/Unit/Service/Autoconfig/SmtpServerDetectorTest.php
@@ -101,5 +101,4 @@ class SmtpServerDetectorTest extends TestCase {
$this->assertFalse($result);
}
-
}
diff --git a/tests/Unit/Service/Avatar/AddressbookSourceTest.php b/tests/Unit/Service/Avatar/AddressbookSourceTest.php
index c20958afb..1bee35d37 100644
--- a/tests/Unit/Service/Avatar/AddressbookSourceTest.php
+++ b/tests/Unit/Service/Avatar/AddressbookSourceTest.php
@@ -75,5 +75,4 @@ class AddressbookSourceTest extends TestCase {
$this->assertNull($avatar);
}
-
}
diff --git a/tests/Unit/Service/Avatar/CacheTest.php b/tests/Unit/Service/Avatar/CacheTest.php
index 36b76c121..f43c6e374 100644
--- a/tests/Unit/Service/Avatar/CacheTest.php
+++ b/tests/Unit/Service/Avatar/CacheTest.php
@@ -33,8 +33,7 @@ use OCP\ICacheFactory;
use PHPUnit_Framework_MockObject_MockObject;
class CacheTest extends TestCase {
-
- const BLACK_DOT_BASE64 = 'R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';
+ public const BLACK_DOT_BASE64 = 'R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';
/** @var ICacheFactory|PHPUnit_Framework_MockObject_MockObject */
private $cacheFactory;
@@ -135,5 +134,4 @@ class CacheTest extends TestCase {
$this->cache->addImage('https://doe.com/favicon.ico', $uid, self::BLACK_DOT_BASE64);
}
-
}
diff --git a/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php b/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php
index c4573537a..ba78c099b 100644
--- a/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php
+++ b/tests/Unit/Service/Avatar/CompositeAvatarSourceTest.php
@@ -134,5 +134,4 @@ class CompositeAvatarSourceTest extends TestCase {
$this->assertEquals($avatar, $actualAvatar);
}
-
}
diff --git a/tests/Unit/Service/Avatar/DownloaderTest.php b/tests/Unit/Service/Avatar/DownloaderTest.php
index be669eedd..40fa2a9c3 100644
--- a/tests/Unit/Service/Avatar/DownloaderTest.php
+++ b/tests/Unit/Service/Avatar/DownloaderTest.php
@@ -81,5 +81,4 @@ class DownloaderTest extends TestCase {
$this->assertNull($data);
}
-
}
diff --git a/tests/Unit/Service/Avatar/FaviconSourceTest.php b/tests/Unit/Service/Avatar/FaviconSourceTest.php
index 7bc21c971..e73ec3736 100644
--- a/tests/Unit/Service/Avatar/FaviconSourceTest.php
+++ b/tests/Unit/Service/Avatar/FaviconSourceTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -132,5 +134,4 @@ class FaviconSourceTest extends TestCase {
$this->assertNull($avatar);
}
-
}
diff --git a/tests/Unit/Service/Avatar/GravatarSouceTest.php b/tests/Unit/Service/Avatar/GravatarSouceTest.php
index ced023b4d..fc43f4ec3 100644
--- a/tests/Unit/Service/Avatar/GravatarSouceTest.php
+++ b/tests/Unit/Service/Avatar/GravatarSouceTest.php
@@ -92,5 +92,4 @@ class GravatarSourceTest extends TestCase {
$this->assertNull($actualAvatar);
}
-
}
diff --git a/tests/Unit/Service/AvatarServiceTest.php b/tests/Unit/Service/AvatarServiceTest.php
index 83144dd0e..f7be67dba 100644
--- a/tests/Unit/Service/AvatarServiceTest.php
+++ b/tests/Unit/Service/AvatarServiceTest.php
@@ -37,8 +37,7 @@ use OCP\IURLGenerator;
use PHPUnit_Framework_MockObject_MockObject;
class AvatarServiceTest extends TestCase {
-
- const BLACK_DOT_BASE64 = 'R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';
+ public const BLACK_DOT_BASE64 = 'R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';
/** @var IAvatarSource|PHPUnit_Framework_MockObject_MockObject */
private $source;
@@ -262,5 +261,4 @@ class AvatarServiceTest extends TestCase {
$this->assertNull($image);
}
-
}
diff --git a/tests/Unit/Service/ContactsIntegrationTest.php b/tests/Unit/Service/ContactsIntegrationTest.php
index 1041d8c21..f60036d83 100644
--- a/tests/Unit/Service/ContactsIntegrationTest.php
+++ b/tests/Unit/Service/ContactsIntegrationTest.php
@@ -213,5 +213,4 @@ class ContactsIntegrationTest extends TestCase {
$this->assertEquals($actual, $actual);
}
-
}
diff --git a/tests/Unit/Service/Group/ContactsGroupServiceTest.php b/tests/Unit/Service/Group/ContactsGroupServiceTest.php
index 7d5894d23..38097646f 100644
--- a/tests/Unit/Service/Group/ContactsGroupServiceTest.php
+++ b/tests/Unit/Service/Group/ContactsGroupServiceTest.php
@@ -1,7 +1,7 @@
<?php
/**
-* @author Boris Fritscher <boris.fritscher@gmail.com>
+ * @author Boris Fritscher <boris.fritscher@gmail.com>
*
* Mail
*
@@ -175,7 +175,4 @@ class ContactsGroupServiceTest extends TestCase {
$this->assertEquals($expected, $actual);
}
-
-
}
-
diff --git a/tests/Unit/Service/Group/NextcloudGroupServiceTest.php b/tests/Unit/Service/Group/NextcloudGroupServiceTest.php
index 43df1f067..dac3fdb7d 100644
--- a/tests/Unit/Service/Group/NextcloudGroupServiceTest.php
+++ b/tests/Unit/Service/Group/NextcloudGroupServiceTest.php
@@ -29,7 +29,6 @@ use OCP\IGroup;
use OCP\IUser;
class NextcloudGroupServiceTest extends TestCase {
-
private $groupsManager;
private $groupService;
@@ -129,7 +128,6 @@ class NextcloudGroupServiceTest extends TestCase {
];
$this->assertEquals($expected, $actual);
-
}
public function testGetUsersWrong() {
@@ -141,6 +139,4 @@ class NextcloudGroupServiceTest extends TestCase {
$this->groupService->getUsers('nogroup');
}
-
}
-
diff --git a/tests/Unit/Service/GroupsIntegrationTest.php b/tests/Unit/Service/GroupsIntegrationTest.php
index 758c93846..273f17b13 100644
--- a/tests/Unit/Service/GroupsIntegrationTest.php
+++ b/tests/Unit/Service/GroupsIntegrationTest.php
@@ -97,7 +97,6 @@ class GroupsIntegrationTest extends TestCase {
$actual = $this->groupsIntegration->expand($recipients);
$this->assertEquals($expected, $actual);
-
}
public function testExpand() {
@@ -123,7 +122,6 @@ class GroupsIntegrationTest extends TestCase {
$actual = $this->groupsIntegration->expand($recipients);
$this->assertEquals($expected, $actual);
-
}
public function testExpand2() {
@@ -149,7 +147,6 @@ class GroupsIntegrationTest extends TestCase {
$actual = $this->groupsIntegration->expand($recipients);
$this->assertEquals($expected, $actual);
-
}
public function testExpandUmlauts() {
@@ -221,7 +218,6 @@ class GroupsIntegrationTest extends TestCase {
$actual = $this->groupsIntegration->expand($recipients);
$this->assertEquals($expected, $actual);
-
}
public function testExpandWrong2() {
@@ -229,7 +225,5 @@ class GroupsIntegrationTest extends TestCase {
$recipients = "john@doe.com,namespace1:nogroup,alice@smith.net";
$this->groupsIntegration->expand($recipients);
-
}
-
}
diff --git a/tests/Unit/Service/HtmlTest.php b/tests/Unit/Service/HtmlTest.php
index 054811b95..a42ff8ee4 100644
--- a/tests/Unit/Service/HtmlTest.php
+++ b/tests/Unit/Service/HtmlTest.php
@@ -80,10 +80,9 @@ class HtmlTest extends TestCase {
public function parseMailBodyProvider() {
return [
- ['abc', null, 'abc'],
- ['abc', 'def', "abc-- \r\ndef"],
- ["abc-- \r\ndef", 'ghi', "abc-- \r\ndef-- \r\nghi"],
+ ['abc', null, 'abc'],
+ ['abc', 'def', "abc-- \r\ndef"],
+ ["abc-- \r\ndef", 'ghi', "abc-- \r\ndef-- \r\nghi"],
];
}
-
}
diff --git a/tests/Unit/Service/MailManagerTest.php b/tests/Unit/Service/MailManagerTest.php
index 0570a34cf..de2385e16 100644
--- a/tests/Unit/Service/MailManagerTest.php
+++ b/tests/Unit/Service/MailManagerTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -322,5 +324,4 @@ class MailManagerTest extends TestCase {
$this->manager->flagMessage($account, 'INBOX', 123, 'seen', false);
}
-
}
diff --git a/tests/Unit/Service/MailTransmissionTest.php b/tests/Unit/Service/MailTransmissionTest.php
index c7489e9ab..b50f32930 100644
--- a/tests/Unit/Service/MailTransmissionTest.php
+++ b/tests/Unit/Service/MailTransmissionTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -247,5 +249,4 @@ class MailTransmissionTest extends TestCase {
$this->assertEquals(13, $newId);
}
-
}
diff --git a/tests/Unit/Service/Provisioning/ConfigMapperTest.php b/tests/Unit/Service/Provisioning/ConfigMapperTest.php
index 45e9090cd..c311cb810 100644
--- a/tests/Unit/Service/Provisioning/ConfigMapperTest.php
+++ b/tests/Unit/Service/Provisioning/ConfigMapperTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -81,5 +83,4 @@ class ConfigMapperTest extends TestCase {
$this->assertInstanceOf(Config::class, $config);
}
-
}
diff --git a/tests/Unit/Service/Provisioning/ConfigTest.php b/tests/Unit/Service/Provisioning/ConfigTest.php
index 064843780..b5222be64 100644
--- a/tests/Unit/Service/Provisioning/ConfigTest.php
+++ b/tests/Unit/Service/Provisioning/ConfigTest.php
@@ -26,7 +26,6 @@ use OCA\Mail\Service\Provisioning\Config;
use OCP\IUser;
class ConfigTest extends TestCase {
-
public function testBuildEmailWithUserId() {
$user = $this->createMock(IUser::class);
$config = new Config([
@@ -194,5 +193,4 @@ class ConfigTest extends TestCase {
$this->assertEquals('user@domain.se', $config->buildImapUser($user));
}
-
}
diff --git a/tests/Unit/Service/Provisioning/TestConfig.php b/tests/Unit/Service/Provisioning/TestConfig.php
index 66357a724..26cf72bdc 100644
--- a/tests/Unit/Service/Provisioning/TestConfig.php
+++ b/tests/Unit/Service/Provisioning/TestConfig.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -26,7 +28,6 @@ namespace OCA\mail\tests\Unit\Service\Provisioning;
use OCA\Mail\Service\Provisioning\Config;
class TestConfig extends Config {
-
public function __construct() {
parent::__construct([
'email' => '%USERID%@domain.com',
@@ -40,5 +41,4 @@ class TestConfig extends Config {
'smtpSslMode' => 'tls',
]);
}
-
}
diff --git a/tests/Unit/Service/Search/MailSearchTest.php b/tests/Unit/Service/Search/MailSearchTest.php
index 230dad903..3168fe040 100644
--- a/tests/Unit/Service/Search/MailSearchTest.php
+++ b/tests/Unit/Service/Search/MailSearchTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
@@ -222,5 +224,4 @@ class MailSearchTest extends TestCase {
$this->assertCount(2, $messages);
}
-
}
diff --git a/tests/Unit/Service/SetupServiceTest.php b/tests/Unit/Service/SetupServiceTest.php
index dce28ac37..8655d4632 100644
--- a/tests/Unit/Service/SetupServiceTest.php
+++ b/tests/Unit/Service/SetupServiceTest.php
@@ -101,5 +101,4 @@ class SetupServiceTest extends TestCase {
$this->assertEquals($expected, $actual);
}
-
}
diff --git a/tests/Unit/Service/UserPreferenceServiceTest.php b/tests/Unit/Service/UserPreferenceServiceTest.php
index 7c13070b3..1b1d6434b 100644
--- a/tests/Unit/Service/UserPreferenceServiceTest.php
+++ b/tests/Unit/Service/UserPreferenceServiceTest.php
@@ -66,5 +66,4 @@ class UserPreferenceServiceTest extends TestCase {
$this->service->setPreference('test', '123');
}
-
}
diff --git a/tests/Unit/Settings/AdminSettingsTest.php b/tests/Unit/Settings/AdminSettingsTest.php
index c2e038e6c..7cdfca83a 100644
--- a/tests/Unit/Settings/AdminSettingsTest.php
+++ b/tests/Unit/Settings/AdminSettingsTest.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>