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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user