diff --git a/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php b/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php index ad70020bfc..45ec21b0d5 100644 --- a/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php +++ b/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php @@ -9,7 +9,6 @@ use MailPoet\Config\AccessControl; use MailPoet\Newsletter\ApiDataSanitizer; use MailPoet\NewsletterTemplates\NewsletterTemplatesRepository; use MailPoet\NewsletterTemplates\ThumbnailSaver; -use MailPoet\WP\Functions as WPFunctions; class NewsletterTemplates extends APIEndpoint { public $permissions = [ diff --git a/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php b/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php index 998452d35b..f9f155c09c 100644 --- a/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php +++ b/mailpoet/lib/Automation/Engine/Builder/CreateWorkflowFromTemplateController.php @@ -5,7 +5,6 @@ namespace MailPoet\Automation\Engine\Builder; use MailPoet\Automation\Engine\Data\Workflow; use MailPoet\Automation\Engine\Storage\WorkflowStorage; use MailPoet\Automation\Engine\Storage\WorkflowTemplateStorage; -use MailPoet\Automation\Integrations\MailPoet\Templates\WorkflowBuilder; use MailPoet\UnexpectedValueException; class CreateWorkflowFromTemplateController { @@ -26,7 +25,7 @@ class CreateWorkflowFromTemplateController { public function createWorkflow(string $slug): Workflow { $template = $this->templateStorage->getTemplateBySlug($slug); - if (! $template) { + if (!$template) { throw UnexpectedValueException::create()->withMessage('Template not found.'); } diff --git a/mailpoet/lib/Automation/Engine/Data/WorkflowTemplate.php b/mailpoet/lib/Automation/Engine/Data/WorkflowTemplate.php index 83ac78678d..1f98a84ee3 100644 --- a/mailpoet/lib/Automation/Engine/Data/WorkflowTemplate.php +++ b/mailpoet/lib/Automation/Engine/Data/WorkflowTemplate.php @@ -1,11 +1,11 @@ -slug = $slug; @@ -40,27 +45,27 @@ class WorkflowTemplate $this->workflow = $workflow; } - public function getSlug() : string { + public function getSlug(): string { return $this->slug; } - public function getName() : string { + public function getName(): string { return $this->workflow->getName(); } - public function getCategory() : int { + public function getCategory(): int { return $this->category; } - public function getDescription() : string { + public function getDescription(): string { return $this->description; } - public function getWorkflow() : Workflow { + public function getWorkflow(): Workflow { return $this->workflow; } - public function toArray() : array { + public function toArray(): array { return [ 'slug' => $this->getSlug(), 'name' => $this->getName(), diff --git a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowTemplatesGetEndpoint.php b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowTemplatesGetEndpoint.php index 80efb16967..81cda63575 100644 --- a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowTemplatesGetEndpoint.php +++ b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowTemplatesGetEndpoint.php @@ -1,4 +1,4 @@ -storage = $storage; } public function handle(Request $request): Response { - $templates = $this->storage->getTemplates((int) $request->getParam('category')); + $templates = $this->storage->getTemplates((int)$request->getParam('category')); return new Response(array_map(function (WorkflowTemplate $workflow) { return $workflow->toArray(); }, $templates)); } - public static function getRequestSchema() : array { + public static function getRequestSchema(): array { return [ 'category' => Builder::integer()->nullable(), ]; diff --git a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsCreateFromTemplateEndpoint.php b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsCreateFromTemplateEndpoint.php index abdcec53a4..ff6bdd2304 100644 --- a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsCreateFromTemplateEndpoint.php +++ b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsCreateFromTemplateEndpoint.php @@ -6,8 +6,6 @@ use MailPoet\Automation\Engine\API\Endpoint; use MailPoet\Automation\Engine\API\Request; use MailPoet\Automation\Engine\API\Response; use MailPoet\Automation\Engine\Builder\CreateWorkflowFromTemplateController; -use MailPoet\RuntimeException; -use MailPoet\UnexpectedValueException; use MailPoet\Validator\Builder; class WorkflowsCreateFromTemplateEndpoint extends Endpoint { diff --git a/mailpoet/lib/Automation/Engine/Storage/WorkflowTemplateStorage.php b/mailpoet/lib/Automation/Engine/Storage/WorkflowTemplateStorage.php index 8b9fc9b2b9..c5b9328f5f 100644 --- a/mailpoet/lib/Automation/Engine/Storage/WorkflowTemplateStorage.php +++ b/mailpoet/lib/Automation/Engine/Storage/WorkflowTemplateStorage.php @@ -1,17 +1,14 @@ -builder = $builder; $this->wp = $wp; $this->templates = $this->createTemplates(); } - public function getTemplateBySlug(string $slug) : ?WorkflowTemplate { + public function getTemplateBySlug(string $slug): ?WorkflowTemplate { foreach ($this->templates as $template) { if ($template->getSlug() === $slug) { return $template; @@ -38,21 +38,21 @@ class WorkflowTemplateStorage } /** @return WorkflowTemplate[] */ - public function getTemplates(int $category = null) : array { - if (! $category) { + public function getTemplates(int $category = null): array { + if (!$category) { return $this->templates; } return array_values( array_filter( $this->templates, - function(WorkflowTemplate $template) use ($category) : bool { + function(WorkflowTemplate $template) use ($category): bool { return $template->getCategory() === $category; } ) ); } - private function createTemplates() : array { + private function createTemplates(): array { $simpleWelcomeEmail = new WorkflowTemplate( 'simple-welcome-email', WorkflowTemplate::CATEGORY_WELCOME, @@ -67,9 +67,9 @@ class WorkflowTemplateStorage ) ); - $templates = $this->wp->applyFilters(Hooks::WORKFLOW_TEMPLATES,[ + $templates = $this->wp->applyFilters(Hooks::WORKFLOW_TEMPLATES, [ $simpleWelcomeEmail, ]); - return is_array($templates)?$templates:[]; + return is_array($templates) ? $templates : []; } } diff --git a/mailpoet/lib/Automation/Integrations/MailPoet/Templates/WorkflowBuilder.php b/mailpoet/lib/Automation/Integrations/MailPoet/Templates/WorkflowBuilder.php index cd62eda8d4..0019b700af 100644 --- a/mailpoet/lib/Automation/Integrations/MailPoet/Templates/WorkflowBuilder.php +++ b/mailpoet/lib/Automation/Integrations/MailPoet/Templates/WorkflowBuilder.php @@ -1,15 +1,11 @@ -registry = $registry; } - public function createFromSequence(string $name, array $sequence, array $sequenceArgs = []) : Workflow { + public function createFromSequence(string $name, array $sequence, array $sequenceArgs = []): Workflow { $steps = []; $nextStep = null; foreach (array_reverse($sequence) as $index => $stepKey) { $workflowStep = $this->registry->getStep($stepKey); - if (! $workflowStep) { + if (!$workflowStep) { continue; } $args = array_merge($this->getDefaultArgs($workflowStep->getArgsSchema()), array_reverse($sequenceArgs)[$index] ?? []); $step = new Step( $this->uniqueId(), - in_array(Trigger::class, (array) class_implements($workflowStep)) ? Step::TYPE_TRIGGER : Step::TYPE_ACTION, + in_array(Trigger::class, (array)class_implements($workflowStep)) ? Step::TYPE_TRIGGER : Step::TYPE_ACTION, $stepKey, $nextStep, $args @@ -53,7 +51,6 @@ class WorkflowBuilder { return Security::generateRandomString(16); } - private function getDefaultArgs(ObjectSchema $argsSchema): array { $args = []; foreach ($argsSchema->toArray()['properties'] ?? [] as $name => $schema) { diff --git a/mailpoet/lib/Config/AssetsLoader.php b/mailpoet/lib/Config/AssetsLoader.php index 1770628c92..9445b52b37 100644 --- a/mailpoet/lib/Config/AssetsLoader.php +++ b/mailpoet/lib/Config/AssetsLoader.php @@ -12,14 +12,17 @@ class AssetsLoader { /** @var WPFunctions */ private $wp; - public function __construct(RendererFactory $rendererFactory, WPFunctions $wp) { + public function __construct( + RendererFactory $rendererFactory, + WPFunctions $wp + ) { $this->renderer = $rendererFactory->getRenderer(); $this->wp = $wp; } public function loadStyles(): void { // MailPoet plugin style should be loaded on all mailpoet sites - if (isset($_GET['page']) && strpos($_GET['page'], 'mailpoet-') === 0 ) { + if (isset($_GET['page']) && strpos($_GET['page'], 'mailpoet-') === 0) { $this->enqueueStyle('mailpoet-plugin', [ 'forms', // To prevent conflict in CSS with WP forms we need to add dependency 'buttons', diff --git a/mailpoet/lib/Doctrine/ArrayCache.php b/mailpoet/lib/Doctrine/ArrayCache.php index 5284018d10..12e09a485d 100644 --- a/mailpoet/lib/Doctrine/ArrayCache.php +++ b/mailpoet/lib/Doctrine/ArrayCache.php @@ -9,8 +9,8 @@ use MailPoetVendor\Doctrine\Common\Cache\CacheProvider; * Based on https://github.com/doctrine/cache/blob/1.11.x/lib/Doctrine/Common/Cache/ArrayCache.php * The cache implementation was removed from the doctrine/cache v2.0 so we need to provide own implementation. */ -class ArrayCache extends CacheProvider -{ +class ArrayCache extends CacheProvider { + /** @var mixed[] */ private $data = []; @@ -26,8 +26,7 @@ class ArrayCache extends CacheProvider /** * {@inheritdoc} */ - public function __construct() - { + public function __construct() { $this->upTime = time(); } @@ -35,7 +34,7 @@ class ArrayCache extends CacheProvider * {@inheritdoc} */ protected function doFetch($id) { - if (! $this->doContains($id)) { + if (!$this->doContains($id)) { $this->missesCount += 1; return false; } @@ -47,7 +46,7 @@ class ArrayCache extends CacheProvider * {@inheritdoc} */ protected function doContains($id) { - if (! isset($this->data[$id])) { + if (!isset($this->data[$id])) { return false; } $expiration = $this->data[$id][1]; @@ -87,10 +86,10 @@ class ArrayCache extends CacheProvider */ protected function doGetStats() { return [ - CacheProvider::STATS_HITS => $this->hitsCount, - CacheProvider::STATS_MISSES => $this->missesCount, - CacheProvider::STATS_UPTIME => $this->upTime, - CacheProvider::STATS_MEMORY_USAGE => null, + CacheProvider::STATS_HITS => $this->hitsCount, + CacheProvider::STATS_MISSES => $this->missesCount, + CacheProvider::STATS_UPTIME => $this->upTime, + CacheProvider::STATS_MEMORY_USAGE => null, CacheProvider::STATS_MEMORY_AVAILABLE => null, ]; } diff --git a/mailpoet/lib/Doctrine/CacheOnlyMappingDriver.php b/mailpoet/lib/Doctrine/CacheOnlyMappingDriver.php index 3ef0ba7462..e988cf140b 100644 --- a/mailpoet/lib/Doctrine/CacheOnlyMappingDriver.php +++ b/mailpoet/lib/Doctrine/CacheOnlyMappingDriver.php @@ -49,7 +49,7 @@ class CacheOnlyMappingDriver implements MappingDriver { /** * Copy pasted from MailPoetVendor\Doctrine\Persistence\Mapping\AbstractClassMetadataFactory */ - protected function getCacheKey(string $className) : string { + protected function getCacheKey(string $className): string { return str_replace('\\', '__', $className) . $this->cacheSalt; } } diff --git a/mailpoet/lib/Doctrine/ConfigurationFactory.php b/mailpoet/lib/Doctrine/ConfigurationFactory.php index db8cd0982d..0e666cd681 100644 --- a/mailpoet/lib/Doctrine/ConfigurationFactory.php +++ b/mailpoet/lib/Doctrine/ConfigurationFactory.php @@ -20,7 +20,10 @@ class ConfigurationFactory { /** @var AnnotationReaderProvider */ private $annotationReaderProvider; - public function __construct(AnnotationReaderProvider $annotationReaderProvider, $isDevMode = null) { + public function __construct( + AnnotationReaderProvider $annotationReaderProvider, + $isDevMode = null + ) { $this->isDevMode = $isDevMode === null ? WP_DEBUG : $isDevMode; $this->annotationReaderProvider = $annotationReaderProvider; } diff --git a/mailpoet/lib/Doctrine/ConnectionFactory.php b/mailpoet/lib/Doctrine/ConnectionFactory.php index 39ed86a168..fd29e36952 100644 --- a/mailpoet/lib/Doctrine/ConnectionFactory.php +++ b/mailpoet/lib/Doctrine/ConnectionFactory.php @@ -4,12 +4,12 @@ namespace MailPoet\Doctrine; use MailPoet\Config\Env; use MailPoet\Doctrine\Types\BigIntType; +use MailPoet\Doctrine\Types\DateTimeTzToStringType; use MailPoet\Doctrine\Types\JsonOrSerializedType; use MailPoet\Doctrine\Types\JsonType; use MailPoet\Doctrine\Types\SerializedArrayType; -use MailPoet\Doctrine\Types\DateTimeTzToStringType; -use MailPoetVendor\Doctrine\DBAL\DriverManager; use MailPoetVendor\Doctrine\DBAL\Driver\PDO\MySQL\Driver; +use MailPoetVendor\Doctrine\DBAL\DriverManager; use MailPoetVendor\Doctrine\DBAL\Platforms\MySqlPlatform; use MailPoetVendor\Doctrine\DBAL\Types\Type; use PDO; diff --git a/mailpoet/lib/Doctrine/EventListeners/EmojiEncodingListener.php b/mailpoet/lib/Doctrine/EventListeners/EmojiEncodingListener.php index eba88eb505..950802a423 100644 --- a/mailpoet/lib/Doctrine/EventListeners/EmojiEncodingListener.php +++ b/mailpoet/lib/Doctrine/EventListeners/EmojiEncodingListener.php @@ -10,7 +10,9 @@ class EmojiEncodingListener { /** @var Emoji */ private $emoji; - public function __construct(Emoji $emoji) { + public function __construct( + Emoji $emoji + ) { $this->emoji = $emoji; } diff --git a/mailpoet/lib/Doctrine/EventListeners/LastSubscribedAtListener.php b/mailpoet/lib/Doctrine/EventListeners/LastSubscribedAtListener.php index 77772a65f0..5b8aaf3d3d 100644 --- a/mailpoet/lib/Doctrine/EventListeners/LastSubscribedAtListener.php +++ b/mailpoet/lib/Doctrine/EventListeners/LastSubscribedAtListener.php @@ -11,7 +11,9 @@ class LastSubscribedAtListener { /** @var Carbon */ private $now; - public function __construct(WPFunctions $wp) { + public function __construct( + WPFunctions $wp + ) { $this->now = Carbon::createFromTimestamp($wp->currentTime('timestamp')); } diff --git a/mailpoet/lib/Doctrine/EventListeners/TimestampListener.php b/mailpoet/lib/Doctrine/EventListeners/TimestampListener.php index f2cd22686a..4983f0773d 100644 --- a/mailpoet/lib/Doctrine/EventListeners/TimestampListener.php +++ b/mailpoet/lib/Doctrine/EventListeners/TimestampListener.php @@ -13,7 +13,9 @@ class TimestampListener { /** @var Carbon */ private $now; - public function __construct(WPFunctions $wp) { + public function __construct( + WPFunctions $wp + ) { $this->now = Carbon::createFromTimestamp($wp->currentTime('timestamp')); } diff --git a/mailpoet/lib/Doctrine/EventListeners/ValidationListener.php b/mailpoet/lib/Doctrine/EventListeners/ValidationListener.php index c55d6a81bd..cd4a4c3946 100644 --- a/mailpoet/lib/Doctrine/EventListeners/ValidationListener.php +++ b/mailpoet/lib/Doctrine/EventListeners/ValidationListener.php @@ -10,7 +10,9 @@ class ValidationListener { /** @var ValidatorInterface */ private $validator; - public function __construct(ValidatorInterface $validator) { + public function __construct( + ValidatorInterface $validator + ) { $this->validator = $validator; } diff --git a/mailpoet/lib/Doctrine/MetadataCache.php b/mailpoet/lib/Doctrine/MetadataCache.php index 024456179b..e9155cf0a0 100644 --- a/mailpoet/lib/Doctrine/MetadataCache.php +++ b/mailpoet/lib/Doctrine/MetadataCache.php @@ -19,7 +19,10 @@ class MetadataCache extends CacheProvider { /** @var string */ private $directory; - public function __construct($dir, $isReadOnly) { + public function __construct( + $dir, + $isReadOnly + ) { $this->isDevMode = defined('WP_DEBUG') && WP_DEBUG && !$isReadOnly; $this->directory = rtrim($dir, '/\\'); if (!file_exists($this->directory)) { diff --git a/mailpoet/lib/Doctrine/PSRCacheItem.php b/mailpoet/lib/Doctrine/PSRCacheItem.php index 5c120304fb..b2091de310 100644 --- a/mailpoet/lib/Doctrine/PSRCacheItem.php +++ b/mailpoet/lib/Doctrine/PSRCacheItem.php @@ -15,7 +15,10 @@ class PSRCacheItem implements CacheItemInterface { /** @var bool */ private $isHit; - public function __construct(string $key, bool $isHit) { + public function __construct( + string $key, + bool $isHit + ) { $this->key = $key; $this->isHit = $isHit; } diff --git a/mailpoet/lib/Doctrine/PSRMetadataCache.php b/mailpoet/lib/Doctrine/PSRMetadataCache.php index fee054ce36..3d618b17a5 100644 --- a/mailpoet/lib/Doctrine/PSRMetadataCache.php +++ b/mailpoet/lib/Doctrine/PSRMetadataCache.php @@ -9,7 +9,10 @@ class PSRMetadataCache implements CacheItemPoolInterface { /** @var MetadataCache */ private $metadataCache; - public function __construct(string $dir, bool $isReadOnly) { + public function __construct( + string $dir, + bool $isReadOnly + ) { $this->metadataCache = new MetadataCache($dir, $isReadOnly); } diff --git a/mailpoet/lib/Doctrine/ProxyClassNameResolver.php b/mailpoet/lib/Doctrine/ProxyClassNameResolver.php index 94ead19cdf..cc79ea1f18 100644 --- a/mailpoet/lib/Doctrine/ProxyClassNameResolver.php +++ b/mailpoet/lib/Doctrine/ProxyClassNameResolver.php @@ -10,12 +10,11 @@ use MailPoetVendor\Doctrine\Persistence\Mapping\ProxyClassNameResolver as IProxy * @see https://github.com/doctrine/persistence/blob/2.2.x/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php#L516-L536 */ class ProxyClassNameResolver implements IProxyClassNameResolver { - /** * @template T * @return class-string */ - public function resolveClassName(string $className) : string { + public function resolveClassName(string $className): string { $pos = \strrpos($className, '\\' . \MailPoetVendor\Doctrine\Persistence\Proxy::MARKER . '\\'); if ($pos === \false) { /** @var class-string */ diff --git a/mailpoet/lib/Doctrine/Repository.php b/mailpoet/lib/Doctrine/Repository.php index 2dc28fc36f..1fbce0e5f9 100644 --- a/mailpoet/lib/Doctrine/Repository.php +++ b/mailpoet/lib/Doctrine/Repository.php @@ -26,7 +26,9 @@ abstract class Repository { 'created_at', ]; - public function __construct(EntityManager $entityManager) { + public function __construct( + EntityManager $entityManager + ) { $this->entityManager = $entityManager; $this->classMetadata = $entityManager->getClassMetadata($this->getEntityClassName()); $this->doctrineRepository = new DoctrineEntityRepository($this->entityManager, $this->classMetadata); diff --git a/mailpoet/lib/Doctrine/SerializableConnection.php b/mailpoet/lib/Doctrine/SerializableConnection.php index 3ae72ce3ed..a9d070d514 100644 --- a/mailpoet/lib/Doctrine/SerializableConnection.php +++ b/mailpoet/lib/Doctrine/SerializableConnection.php @@ -13,7 +13,12 @@ class SerializableConnection extends Connection { private $config; private $eventManager; - public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null) { + public function __construct( + array $params, + Driver $driver, + Configuration $config = null, + EventManager $eventManager = null + ) { $this->params = $params; $this->driver = $driver; $this->config = $config; diff --git a/mailpoet/lib/Doctrine/Types/DateTimeTzToStringType.php b/mailpoet/lib/Doctrine/Types/DateTimeTzToStringType.php index fa47665a48..73d67d43b6 100644 --- a/mailpoet/lib/Doctrine/Types/DateTimeTzToStringType.php +++ b/mailpoet/lib/Doctrine/Types/DateTimeTzToStringType.php @@ -3,8 +3,8 @@ namespace MailPoet\Doctrine\Types; use MailPoetVendor\Carbon\Carbon; -use MailPoetVendor\Doctrine\DBAL\Types\DateTimeTzType; use MailPoetVendor\Doctrine\DBAL\Platforms\AbstractPlatform; +use MailPoetVendor\Doctrine\DBAL\Types\DateTimeTzType; class DateTimeTzToStringType extends DateTimeTzType { const NAME = 'datetimetz_to_string'; diff --git a/mailpoet/lib/Doctrine/Validator/ValidationException.php b/mailpoet/lib/Doctrine/Validator/ValidationException.php index 4d92a623b6..f41844dc0c 100644 --- a/mailpoet/lib/Doctrine/Validator/ValidationException.php +++ b/mailpoet/lib/Doctrine/Validator/ValidationException.php @@ -12,7 +12,10 @@ class ValidationException extends \RuntimeException { /** @var ConstraintViolationListInterface|ConstraintViolationInterface[] */ private $violations; - public function __construct($resourceName, ConstraintViolationListInterface $violations) { + public function __construct( + $resourceName, + ConstraintViolationListInterface $violations + ) { $this->resourceName = $resourceName; $this->violations = $violations; diff --git a/mailpoet/lib/Doctrine/Validator/ValidatorFactory.php b/mailpoet/lib/Doctrine/Validator/ValidatorFactory.php index 3cad3a0a6d..6dd8489db9 100644 --- a/mailpoet/lib/Doctrine/Validator/ValidatorFactory.php +++ b/mailpoet/lib/Doctrine/Validator/ValidatorFactory.php @@ -12,7 +12,9 @@ class ValidatorFactory { /** @var AnnotationReaderProvider */ private $annotationReaderProvider; - public function __construct(AnnotationReaderProvider $annotationReaderProvider) { + public function __construct( + AnnotationReaderProvider $annotationReaderProvider + ) { $this->annotationReaderProvider = $annotationReaderProvider; } diff --git a/mailpoet/lib/Form/AssetsController.php b/mailpoet/lib/Form/AssetsController.php index cd03506bac..c55d66c5e4 100644 --- a/mailpoet/lib/Form/AssetsController.php +++ b/mailpoet/lib/Form/AssetsController.php @@ -20,7 +20,11 @@ class AssetsController { const RECAPTCHA_API_URL = 'https://www.google.com/recaptcha/api.js?render=explicit'; - public function __construct(WPFunctions $wp, BasicRenderer $renderer, SettingsController $settings) { + public function __construct( + WPFunctions $wp, + BasicRenderer $renderer, + SettingsController $settings + ) { $this->wp = $wp; $this->renderer = $renderer; $this->settings = $settings; diff --git a/mailpoet/lib/Tracy/DoctrinePanel/DoctrinePanel.php b/mailpoet/lib/Tracy/DoctrinePanel/DoctrinePanel.php index 47982be15e..55d99ffb95 100644 --- a/mailpoet/lib/Tracy/DoctrinePanel/DoctrinePanel.php +++ b/mailpoet/lib/Tracy/DoctrinePanel/DoctrinePanel.php @@ -16,7 +16,9 @@ class DoctrinePanel implements IBarPanel { /** @var DebugStack */ private $sqlLogger; - public function __construct(Configuration $doctrineConfiguration) { + public function __construct( + Configuration $doctrineConfiguration + ) { $this->sqlLogger = new DebugStack(); $doctrineConfiguration->setSQLLogger($this->sqlLogger); } diff --git a/mailpoet/lib/Twig/Assets.php b/mailpoet/lib/Twig/Assets.php index bfacb9f4c4..58e873fe74 100644 --- a/mailpoet/lib/Twig/Assets.php +++ b/mailpoet/lib/Twig/Assets.php @@ -14,7 +14,10 @@ class Assets extends AbstractExtension { /** @var CdnAssetUrl|null */ private $cdnAssetsUrl; - public function __construct(array $globals, CdnAssetUrl $cdnAssetsUrl = null) { + public function __construct( + array $globals, + CdnAssetUrl $cdnAssetsUrl = null + ) { $this->globals = $globals; $this->cdnAssetsUrl = $cdnAssetsUrl; } diff --git a/mailpoet/lib/WooCommerce/TransactionalEmails/Template.php b/mailpoet/lib/WooCommerce/TransactionalEmails/Template.php index 471c8ddcff..31abcff50e 100644 --- a/mailpoet/lib/WooCommerce/TransactionalEmails/Template.php +++ b/mailpoet/lib/WooCommerce/TransactionalEmails/Template.php @@ -7,7 +7,7 @@ use MailPoet\Config\Env; class Template { public function create($wcEmailSettings) { $socialIconUrl = Env::$assetsUrl . '/img/newsletter_editor/social-icons'; - return [ + return [ 'content' => [ 'type' => 'container',