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

@@ -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;

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -19,7 +19,9 @@ class RequirementsChecker {
'\Html2Text\Html2Text',
];
public function __construct($displayErrorNotice = true) {
public function __construct(
$displayErrorNotice = true
) {
$this->displayErrorNotice = $displayErrorNotice;
}

View File

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

View File

@@ -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;