Free up shortcodes constructor for DI

[MAILPOET-2993]
This commit is contained in:
Pavel Dohnal
2020-11-04 10:26:07 +01:00
committed by Veljko V
parent 7d538abad8
commit 6139e300c3
13 changed files with 297 additions and 193 deletions

View File

@@ -46,7 +46,12 @@ class Newsletter {
/** @var Emoji */
private $emoji;
public function __construct(WPFunctions $wp = null, PostsTask $postsTask = null, GATracking $gaTracking = null, Emoji $emoji = null) {
public function __construct(
WPFunctions $wp = null,
PostsTask $postsTask = null,
GATracking $gaTracking = null,
Emoji $emoji = null
) {
$settings = SettingsController::getInstance();
$this->trackingEnabled = (boolean)$settings->get('tracking.enabled');
if ($wp === null) {