summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBranko Kokanovic <branko@kokanovic.org>2018-12-17 23:34:48 +0100
committerBranko Kokanovic <branko@kokanovic.org>2018-12-17 23:34:55 +0100
commit7cef9b0248d5d2e026f4d74668e36c3642796e8e (patch)
tree6305708feb2f4170aab51ac16ca58e7229f59a94
parent8101059062a94365d3b86eb6663376188dda5512 (diff)
downloadnextcloud-server-7cef9b0248d5d2e026f4d74668e36c3642796e8e.tar.gz
nextcloud-server-7cef9b0248d5d2e026f4d74668e36c3642796e8e.zip
Addressing comments, array() to []
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
-rw-r--r--lib/private/Mail/Mailer.php2
-rw-r--r--tests/lib/Mail/MailerTest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 03ffcd9d603..d103e1380c5 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -259,7 +259,7 @@ class Mailer implements IMailer {
if (!empty($smtpSecurity)) {
$transport->setEncryption($smtpSecurity);
}
- $streamingOptions = $this->config->getSystemValue('mail_smtpstreamoptions', array());
+ $streamingOptions = $this->config->getSystemValue('mail_smtpstreamoptions', []);
if (is_array($streamingOptions) && !empty($streamingOptions)) {
$transport->setStreamOptions($streamingOptions);
}
diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php
index 8c309335ab8..1913cc1176c 100644
--- a/tests/lib/Mail/MailerTest.php
+++ b/tests/lib/Mail/MailerTest.php
@@ -172,7 +172,7 @@ class MailerTest extends TestCase {
$this->config->method('getSystemValue')
->will($this->returnValueMap([
['mail_smtpmode', 'smtp', 'smtp'],
- ['mail_smtpstreamoptions', array(), array('foo' => 1)]
+ ['mail_smtpstreamoptions', [], ['foo' => 1]]
]));
$mailer = self::invokePrivate($this->mailer, 'getInstance');
$this->assertEquals(1, count($mailer->getTransport()->getStreamOptions()));
@@ -184,7 +184,7 @@ class MailerTest extends TestCase {
$this->config->method('getSystemValue')
->will($this->returnValueMap([
['mail_smtpmode', 'smtp', 'smtp'],
- ['mail_smtpstreamoptions', array(), 'bar']
+ ['mail_smtpstreamoptions', [], 'bar']
]));
$mailer = self::invokePrivate($this->mailer, 'getInstance');
$this->assertEquals(0, count($mailer->getTransport()->getStreamOptions()));