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

@@ -24,7 +24,10 @@ class CronHelper {
/** @var WPFunctions */
private $wp;
public function __construct(SettingsController $settings, WPFunctions $wp) {
public function __construct(
SettingsController $settings,
WPFunctions $wp
) {
$this->settings = $settings;
$this->wp = $wp;
}

View File

@@ -23,7 +23,11 @@ class CronWorkerRunner {
/** @var WPFunctions */
private $wp;
public function __construct(CronHelper $cronHelper, CronWorkerScheduler $cronWorkerScheduler, WPFunctions $wp) {
public function __construct(
CronHelper $cronHelper,
CronWorkerScheduler $cronWorkerScheduler,
WPFunctions $wp
) {
$this->timer = microtime(true);
$this->cronHelper = $cronHelper;
$this->cronWorkerScheduler = $cronWorkerScheduler;

View File

@@ -26,7 +26,12 @@ class DaemonHttpRunner {
/** @var WordPress */
private $wordpressTrigger;
public function __construct(Daemon $daemon = null, CronHelper $cronHelper, SettingsController $settings, WordPress $wordpressTrigger) {
public function __construct(
Daemon $daemon = null,
CronHelper $cronHelper,
SettingsController $settings,
WordPress $wordpressTrigger
) {
$this->cronHelper = $cronHelper;
$this->settingsDaemonData = $this->cronHelper->getDaemon();
$this->token = $this->cronHelper->createToken();

View File

@@ -9,7 +9,9 @@ class Supervisor {
/** @var CronHelper */
private $cronHelper;
public function __construct(CronHelper $cronHelper) {
public function __construct(
CronHelper $cronHelper
) {
$this->cronHelper = $cronHelper;
}

View File

@@ -8,7 +8,9 @@ class MailPoet {
/** @var Supervisor */
private $supervisor;
public function __construct(Supervisor $supervisor) {
public function __construct(
Supervisor $supervisor
) {
$this->supervisor = $supervisor;
}

View File

@@ -13,7 +13,9 @@ class AuthorizedSendingEmailsCheck extends SimpleWorker {
/** @var AuthorizedEmailsController */
private $authorizedEmailsController;
public function __construct(AuthorizedEmailsController $authorizedEmailsController) {
public function __construct(
AuthorizedEmailsController $authorizedEmailsController
) {
$this->authorizedEmailsController = $authorizedEmailsController;
parent::__construct();
}

View File

@@ -15,7 +15,10 @@ class Beamer extends SimpleWorker {
/** @var SettingsController */
private $settings;
public function __construct(SettingsController $settings, WPFunctions $wp) {
public function __construct(
SettingsController $settings,
WPFunctions $wp
) {
parent::__construct($wp);
$this->settings = $settings;
}

View File

@@ -11,7 +11,9 @@ class PremiumKeyCheck extends KeyCheckWorker {
/** @var SettingsController */
private $settings;
public function __construct(SettingsController $settings) {
public function __construct(
SettingsController $settings
) {
$this->settings = $settings;
parent::__construct();
}

View File

@@ -18,7 +18,10 @@ class SendingServiceKeyCheck extends KeyCheckWorker {
/** @var ServicesChecker */
private $servicesChecker;
public function __construct(SettingsController $settings, ServicesChecker $servicesChecker) {
public function __construct(
SettingsController $settings,
ServicesChecker $servicesChecker
) {
$this->settings = $settings;
$this->servicesChecker = $servicesChecker;
parent::__construct();

View File

@@ -10,7 +10,9 @@ class SendingErrorHandler {
/** @var SendingThrottlingHandler */
private $throttlingHandler;
public function __construct(SendingThrottlingHandler $throttlingHandler) {
public function __construct(
SendingThrottlingHandler $throttlingHandler
) {
$this->throttlingHandler = $throttlingHandler;
}

View File

@@ -8,7 +8,9 @@ use MailPoet\Mailer\MailerLog;
class Mailer {
public $mailer;
public function __construct($mailer = false) {
public function __construct(
$mailer = false
) {
$this->mailer = ($mailer) ? $mailer : $this->configureMailer();
}

View File

@@ -27,7 +27,9 @@ abstract class SimpleWorker implements CronWorkerInterface {
/** @var WPFunctions */
protected $wp;
public function __construct(WPFunctions $wp = null) {
public function __construct(
WPFunctions $wp = null
) {
if (static::TASK_TYPE === null) {
throw new \Exception('Constant TASK_TYPE is not defined on subclass ' . get_class($this));
}

View File

@@ -17,7 +17,10 @@ class WooCommerceSync extends SimpleWorker {
/** @var WooCommerceHelper */
private $woocommerceHelper;
public function __construct(WooCommerceSegment $woocommerceSegment, WooCommerceHelper $woocommerceHelper) {
public function __construct(
WooCommerceSegment $woocommerceSegment,
WooCommerceHelper $woocommerceHelper
) {
$this->woocommerceSegment = $woocommerceSegment;
$this->woocommerceHelper = $woocommerceHelper;
parent::__construct();

View File

@@ -17,7 +17,9 @@ class WorkersFactory {
/** @var ContainerWrapper */
private $container;
public function __construct(ContainerWrapper $container) {
public function __construct(
ContainerWrapper $container
) {
$this->container = $container;
}