Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
escopecz committed Jan 29, 2024
1 parent 2b0c56f commit 829c975
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 30 deletions.
2 changes: 1 addition & 1 deletion app/bundles/EmailBundle/Config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'MonitoredEmail/Organizer',
'MonitoredEmail/Processor',
'Stat/Reference.php',
'Helper/DTO'
'Helper/DTO',
];

$services->load('Mautic\\EmailBundle\\', '../')
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/EmailBundle/Entity/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ private static function getTokenOrEmailConstraint($field)
return;
}

$validator = $context->getValidator();
$validator = $context->getValidator();
$violations = $validator->validate(
$value,
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

/*
* @copyright 2019 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace Mautic\EmailBundle\Helper\Exception;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

/*
* @copyright 2019 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
declare(strict_types=1);

namespace Mautic\EmailBundle\Helper\Exception;

Expand Down
4 changes: 2 additions & 2 deletions app/bundles/EmailBundle/Helper/FromEmailHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function setDefaultFromArray(array $from): void

/**
* @param array<string,?string> $from
* @param mixed[] $contact
* @param mixed[] $contact
*
* @return array<string,?string>
*/
Expand Down Expand Up @@ -69,7 +69,7 @@ public function getFromAddressArrayConsideringOwner(array $from, array $contact

/**
* @param array<string,?string> $from
* @param mixed[] $contact
* @param mixed[] $contact
*
* @return array<string,?string>
*/
Expand Down
12 changes: 5 additions & 7 deletions app/bundles/EmailBundle/Helper/MailHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Mautic\EmailBundle\Exception\InvalidEmailException;
use Mautic\EmailBundle\Form\Type\ConfigType;
use Mautic\EmailBundle\Helper\Exception\OwnerNotFoundException;
use Mautic\EmailBundle\Swiftmailer\Exception\BatchQueueMaxException;
use Mautic\EmailBundle\Swiftmailer\Message\MauticMessage;
use Mautic\EmailBundle\Swiftmailer\Transport\TokenTransportInterface;
use Mautic\EmailBundle\Mailer\Exception\BatchQueueMaxException;
use Mautic\EmailBundle\Mailer\Message\MauticMessage;
use Mautic\EmailBundle\Mailer\Transport\TokenTransportInterface;
use Mautic\LeadBundle\Entity\Lead;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
Expand Down Expand Up @@ -235,6 +235,8 @@ public function __construct(
) {
$this->transport = $this->getTransport();
$this->fromEmailHelper = $factory->get('mautic.helper.from_email_helper');
$this->mailer = $mailer;
$this->transport = $this->getTransport();

$systemFromEmail = $factory->getParameter('mailer_from_email');
$systemReplyToEmail = $factory->getParameter('mailer_reply_to_email');
Expand Down Expand Up @@ -1995,8 +1997,6 @@ private function setReplyToForSingleMessage(Email $emailToSend): void
}

/**
* @param $contact
*
* @return bool|array
*
* @deprecated
Expand Down Expand Up @@ -2025,8 +2025,6 @@ protected function getContactOwner(&$contact)
}

/**
* @param $owner
*
* @return mixed
*
* @deprecated; use FromEmailHelper::getUserSignature
Expand Down
4 changes: 2 additions & 2 deletions app/bundles/EmailBundle/Tests/Helper/DTO/AddressDTOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AddressDTOTest extends TestCase
{
public function testNameTokenReturnsTrue(): void
{
$this->assertTrue((AddressDTO::fromAddressArray(['[email protected]' => '{contactfield=other_name}']))->isNameTokenized());
$this->assertTrue(AddressDTO::fromAddressArray(['[email protected]' => '{contactfield=other_name}'])->isNameTokenized());
}

public function testNameTokenReturnsFalse(): void
Expand All @@ -24,7 +24,7 @@ public function testNameTokenEmptyThrowsException(): void
{
$this->expectException(TokenNotFoundOrEmptyException::class);

(AddressDTO::fromAddressArray(['[email protected]' => '{contactfield=other_name}']))->getNameTokenValue([]);
AddressDTO::fromAddressArray(['[email protected]' => '{contactfield=other_name}'])->getNameTokenValue([]);
}

public function testNameTokenIsReturned(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function send(RawMessage $message, Envelope $envelope = null): ?SentMessa
{
if ($message instanceof Email) {
$this->fromAddresses[] = !empty($message->getFrom()) ? $message->getFrom()[0]->getAddress() : null;
$this->fromNames[] = !empty($message->getFrom()) ? $message->getFrom()[0]->getName() : null;
$this->fromNames[] = !empty($message->getFrom()) ? $message->getFrom()[0]->getName() : null;
}

$this->message = $message;
Expand Down

0 comments on commit 829c975

Please sign in to comment.