Make all constructor signatures multiline
[MAILPOET-3732]
This commit is contained in:
@ -10,7 +10,9 @@ class ErrorHandler {
|
||||
/** @var string[] */
|
||||
private $defaultErrors;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->defaultErrors = [
|
||||
Error::UNKNOWN => $wp->__('An unknown error occurred.', 'mailpoet'),
|
||||
];
|
||||
|
@ -7,7 +7,11 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
class ErrorResponse extends Response {
|
||||
public $errors;
|
||||
|
||||
public function __construct($errors = [], $meta = [], $status = self::STATUS_NOT_FOUND) {
|
||||
public function __construct(
|
||||
$errors = [],
|
||||
$meta = [],
|
||||
$status = self::STATUS_NOT_FOUND
|
||||
) {
|
||||
parent::__construct($status, $meta);
|
||||
$this->errors = $this->formatErrors($errors);
|
||||
}
|
||||
|
@ -16,7 +16,10 @@ abstract class Response {
|
||||
public $status;
|
||||
public $meta;
|
||||
|
||||
public function __construct($status, $meta = []) {
|
||||
public function __construct(
|
||||
$status,
|
||||
$meta = []
|
||||
) {
|
||||
$this->status = $status;
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
@ -11,7 +11,9 @@ class FormsResponseBuilder {
|
||||
/** @var StatisticsFormsRepository */
|
||||
private $statisticsFormsRepository;
|
||||
|
||||
public function __construct(StatisticsFormsRepository $statisticsFormsRepository) {
|
||||
public function __construct(
|
||||
StatisticsFormsRepository $statisticsFormsRepository
|
||||
) {
|
||||
$this->statisticsFormsRepository = $statisticsFormsRepository;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,11 @@ namespace MailPoet\API\JSON;
|
||||
class SuccessResponse extends Response {
|
||||
public $data;
|
||||
|
||||
public function __construct($data = [], $meta = [], $status = self::STATUS_OK) {
|
||||
public function __construct(
|
||||
$data = [],
|
||||
$meta = [],
|
||||
$status = self::STATUS_OK
|
||||
) {
|
||||
parent::__construct($status, $meta);
|
||||
$this->data = $data;
|
||||
}
|
||||
|
@ -15,7 +15,9 @@ class Analytics extends APIEndpoint {
|
||||
'global' => AccessControl::NO_ACCESS_RESTRICTION,
|
||||
];
|
||||
|
||||
public function __construct(Reporter $reporter) {
|
||||
public function __construct(
|
||||
Reporter $reporter
|
||||
) {
|
||||
$this->reporter = $reporter;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,10 @@ class AutomatedLatestContent extends APIEndpoint {
|
||||
'global' => AccessControl::PERMISSION_MANAGE_EMAILS,
|
||||
];
|
||||
|
||||
public function __construct(\MailPoet\Newsletter\AutomatedLatestContent $alc, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
\MailPoet\Newsletter\AutomatedLatestContent $alc,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->ALC = $alc;
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
@ -20,7 +20,10 @@ class FeatureFlags extends APIEndpoint {
|
||||
/** @var FeatureFlagsController */
|
||||
private $featureFlagsController;
|
||||
|
||||
public function __construct(FeaturesController $featuresController, FeatureFlagsController $featureFlags) {
|
||||
public function __construct(
|
||||
FeaturesController $featuresController,
|
||||
FeatureFlagsController $featureFlags
|
||||
) {
|
||||
$this->featuresController = $featuresController;
|
||||
$this->featureFlagsController = $featureFlags;
|
||||
}
|
||||
|
@ -13,7 +13,9 @@ class MP2Migrator extends APIEndpoint {
|
||||
/** @var \MailPoet\Config\MP2Migrator */
|
||||
private $MP2Migrator;
|
||||
|
||||
public function __construct(\MailPoet\Config\MP2Migrator $MP2Migrator) {
|
||||
public function __construct(
|
||||
\MailPoet\Config\MP2Migrator $MP2Migrator
|
||||
) {
|
||||
$this->MP2Migrator = $MP2Migrator;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,12 @@ class Mailer extends APIEndpoint {
|
||||
'global' => AccessControl::PERMISSION_MANAGE_EMAILS,
|
||||
];
|
||||
|
||||
public function __construct(AuthorizedEmailsController $authorizedEmailsController, SettingsController $settings, Bridge $bridge, MetaInfo $mailerMetaInfo) {
|
||||
public function __construct(
|
||||
AuthorizedEmailsController $authorizedEmailsController,
|
||||
SettingsController $settings,
|
||||
Bridge $bridge,
|
||||
MetaInfo $mailerMetaInfo
|
||||
) {
|
||||
$this->authorizedEmailsController = $authorizedEmailsController;
|
||||
$this->settings = $settings;
|
||||
$this->bridge = $bridge;
|
||||
|
@ -15,7 +15,9 @@ class NewsletterLinks extends APIEndpoint {
|
||||
/** @var NewsletterLinkRepository */
|
||||
private $newsletterLinkRepository;
|
||||
|
||||
public function __construct(NewsletterLinkRepository $newsletterLinkRepository) {
|
||||
public function __construct(
|
||||
NewsletterLinkRepository $newsletterLinkRepository
|
||||
) {
|
||||
$this->newsletterLinkRepository = $newsletterLinkRepository;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,10 @@ class Setup extends APIEndpoint {
|
||||
/** @var Activator */
|
||||
private $activator;
|
||||
|
||||
public function __construct(WPFunctions $wp, Activator $activator) {
|
||||
public function __construct(
|
||||
WPFunctions $wp,
|
||||
Activator $activator
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
$this->activator = $activator;
|
||||
}
|
||||
|
@ -17,7 +17,9 @@ class UserFlags extends APIEndpoint {
|
||||
'global' => AccessControl::ALL_ROLES_ACCESS,
|
||||
];
|
||||
|
||||
public function __construct(UserFlagsController $userFlags) {
|
||||
public function __construct(
|
||||
UserFlagsController $userFlags
|
||||
) {
|
||||
$this->userFlags = $userFlags;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,9 @@ class WoocommerceSettings extends APIEndpoint {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class ExperimentalFeatures {
|
||||
/** @var PageRenderer */
|
||||
private $pageRenderer;
|
||||
|
||||
public function __construct(PageRenderer $pageRenderer) {
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,12 @@ class Help {
|
||||
/** @var Beacon */
|
||||
private $helpscoutBeacon;
|
||||
|
||||
public function __construct(PageRenderer $pageRenderer, State $tasksState, CronHelper $cronHelper, Beacon $helpscoutBeacon) {
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer,
|
||||
State $tasksState,
|
||||
CronHelper $cronHelper,
|
||||
Beacon $helpscoutBeacon
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
$this->tasksState = $tasksState;
|
||||
$this->cronHelper = $cronHelper;
|
||||
|
@ -12,7 +12,10 @@ class MP2Migration {
|
||||
/** @var MP2Migrator */
|
||||
private $mp2Migrator;
|
||||
|
||||
public function __construct(PageRenderer $pageRenderer, MP2Migrator $mp2Migrator) {
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer,
|
||||
MP2Migrator $mp2Migrator
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
$this->mp2Migrator = $mp2Migrator;
|
||||
}
|
||||
|
@ -16,7 +16,11 @@ class Premium {
|
||||
/** @var SubscribersFeature */
|
||||
private $subscribersFeature;
|
||||
|
||||
public function __construct(PageRenderer $pageRenderer, WPFunctions $wp, SubscribersFeature $subscribersFeature) {
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer,
|
||||
WPFunctions $wp,
|
||||
SubscribersFeature $subscribersFeature
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
$this->wp = $wp;
|
||||
$this->subscribersFeature = $subscribersFeature;
|
||||
|
@ -9,7 +9,9 @@ class SubscribersExport {
|
||||
/** @var PageRenderer */
|
||||
private $pageRenderer;
|
||||
|
||||
public function __construct(PageRenderer $pageRenderer) {
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,11 @@ class SubscribersImport {
|
||||
/** @var Block\Date */
|
||||
private $dateBlock;
|
||||
|
||||
public function __construct(PageRenderer $pageRenderer, Installation $installation, Block\Date $dateBlock) {
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer,
|
||||
Installation $installation,
|
||||
Block\Date $dateBlock
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
$this->installation = $installation;
|
||||
$this->dateBlock = $dateBlock;
|
||||
|
@ -13,7 +13,10 @@ class WooCommerceSetup {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(PageRenderer $pageRenderer, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
@ -21,7 +21,10 @@ class Analytics {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(Reporter $reporter, SettingsController $settingsController) {
|
||||
public function __construct(
|
||||
Reporter $reporter,
|
||||
SettingsController $settingsController
|
||||
) {
|
||||
$this->reporter = $reporter;
|
||||
$this->settings = $settingsController;
|
||||
$this->wp = new WPFunctions;
|
||||
|
@ -20,7 +20,11 @@ class AbandonedCartPageVisitTracker {
|
||||
/** @var Cookies */
|
||||
private $cookies;
|
||||
|
||||
public function __construct(WPFunctions $wp, WooCommerceHelper $wooCommerceHelper, Cookies $cookies) {
|
||||
public function __construct(
|
||||
WPFunctions $wp,
|
||||
WooCommerceHelper $wooCommerceHelper,
|
||||
Cookies $cookies
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
$this->wooCommerceHelper = $wooCommerceHelper;
|
||||
$this->cookies = $cookies;
|
||||
|
@ -31,7 +31,9 @@ class FirstPurchase {
|
||||
/** @var AutomaticEmailsRepository */
|
||||
private $repository;
|
||||
|
||||
public function __construct(WCHelper $helper = null) {
|
||||
public function __construct(
|
||||
WCHelper $helper = null
|
||||
) {
|
||||
if ($helper === null) {
|
||||
$helper = new WCHelper();
|
||||
}
|
||||
|
@ -26,7 +26,9 @@ class PurchasedInCategory {
|
||||
/** @var AutomaticEmailsRepository */
|
||||
private $repository;
|
||||
|
||||
public function __construct(WCHelper $woocommerceHelper = null) {
|
||||
public function __construct(
|
||||
WCHelper $woocommerceHelper = null
|
||||
) {
|
||||
if ($woocommerceHelper === null) {
|
||||
$woocommerceHelper = new WCHelper();
|
||||
}
|
||||
|
@ -28,7 +28,9 @@ class PurchasedProduct {
|
||||
/** @var AutomaticEmailsRepository */
|
||||
private $repository;
|
||||
|
||||
public function __construct(WCHelper $helper = null) {
|
||||
public function __construct(
|
||||
WCHelper $helper = null
|
||||
) {
|
||||
if ($helper === null) {
|
||||
$helper = new WCHelper();
|
||||
}
|
||||
|
@ -12,7 +12,9 @@ class TransientCache {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,11 @@ class Activator {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(SettingsController $settings, Populator $populator, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
SettingsController $settings,
|
||||
Populator $populator,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->settings = $settings;
|
||||
$this->populator = $populator;
|
||||
$this->wp = $wp;
|
||||
|
@ -14,7 +14,10 @@ class Capabilities {
|
||||
/** @var AccessControl */
|
||||
private $accessControl;
|
||||
|
||||
public function __construct($renderer = null, WPFunctions $wp = null) {
|
||||
public function __construct(
|
||||
$renderer = null,
|
||||
WPFunctions $wp = null
|
||||
) {
|
||||
if ($renderer !== null) {
|
||||
$this->renderer = $renderer;
|
||||
}
|
||||
|
@ -8,7 +8,9 @@ use MailPoetVendor\Psr\Container\ContainerInterface;
|
||||
class DatabaseInitializer {
|
||||
private $diContainer;
|
||||
|
||||
public function __construct(ContainerInterface $diContainer) {
|
||||
public function __construct(
|
||||
ContainerInterface $diContainer
|
||||
) {
|
||||
$this->diContainer = $diContainer;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,9 @@ class Installer {
|
||||
/** @var SettingsController */
|
||||
private $settings;
|
||||
|
||||
public function __construct($slug) {
|
||||
public function __construct(
|
||||
$slug
|
||||
) {
|
||||
$this->slug = $slug;
|
||||
$this->settings = SettingsController::getInstance();
|
||||
}
|
||||
|
@ -42,7 +42,10 @@ class MP2Migrator {
|
||||
private $mp2UserTable;
|
||||
private $mp2UserListTable;
|
||||
|
||||
public function __construct(SettingsController $settings, Activator $activator) {
|
||||
public function __construct(
|
||||
SettingsController $settings,
|
||||
Activator $activator
|
||||
) {
|
||||
$this->defineMP2Tables();
|
||||
$logFilename = 'mp2migration.log';
|
||||
$this->logFile = Env::$tempPath . '/' . $logFilename;
|
||||
|
@ -7,7 +7,9 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
class PluginActivatedHook {
|
||||
private $deferredAdminNotices;
|
||||
|
||||
public function __construct(DeferredAdminNotices $deferredAdminNotices) {
|
||||
public function __construct(
|
||||
DeferredAdminNotices $deferredAdminNotices
|
||||
) {
|
||||
$this->deferredAdminNotices = $deferredAdminNotices;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,10 @@ class Renderer {
|
||||
public $assetsManifestJs;
|
||||
public $assetsManifestCss;
|
||||
|
||||
public function __construct($cachingEnabled = false, $debuggingEnabled = false) {
|
||||
public function __construct(
|
||||
$cachingEnabled = false,
|
||||
$debuggingEnabled = false
|
||||
) {
|
||||
$this->cachingEnabled = $cachingEnabled;
|
||||
$this->debuggingEnabled = $debuggingEnabled;
|
||||
$this->cachePath = Env::$cachePath;
|
||||
|
@ -19,7 +19,9 @@ class RequirementsChecker {
|
||||
'\Html2Text\Html2Text',
|
||||
];
|
||||
|
||||
public function __construct($displayErrorNotice = true) {
|
||||
public function __construct(
|
||||
$displayErrorNotice = true
|
||||
) {
|
||||
$this->displayErrorNotice = $displayErrorNotice;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class Router {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,11 @@ class Updater {
|
||||
/** @var SettingsController */
|
||||
private $settings;
|
||||
|
||||
public function __construct($pluginName, $slug, $version) {
|
||||
public function __construct(
|
||||
$pluginName,
|
||||
$slug,
|
||||
$version
|
||||
) {
|
||||
$this->plugin = WPFunctions::get()->pluginBasename($pluginName);
|
||||
$this->slug = $slug;
|
||||
$this->version = $version;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -9,7 +9,9 @@ class Supervisor {
|
||||
/** @var CronHelper */
|
||||
private $cronHelper;
|
||||
|
||||
public function __construct(CronHelper $cronHelper) {
|
||||
public function __construct(
|
||||
CronHelper $cronHelper
|
||||
) {
|
||||
$this->cronHelper = $cronHelper;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class MailPoet {
|
||||
/** @var Supervisor */
|
||||
private $supervisor;
|
||||
|
||||
public function __construct(Supervisor $supervisor) {
|
||||
public function __construct(
|
||||
Supervisor $supervisor
|
||||
) {
|
||||
$this->supervisor = $supervisor;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -10,7 +10,9 @@ class SendingErrorHandler {
|
||||
/** @var SendingThrottlingHandler */
|
||||
private $throttlingHandler;
|
||||
|
||||
public function __construct(SendingThrottlingHandler $throttlingHandler) {
|
||||
public function __construct(
|
||||
SendingThrottlingHandler $throttlingHandler
|
||||
) {
|
||||
$this->throttlingHandler = $throttlingHandler;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -17,7 +17,9 @@ class WorkersFactory {
|
||||
/** @var ContainerWrapper */
|
||||
private $container;
|
||||
|
||||
public function __construct(ContainerWrapper $container) {
|
||||
public function __construct(
|
||||
ContainerWrapper $container
|
||||
) {
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,9 @@ class ContainerFactory {
|
||||
/** @var IContainerConfigurator */
|
||||
private $configurator;
|
||||
|
||||
public function __construct(IContainerConfigurator $configurator) {
|
||||
public function __construct(
|
||||
IContainerConfigurator $configurator
|
||||
) {
|
||||
$this->configurator = $configurator;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,10 @@ class ContainerWrapper implements ContainerInterface {
|
||||
/** @var ContainerWrapper|null */
|
||||
private static $instance;
|
||||
|
||||
public function __construct(Container $freeContainer, Container $premiumContainer = null) {
|
||||
public function __construct(
|
||||
Container $freeContainer,
|
||||
Container $premiumContainer = null
|
||||
) {
|
||||
$this->freeContainer = $freeContainer;
|
||||
$this->premiumContainer = $premiumContainer;
|
||||
}
|
||||
|
@ -23,7 +23,9 @@ class DynamicSegmentFilterData {
|
||||
*/
|
||||
private $filterData;
|
||||
|
||||
public function __construct(array $filterData) {
|
||||
public function __construct(
|
||||
array $filterData
|
||||
) {
|
||||
$this->filterData = $filterData;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,10 @@ class DynamicSegmentFilterEntity {
|
||||
*/
|
||||
private $filterData;
|
||||
|
||||
public function __construct(SegmentEntity $segment, DynamicSegmentFilterData $filterData) {
|
||||
public function __construct(
|
||||
SegmentEntity $segment,
|
||||
DynamicSegmentFilterData $filterData
|
||||
) {
|
||||
$this->segment = $segment;
|
||||
$this->filterData = $filterData;
|
||||
}
|
||||
|
@ -32,7 +32,10 @@ class FeatureFlagEntity {
|
||||
* @param string $name
|
||||
* @param bool|null $value
|
||||
*/
|
||||
public function __construct($name, $value = null) {
|
||||
public function __construct(
|
||||
$name,
|
||||
$value = null
|
||||
) {
|
||||
$this->name = $name;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
@ -83,7 +83,9 @@ class FormEntity {
|
||||
*/
|
||||
private $styles;
|
||||
|
||||
public function __construct($name) {
|
||||
public function __construct(
|
||||
$name
|
||||
) {
|
||||
$this->name = $name;
|
||||
$this->status = self::STATUS_ENABLED;
|
||||
}
|
||||
|
@ -54,7 +54,12 @@ class NewsletterLinkEntity {
|
||||
*/
|
||||
private $clicks;
|
||||
|
||||
public function __construct(NewsletterEntity $newsletter, SendingQueueEntity $queue, string $url, string $hash) {
|
||||
public function __construct(
|
||||
NewsletterEntity $newsletter,
|
||||
SendingQueueEntity $queue,
|
||||
string $url,
|
||||
string $hash
|
||||
) {
|
||||
$this->newsletter = $newsletter;
|
||||
$this->queue = $queue;
|
||||
$this->url = $url;
|
||||
|
@ -37,7 +37,10 @@ class NewsletterOptionEntity {
|
||||
*/
|
||||
private $optionField;
|
||||
|
||||
public function __construct(NewsletterEntity $newsletter, NewsletterOptionFieldEntity $optionField) {
|
||||
public function __construct(
|
||||
NewsletterEntity $newsletter,
|
||||
NewsletterOptionFieldEntity $optionField
|
||||
) {
|
||||
$this->newsletter = $newsletter;
|
||||
$this->optionField = $optionField;
|
||||
}
|
||||
|
@ -30,7 +30,10 @@ class NewsletterPostEntity {
|
||||
*/
|
||||
private $postId;
|
||||
|
||||
public function __construct(NewsletterEntity $newsletter, int $postId) {
|
||||
public function __construct(
|
||||
NewsletterEntity $newsletter,
|
||||
int $postId
|
||||
) {
|
||||
$this->newsletter = $newsletter;
|
||||
$this->postId = $postId;
|
||||
}
|
||||
|
@ -30,7 +30,10 @@ class NewsletterSegmentEntity {
|
||||
*/
|
||||
private $segment;
|
||||
|
||||
public function __construct(NewsletterEntity $newsletter, SegmentEntity $segment) {
|
||||
public function __construct(
|
||||
NewsletterEntity $newsletter,
|
||||
SegmentEntity $segment
|
||||
) {
|
||||
$this->newsletter = $newsletter;
|
||||
$this->segment = $segment;
|
||||
}
|
||||
|
@ -57,7 +57,9 @@ class NewsletterTemplateEntity {
|
||||
*/
|
||||
private $readonly = false;
|
||||
|
||||
public function __construct(string $name) {
|
||||
public function __construct(
|
||||
string $name
|
||||
) {
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,11 @@ class SegmentEntity {
|
||||
*/
|
||||
private $averageEngagementScoreUpdatedAt;
|
||||
|
||||
public function __construct(string $name, string $type, string $description) {
|
||||
public function __construct(
|
||||
string $name,
|
||||
string $type,
|
||||
string $description
|
||||
) {
|
||||
$this->name = $name;
|
||||
$this->type = $type;
|
||||
$this->description = $description;
|
||||
|
@ -41,7 +41,11 @@ class StatisticsNewsletterEntity {
|
||||
*/
|
||||
private $sentAt;
|
||||
|
||||
public function __construct(NewsletterEntity $newsletter, SendingQueueEntity $queue, SubscriberEntity $subscriber) {
|
||||
public function __construct(
|
||||
NewsletterEntity $newsletter,
|
||||
SendingQueueEntity $queue,
|
||||
SubscriberEntity $subscriber
|
||||
) {
|
||||
$this->newsletter = $newsletter;
|
||||
$this->queue = $queue;
|
||||
$this->subscriber = $subscriber;
|
||||
|
@ -64,7 +64,14 @@ class StatisticsWooCommercePurchaseEntity {
|
||||
*/
|
||||
private $orderPriceTotal;
|
||||
|
||||
public function __construct(NewsletterEntity $newsletter, SendingQueueEntity $queue, StatisticsClickEntity $click, int $orderId, string $orderCurrency, float $orderPriceTotal ) {
|
||||
public function __construct(
|
||||
NewsletterEntity $newsletter,
|
||||
SendingQueueEntity $queue,
|
||||
StatisticsClickEntity $click,
|
||||
int $orderId,
|
||||
string $orderCurrency,
|
||||
float $orderPriceTotal
|
||||
) {
|
||||
$this->newsletter = $newsletter;
|
||||
$this->queue = $queue;
|
||||
$this->click = $click;
|
||||
|
@ -30,7 +30,10 @@ class StatsNotificationEntity {
|
||||
*/
|
||||
private $task;
|
||||
|
||||
public function __construct(NewsletterEntity $newsletter, ScheduledTaskEntity $task) {
|
||||
public function __construct(
|
||||
NewsletterEntity $newsletter,
|
||||
ScheduledTaskEntity $task
|
||||
) {
|
||||
$this->newsletter = $newsletter;
|
||||
$this->task = $task;
|
||||
}
|
||||
|
@ -26,7 +26,9 @@ class SubscriberIPEntity {
|
||||
*/
|
||||
private $createdAt;
|
||||
|
||||
public function __construct(string $ip) {
|
||||
public function __construct(
|
||||
string $ip
|
||||
) {
|
||||
$this->ip = $ip;
|
||||
$this->createdAt = new Carbon();
|
||||
}
|
||||
|
@ -35,7 +35,9 @@ class UserAgentEntity {
|
||||
*/
|
||||
private $userAgent;
|
||||
|
||||
public function __construct(string $userAgent) {
|
||||
public function __construct(
|
||||
string $userAgent
|
||||
) {
|
||||
$this->setUserAgent($userAgent);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,10 @@ class FeatureFlagsController {
|
||||
/** @var FeatureFlagsRepository */
|
||||
private $featureFlagsRepository;
|
||||
|
||||
public function __construct(FeaturesController $featuresController, FeatureFlagsRepository $featureFlagsRepository) {
|
||||
public function __construct(
|
||||
FeaturesController $featuresController,
|
||||
FeatureFlagsRepository $featureFlagsRepository
|
||||
) {
|
||||
$this->featuresController = $featuresController;
|
||||
$this->featureFlagsRepository = $featureFlagsRepository;
|
||||
}
|
||||
|
@ -16,7 +16,9 @@ class FeaturesController {
|
||||
/** @var FeatureFlagsRepository */
|
||||
private $featureFlagsRepository;
|
||||
|
||||
public function __construct(FeatureFlagsRepository $featureFlagsRepository) {
|
||||
public function __construct(
|
||||
FeatureFlagsRepository $featureFlagsRepository
|
||||
) {
|
||||
$this->featureFlagsRepository = $featureFlagsRepository;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,9 @@ class ApiDataSanitizer {
|
||||
],
|
||||
];
|
||||
|
||||
public function __construct(FormHtmlSanitizer $htmlSanitizer) {
|
||||
public function __construct(
|
||||
FormHtmlSanitizer $htmlSanitizer
|
||||
) {
|
||||
$this->htmlSanitizer = $htmlSanitizer;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,10 @@ class BlockRendererHelper {
|
||||
/** @var WPFunctions */
|
||||
protected $wp;
|
||||
|
||||
public function __construct(FieldNameObfuscator $fieldNameObfuscator, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
FieldNameObfuscator $fieldNameObfuscator,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->fieldNameObfuscator = $fieldNameObfuscator;
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
@ -16,7 +16,11 @@ class Checkbox {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(BlockRendererHelper $rendererHelper, BlockWrapperRenderer $wrapper, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
BlockRendererHelper $rendererHelper,
|
||||
BlockWrapperRenderer $wrapper,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->rendererHelper = $rendererHelper;
|
||||
$this->wrapper = $wrapper;
|
||||
$this->wp = $wp;
|
||||
|
@ -8,7 +8,9 @@ class Column {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class Columns {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class Divider {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class Heading {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,9 @@ class Html {
|
||||
/** @var BlockRendererHelper */
|
||||
private $rendererHelper;
|
||||
|
||||
public function __construct(BlockRendererHelper $rendererHelper) {
|
||||
public function __construct(
|
||||
BlockRendererHelper $rendererHelper
|
||||
) {
|
||||
$this->rendererHelper = $rendererHelper;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class Image {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class Paragraph {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,11 @@ class Radio {
|
||||
/** @var BlockWrapperRenderer */
|
||||
private $wrapper;
|
||||
|
||||
public function __construct(BlockRendererHelper $rendererHelper, BlockWrapperRenderer $wrapper, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
BlockRendererHelper $rendererHelper,
|
||||
BlockWrapperRenderer $wrapper,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->rendererHelper = $rendererHelper;
|
||||
$this->wrapper = $wrapper;
|
||||
$this->wp = $wp;
|
||||
|
@ -8,7 +8,9 @@ class BlockStylesRenderer {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@ class BlockWrapperRenderer {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,9 @@ class FormHtmlSanitizer {
|
||||
's' => [],
|
||||
];
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,9 @@ class PreviewWidget extends \WP_Widget {
|
||||
/** @var string */
|
||||
private $formHtml;
|
||||
|
||||
public function __construct($formHtml) {
|
||||
public function __construct(
|
||||
$formHtml
|
||||
) {
|
||||
$this->formHtml = $formHtml;
|
||||
parent::__construct(
|
||||
'mailpoet_form_preview',
|
||||
|
@ -91,7 +91,10 @@ EOL;
|
||||
/** @var string */
|
||||
protected $assetsDirectory = '';
|
||||
|
||||
public function __construct(CdnAssetUrl $cdnAssetUrl, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
CdnAssetUrl $cdnAssetUrl,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->cdnAssetUrl = $cdnAssetUrl;
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
@ -140,7 +140,10 @@ class TemplateRepository {
|
||||
Template18Widget::ID => Template18Widget::class,
|
||||
];
|
||||
|
||||
public function __construct(CdnAssetUrl $cdnAssetUrl, WPFunctions $wp) {
|
||||
public function __construct(
|
||||
CdnAssetUrl $cdnAssetUrl,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->cdnAssetUrl = $cdnAssetUrl;
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
@ -74,7 +74,9 @@ class CustomFonts {
|
||||
/** @var Functions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(Functions $wp) {
|
||||
public function __construct(
|
||||
Functions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,9 @@ class FieldNameObfuscator {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,11 @@ class Beacon {
|
||||
/** @var SubscribersFeature */
|
||||
private $subscribersFeature;
|
||||
|
||||
public function __construct(SettingsController $settings, WPFunctions $wp, SubscribersFeature $subscribersFeature) {
|
||||
public function __construct(
|
||||
SettingsController $settings,
|
||||
WPFunctions $wp,
|
||||
SubscribersFeature $subscribersFeature
|
||||
) {
|
||||
$this->settings = $settings;
|
||||
$this->wp = $wp;
|
||||
$this->subscribersFeature = $subscribersFeature;
|
||||
|
@ -9,7 +9,10 @@ class BulkActionController {
|
||||
/** @var Handler */
|
||||
private $handler;
|
||||
|
||||
public function __construct(BulkActionFactory $factory, Handler $handler) {
|
||||
public function __construct(
|
||||
BulkActionFactory $factory,
|
||||
Handler $handler
|
||||
) {
|
||||
$this->factory = $factory;
|
||||
$this->handler = $handler;
|
||||
}
|
||||
|
@ -10,7 +10,9 @@ abstract class ListingRepository {
|
||||
/** @var QueryBuilder */
|
||||
protected $queryBuilder;
|
||||
|
||||
public function __construct(EntityManager $entityManager) {
|
||||
public function __construct(
|
||||
EntityManager $entityManager
|
||||
) {
|
||||
$this->queryBuilder = $entityManager->createQueryBuilder();
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,9 @@ class PageLimit {
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(WPFunctions $wp) {
|
||||
public function __construct(
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,10 @@ class LoggerFactory {
|
||||
/** @var LogRepository */
|
||||
private $logRepository;
|
||||
|
||||
public function __construct(LogRepository $logRepository, SettingsController $settings) {
|
||||
public function __construct(
|
||||
LogRepository $logRepository,
|
||||
SettingsController $settings
|
||||
) {
|
||||
$this->settings = $settings;
|
||||
$this->logRepository = $logRepository;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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) ?
|
||||
|
@ -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;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user