Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ coverage/
tests/.phpunit.result.cache

/.php_cs.cache
/.php-cs-fixer.cache

# VSCode / VSCodium
.vscode/
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/BackgroundJob/SyncJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected function run($argument) {
}

try {
$this->mailboxSync->sync($account, $this->logger,true);
$this->mailboxSync->sync($account, $this->logger, true);
$this->syncService->syncAccount($account, $this->logger);
} catch (IncompleteSyncException $e) {
$this->logger->warning($e->getMessage(), [
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/TagMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function deleteDuplicates(): void {
$qb = $this->db->getQueryBuilder();
$qb->select('mt2.id')
->from('mail_message_tags', 'mt2')
->join('mt2','mail_message_tags', 'mt1', $qb->expr()->andX(
->join('mt2', 'mail_message_tags', 'mt1', $qb->expr()->andX(
$qb->expr()->gt('mt1.id', 'mt2.id'),
$qb->expr()->eq('mt1.imap_message_id', 'mt2.imap_message_id'),
$qb->expr()->eq('mt1.tag_id', 'mt2.tag_id')
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version1100Date20210419080523.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
$insertQb->setValue('smtp_host', $insertQb->createNamedParameter($conf['smtpHost'] ?? 'smtp.domain.com'));
$insertQb->setValue('smtp_port', $insertQb->createNamedParameter($conf['smtpPort'] ?? 587, IQueryBuilder::PARAM_INT));
$insertQb->setValue('smtp_ssl_mode', $insertQb->createNamedParameter($conf['smtpSslMode'] ?? 'tls'));
$insertQb->setValue('sieve_enabled', $insertQb->createNamedParameter((bool)($conf['sieveEnabled'] ?? false),IQueryBuilder::PARAM_BOOL));
$insertQb->setValue('sieve_enabled', $insertQb->createNamedParameter((bool)($conf['sieveEnabled'] ?? false), IQueryBuilder::PARAM_BOOL));
$insertQb->setValue('sieve_user', $insertQb->createNamedParameter($conf['sieveUser'] ?? ''));
$insertQb->setValue('sieve_host', $insertQb->createNamedParameter($conf['sieveHost'] ?? ''));
$insertQb->setValue('sieve_port', $insertQb->createNamedParameter($conf['sievePort'] ?? 4190, IQueryBuilder::PARAM_INT));
Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/Controller/MessagesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ public function testSetTagNotFound() {
->will($this->returnValue($this->account));
$this->mailManager->expects($this->once())
->method('getTagByImapLabel')
->with($imapLabel,$this->userId)
->with($imapLabel, $this->userId)
->willThrowException(new ClientException('Computer says no'));
$this->mailManager->expects($this->never())
->method('tagMessage');
Expand Down Expand Up @@ -740,7 +740,7 @@ public function testSetTag() {
->will($this->returnValue($this->account));
$this->mailManager->expects($this->once())
->method('getTagByImapLabel')
->with($tag->getImapLabel(),$this->userId)
->with($tag->getImapLabel(), $this->userId)
->willReturn($tag);
$this->mailManager->expects($this->once())
->method('tagMessage')
Expand Down Expand Up @@ -806,7 +806,7 @@ public function testRemoveTagNotFound() {
->will($this->returnValue($this->account));
$this->mailManager->expects($this->once())
->method('getTagByImapLabel')
->with($imapLabel,$this->userId)
->with($imapLabel, $this->userId)
->willThrowException(new ClientException('Computer says no'));
$this->mailManager->expects($this->never())
->method('tagMessage');
Expand Down Expand Up @@ -841,7 +841,7 @@ public function testRemoveTag() {
->will($this->returnValue($this->account));
$this->mailManager->expects($this->once())
->method('getTagByImapLabel')
->with($tag->getImapLabel(),$this->userId)
->with($tag->getImapLabel(), $this->userId)
->willReturn($tag);
$this->mailManager->expects($this->once())
->method('tagMessage')
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Listener/AddressCollectionListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function testHandle() {
$message = $this->createMock(IMessage::class);
$this->preferences->expects($this->once())
->method('getPreference')
->with('test','collect-data', 'true')
->with('test', 'collect-data', 'true')
->willReturn('true');
/** @var Horde_Mime_Mail|MockObject $mail */
$mail = $this->createMock(Horde_Mime_Mail::class);
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Service/MailManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public function testFilterFlagStandard(): void {

//standard flags
foreach ($flags as $k => $flag) {
$this->assertEquals($this->manager->filterFlags($account, $k , 'INBOX'), $flags[$k]);
$this->assertEquals($this->manager->filterFlags($account, $k, 'INBOX'), $flags[$k]);
}
}

Expand All @@ -369,7 +369,7 @@ public function testSetFilterFlagsNoCapabilities() {
->method('getClient')
->willReturn($client);

$this->assertEquals([], $this->manager->filterFlags($account, Tag::LABEL_IMPORTANT , 'INBOX'));
$this->assertEquals([], $this->manager->filterFlags($account, Tag::LABEL_IMPORTANT, 'INBOX'));
}

public function testSetFilterFlagsImportant() {
Expand All @@ -383,7 +383,7 @@ public function testSetFilterFlagsImportant() {
->method('status')
->willReturn(['permflags' => [ "11" => "\*" ]]);

$this->assertEquals([Tag::LABEL_IMPORTANT], $this->manager->filterFlags($account, Tag::LABEL_IMPORTANT , 'INBOX'));
$this->assertEquals([Tag::LABEL_IMPORTANT], $this->manager->filterFlags($account, Tag::LABEL_IMPORTANT, 'INBOX'));
}

public function testIsPermflagsEnabledTrue(): void {
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Service/MailTransmissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public function testSendNewMessageWithAttachmentsFromEmail() {
$content = ['blablabla'];
$this->messageMapper->expects($this->once())
->method('getRawAttachments')
->with($this->imapClientFactory->getClient($account), $mailbox->getName(), $attachmentMessage->getUid(),[$originalAttachment[0]['id']])
->with($this->imapClientFactory->getClient($account), $mailbox->getName(), $attachmentMessage->getUid(), [$originalAttachment[0]['id']])
->willReturn($content);

$this->transmission->sendMessage($messageData, null);
Expand Down
10 changes: 8 additions & 2 deletions vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"config": {
"platform": {
"php": "7.3"
},
"sort-packages": true
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.19.2",
"nextcloud/coding-standard": "^0.5.0"
"friendsofphp/php-cs-fixer": "^3.2",
"nextcloud/coding-standard": "^1.0"
}
}
Loading