Make all constructor signatures multiline
[MAILPOET-3732]
This commit is contained in:
@@ -13,7 +13,9 @@ class PostContentManager {
|
||||
/** @var WooCommerceHelper */
|
||||
private $woocommerceHelper;
|
||||
|
||||
public function __construct(WooCommerceHelper $woocommerceHelper = null) {
|
||||
public function __construct(
|
||||
WooCommerceHelper $woocommerceHelper = null
|
||||
) {
|
||||
$wp = new WPFunctions;
|
||||
$this->maxExcerptLength = $wp->applyFilters('mailpoet_newsletter_post_excerpt_length', $this->maxExcerptLength);
|
||||
$this->woocommerceHelper = $woocommerceHelper ?: new WooCommerceHelper();
|
||||
|
@@ -7,7 +7,9 @@ class PostListTransformer {
|
||||
private $args;
|
||||
private $transformer;
|
||||
|
||||
public function __construct($args) {
|
||||
public function __construct(
|
||||
$args
|
||||
) {
|
||||
$this->args = $args;
|
||||
$this->transformer = new PostTransformer($args);
|
||||
}
|
||||
|
@@ -13,7 +13,10 @@ class PostTransformer {
|
||||
/** @var string */
|
||||
private $imagePosition;
|
||||
|
||||
public function __construct($args, PostTransformerContentsExtractor $extractor = null) {
|
||||
public function __construct(
|
||||
$args,
|
||||
PostTransformerContentsExtractor $extractor = null
|
||||
) {
|
||||
$this->args = $args;
|
||||
$this->withLayout = isset($args['withLayout']) ? (bool)filter_var($args['withLayout'], FILTER_VALIDATE_BOOLEAN) : false;
|
||||
$this->imagePosition = 'left';
|
||||
|
@@ -16,7 +16,9 @@ class PostTransformerContentsExtractor {
|
||||
/** @var WooCommerceHelper */
|
||||
private $woocommerceHelper;
|
||||
|
||||
public function __construct($args) {
|
||||
public function __construct(
|
||||
$args
|
||||
) {
|
||||
$this->args = $args;
|
||||
$this->wp = new WPFunctions();
|
||||
$this->woocommerceHelper = new WooCommerceHelper();
|
||||
|
@@ -8,7 +8,9 @@ class TitleListTransformer {
|
||||
|
||||
private $args;
|
||||
|
||||
public function __construct($args) {
|
||||
public function __construct(
|
||||
$args
|
||||
) {
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,9 @@ class Transformer {
|
||||
|
||||
private $transformer;
|
||||
|
||||
public function __construct($args) {
|
||||
public function __construct(
|
||||
$args
|
||||
) {
|
||||
$titleListOnly = $args['displayType'] === 'titleOnly' && $args['titleFormat'] === 'ul';
|
||||
|
||||
if ($titleListOnly) $transformer = new TitleListTransformer($args);
|
||||
|
Reference in New Issue
Block a user