Make all constructor signatures multiline

[MAILPOET-3732]
This commit is contained in:
Pavel Dohnal
2021-09-16 13:15:19 +02:00
committed by Jan Lysý
parent 150862d986
commit cdda3480ca
200 changed files with 751 additions and 200 deletions

View File

@@ -37,7 +37,10 @@ class Mailer {
const METHOD_PHPMAIL = 'PHPMail';
const METHOD_SMTP = 'SMTP';
public function __construct(SettingsController $settings = null, WPFunctions $wp = null) {
public function __construct(
SettingsController $settings = null,
WPFunctions $wp = null
) {
if (!$settings) {
$settings = SettingsController::getInstance();
}

View File

@@ -39,7 +39,13 @@ class MailerError {
* @param int|null $retryInterval
* @param array $subscribersErrors
*/
public function __construct($operation, $level, $message = null, $retryInterval = null, array $subscribersErrors = []) {
public function __construct(
$operation,
$level,
$message = null,
$retryInterval = null,
array $subscribersErrors = []
) {
$this->operation = $operation;
$this->level = $level;
$this->message = $message;

View File

@@ -8,7 +8,9 @@ class BlacklistCheck {
/** @var Blacklist */
private $blacklist;
public function __construct(Blacklist $blacklist = null) {
public function __construct(
Blacklist $blacklist = null
) {
if (is_null($blacklist)) {
$blacklist = new Blacklist();
}

View File

@@ -26,7 +26,13 @@ class MailPoet {
/** @var BlacklistCheck */
private $blacklist;
public function __construct($apiKey, $sender, $replyTo, MailPoetMapper $errorMapper, AuthorizedEmailsController $authorizedEmailsController) {
public function __construct(
$apiKey,
$sender,
$replyTo,
MailPoetMapper $errorMapper,
AuthorizedEmailsController $authorizedEmailsController
) {
$this->api = new API($apiKey);
$this->sender = $sender;
$this->replyTo = $replyTo;

View File

@@ -21,7 +21,12 @@ class PHPMail {
/** @var BlacklistCheck */
private $blacklist;
public function __construct($sender, $replyTo, $returnPath, PHPMailMapper $errorMapper) {
public function __construct(
$sender,
$replyTo,
$returnPath,
PHPMailMapper $errorMapper
) {
$this->sender = $sender;
$this->replyTo = $replyTo;
$this->returnPath = ($returnPath) ?

View File

@@ -21,7 +21,12 @@ class SendGrid {
private $wp;
public function __construct($apiKey, $sender, $replyTo, SendGridMapper $errorMapper) {
public function __construct(
$apiKey,
$sender,
$replyTo,
SendGridMapper $errorMapper
) {
$this->apiKey = $apiKey;
$this->sender = $sender;
$this->replyTo = $replyTo;

View File

@@ -14,7 +14,10 @@ class SubscriberError {
* @param string $email
* @param string $message|null
*/
public function __construct($email, $message = null) {
public function __construct(
$email,
$message = null
) {
$this->email = $email;
$this->message = $message;
}