Autofix number of newlines between methods
[MAILPOET-2715]
This commit is contained in:
committed by
Jack Kitterhing
parent
73963bd37a
commit
b39dac75d6
@ -6,7 +6,6 @@ use MailPoet\DI\ContainerWrapper;
|
|||||||
use MailPoetVendor\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
use MailPoetVendor\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||||
|
|
||||||
class API {
|
class API {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $version
|
* @param string $version
|
||||||
* @return \MailPoet\API\MP\v1\API
|
* @return \MailPoet\API\MP\v1\API
|
||||||
|
@ -41,7 +41,6 @@ class API {
|
|||||||
|
|
||||||
const CURRENT_VERSION = 'v1';
|
const CURRENT_VERSION = 'v1';
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
ContainerInterface $container,
|
ContainerInterface $container,
|
||||||
AccessControl $accessControl,
|
AccessControl $accessControl,
|
||||||
|
@ -5,7 +5,6 @@ namespace MailPoet\API\JSON\ResponseBuilders;
|
|||||||
use MailPoet\Entities\CustomFieldEntity;
|
use MailPoet\Entities\CustomFieldEntity;
|
||||||
|
|
||||||
class CustomFieldsResponseBuilder {
|
class CustomFieldsResponseBuilder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param CustomFieldEntity[] $customFields
|
* @param CustomFieldEntity[] $customFields
|
||||||
* @return array
|
* @return array
|
||||||
|
@ -67,5 +67,4 @@ class MP2Migrator extends APIEndpoint {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,5 +16,4 @@ class NewsletterLinks extends APIEndpoint {
|
|||||||
$links = NewsletterLink::select(['id', 'url'])->where('newsletter_id', $data['newsletterId'])->findArray();
|
$links = NewsletterLink::select(['id', 'url'])->where('newsletter_id', $data['newsletterId'])->findArray();
|
||||||
return $this->successResponse($links);
|
return $this->successResponse($links);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -95,5 +95,4 @@ class Analytics {
|
|||||||
private function recordDataSent() {
|
private function recordDataSent() {
|
||||||
$this->settings->set(Analytics::SETTINGS_LAST_SENT_KEY, Carbon::now());
|
$this->settings->set(Analytics::SETTINGS_LAST_SENT_KEY, Carbon::now());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -59,5 +59,4 @@ class DeactivationSurvey {
|
|||||||
// if the website fails to render we have other places to catch and display the error
|
// if the website fails to render we have other places to catch and display the error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,4 @@ class DeferredAdminNotices {
|
|||||||
WPFunctions::get()->deleteOption(DeferredAdminNotices::OPTIONS_KEY_NAME);
|
WPFunctions::get()->deleteOption(DeferredAdminNotices::OPTIONS_KEY_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,6 @@ class MP2Migrator {
|
|||||||
private $mp2UserTable;
|
private $mp2UserTable;
|
||||||
private $mp2UserListTable;
|
private $mp2UserListTable;
|
||||||
|
|
||||||
|
|
||||||
public function __construct(SettingsController $settings, Activator $activator) {
|
public function __construct(SettingsController $settings, Activator $activator) {
|
||||||
$this->defineMP2Tables();
|
$this->defineMP2Tables();
|
||||||
$logFilename = 'mp2migration.log';
|
$logFilename = 'mp2migration.log';
|
||||||
|
@ -6,7 +6,6 @@ use MailPoet\Subscribers\SubscriberPersonalDataEraser;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class PersonalDataErasers {
|
class PersonalDataErasers {
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
WPFunctions::get()->addFilter('wp_privacy_personal_data_erasers', [$this, 'registerSubscriberEraser']);
|
WPFunctions::get()->addFilter('wp_privacy_personal_data_erasers', [$this, 'registerSubscriberEraser']);
|
||||||
}
|
}
|
||||||
@ -19,5 +18,4 @@ class PersonalDataErasers {
|
|||||||
|
|
||||||
return $erasers;
|
return $erasers;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SubscriberExporter;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class PersonalDataExporters {
|
class PersonalDataExporters {
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerSubscriberExporter']);
|
WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerSubscriberExporter']);
|
||||||
WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerSegmentsExporter']);
|
WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerSegmentsExporter']);
|
||||||
@ -48,5 +47,4 @@ class PersonalDataExporters {
|
|||||||
];
|
];
|
||||||
return $exporters;
|
return $exporters;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ use MailPoet\WooCommerce\Helper as WooCommerceHelper;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class PrivacyPolicy {
|
class PrivacyPolicy {
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
if (function_exists('wp_add_privacy_policy_content')) {
|
if (function_exists('wp_add_privacy_policy_content')) {
|
||||||
wp_add_privacy_policy_content(__('MailPoet', 'mailpoet'), $this->getPrivacyPolicyContent());
|
wp_add_privacy_policy_content(__('MailPoet', 'mailpoet'), $this->getPrivacyPolicyContent());
|
||||||
@ -66,5 +65,4 @@ class PrivacyPolicy {
|
|||||||
}
|
}
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,4 @@ class ExportFilesCleanup extends SimpleWorker {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ class InactiveSubscribers extends SimpleWorker {
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function processTaskStrategy(ScheduledTask $task, $timer) {
|
public function processTaskStrategy(ScheduledTask $task, $timer) {
|
||||||
$trackingEnabled = (bool)$this->settings->get('tracking.enabled');
|
$trackingEnabled = (bool)$this->settings->get('tracking.enabled');
|
||||||
if (!$trackingEnabled) {
|
if (!$trackingEnabled) {
|
||||||
|
@ -16,7 +16,6 @@ class PremiumKeyCheck extends KeyCheckWorker {
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function checkProcessingRequirements() {
|
public function checkProcessingRequirements() {
|
||||||
return Bridge::isPremiumKeySpecified();
|
return Bridge::isPremiumKeySpecified();
|
||||||
}
|
}
|
||||||
|
@ -27,5 +27,4 @@ class NewsletterLinkRepository extends Repository {
|
|||||||
->getQuery()
|
->getQuery()
|
||||||
->getOneOrNullResult();
|
->getOneOrNullResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -101,5 +101,4 @@ class Scheduler {
|
|||||||
$date->addHours(self::HOURS_TO_SEND_AFTER_NEWSLETTER);
|
$date->addHours(self::HOURS_TO_SEND_AFTER_NEWSLETTER);
|
||||||
return $date;
|
return $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,5 +53,4 @@ class StatsNotificationsRepository extends Repository {
|
|||||||
}
|
}
|
||||||
return $query->getQuery()->getResult();
|
return $query->getQuery()->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -169,5 +169,4 @@ class Worker {
|
|||||||
'[link:newsletter_view_in_browser_url]' => __('View in browser link', 'mailpoet'),
|
'[link:newsletter_view_in_browser_url]' => __('View in browser link', 'mailpoet'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -171,5 +171,4 @@ class ApiDataSanitizer {
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ use MailPoetVendor\Symfony\Component\DependencyInjection\ContainerBuilder;
|
|||||||
use MailPoetVendor\Symfony\Component\DependencyInjection\Reference;
|
use MailPoetVendor\Symfony\Component\DependencyInjection\Reference;
|
||||||
|
|
||||||
class ContainerConfigurator implements IContainerConfigurator {
|
class ContainerConfigurator implements IContainerConfigurator {
|
||||||
|
|
||||||
public function getDumpNamespace() {
|
public function getDumpNamespace() {
|
||||||
return 'MailPoetGenerated';
|
return 'MailPoetGenerated';
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,8 @@ interface IContainerConfigurator {
|
|||||||
const PREMIUM_CONTAINER_SERVICE_SLUG = 'premium_container';
|
const PREMIUM_CONTAINER_SERVICE_SLUG = 'premium_container';
|
||||||
|
|
||||||
public function configure(ContainerBuilder $container);
|
public function configure(ContainerBuilder $container);
|
||||||
|
|
||||||
public function getDumpNamespace();
|
public function getDumpNamespace();
|
||||||
|
|
||||||
public function getDumpClassname();
|
public function getDumpClassname();
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,4 @@ trait AutoincrementedIdTrait {
|
|||||||
public function setId($id) {
|
public function setId($id) {
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,7 @@ namespace MailPoet\DynamicSegments\Filters;
|
|||||||
use MailPoetVendor\Idiorm\ORM;
|
use MailPoetVendor\Idiorm\ORM;
|
||||||
|
|
||||||
interface Filter {
|
interface Filter {
|
||||||
|
|
||||||
public function toSql(ORM $orm);
|
public function toSql(ORM $orm);
|
||||||
|
|
||||||
public function toArray();
|
public function toArray();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,5 +63,4 @@ class AddToSubscribersFilters {
|
|||||||
});
|
});
|
||||||
return array_merge($specialSegmentFilters, $segments);
|
return array_merge($specialSegmentFilters, $segments);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -52,5 +52,4 @@ class SendingNewslettersSubscribersFinder {
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ use MailPoet\Listing\Handler;
|
|||||||
use MailPoet\Models\DynamicSegment;
|
use MailPoet\Models\DynamicSegment;
|
||||||
|
|
||||||
class SubscribersBulkActionHandler {
|
class SubscribersBulkActionHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $segment
|
* @param array $segment
|
||||||
* @param array $data
|
* @param array $data
|
||||||
@ -22,5 +21,4 @@ class SubscribersBulkActionHandler {
|
|||||||
return $bulkAction->apply('\MailPoet\Models\SubscribersInDynamicSegment', $data);
|
return $bulkAction->apply('\MailPoet\Models\SubscribersInDynamicSegment', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ use MailPoet\Models\DynamicSegment;
|
|||||||
use MailPoet\Models\Segment;
|
use MailPoet\Models\Segment;
|
||||||
|
|
||||||
class SubscribersListingsHandlerFactory {
|
class SubscribersListingsHandlerFactory {
|
||||||
|
|
||||||
public function get(Segment $segment, $data) {
|
public function get(Segment $segment, $data) {
|
||||||
if ($segment->type === DynamicSegment::TYPE_DYNAMIC) {
|
if ($segment->type === DynamicSegment::TYPE_DYNAMIC) {
|
||||||
$listing = new Handler();
|
$listing = new Handler();
|
||||||
|
@ -12,7 +12,6 @@ use MailPoet\Models\DynamicSegment;
|
|||||||
use MailPoet\Models\DynamicSegmentFilter;
|
use MailPoet\Models\DynamicSegmentFilter;
|
||||||
|
|
||||||
class DBMapper {
|
class DBMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param DynamicSegment $segmentData
|
* @param DynamicSegment $segmentData
|
||||||
* @param DynamicSegmentFilter[] $filtersData
|
* @param DynamicSegmentFilter[] $filtersData
|
||||||
@ -82,5 +81,4 @@ class DBMapper {
|
|||||||
}
|
}
|
||||||
return $data['segmentType'];
|
return $data['segmentType'];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ use MailPoet\DynamicSegments\Filters\WooCommerceProduct;
|
|||||||
use MailPoet\Models\DynamicSegment;
|
use MailPoet\Models\DynamicSegment;
|
||||||
|
|
||||||
class FormDataMapper {
|
class FormDataMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
@ -116,5 +115,4 @@ class FormDataMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,4 @@ class Loader {
|
|||||||
|
|
||||||
return $this->mapper->mapSegments($segments, $filters);
|
return $this->mapper->mapSegments($segments, $filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,4 @@ class SingleSegmentLoader {
|
|||||||
|
|
||||||
return $this->mapper->mapSegment($segment, $filters);
|
return $this->mapper->mapSegment($segment, $filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,5 +34,4 @@ class SubscribersCount {
|
|||||||
}
|
}
|
||||||
return $orm->findOne()->cnt;
|
return $orm->findOne()->cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,5 +40,4 @@ class SubscribersIds {
|
|||||||
}
|
}
|
||||||
return $orm->findMany();
|
return $orm->findMany();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ use MailPoet\Models\Model;
|
|||||||
use MailPoetVendor\Idiorm\ORM;
|
use MailPoetVendor\Idiorm\ORM;
|
||||||
|
|
||||||
class Saver {
|
class Saver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param DynamicSegment $segment
|
* @param DynamicSegment $segment
|
||||||
*
|
*
|
||||||
|
@ -41,5 +41,4 @@ class RequirementsChecker {
|
|||||||
|
|
||||||
return $constants['SEGMENT_TYPE'] === 'woocommerce';
|
return $constants['SEGMENT_TYPE'] === 'woocommerce';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -114,5 +114,4 @@ class FormEntity {
|
|||||||
'deleted_at' => $this->getDeletedAt(),
|
'deleted_at' => $this->getDeletedAt(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,6 @@ class NewsletterEntity {
|
|||||||
$this->gaCampaign = $gaCampaign;
|
$this->gaCampaign = $gaCampaign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string|null $unsubscribeToken
|
* @param string|null $unsubscribeToken
|
||||||
*/
|
*/
|
||||||
|
@ -46,5 +46,4 @@ class StatsNotificationEntity {
|
|||||||
public function getTask() {
|
public function getTask() {
|
||||||
return $this->task;
|
return $this->task;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -346,5 +346,4 @@ class SubscriberEntity {
|
|||||||
public function setLinkToken($linkToken) {
|
public function setLinkToken($linkToken) {
|
||||||
$this->linkToken = $linkToken;
|
$this->linkToken = $linkToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,7 @@ class Date {
|
|||||||
'month' => ['MM'],
|
'month' => ['MM'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMonthNames(): array {
|
public function getMonthNames(): array {
|
||||||
return [__('January', 'mailpoet'), __('February', 'mailpoet'), __('March', 'mailpoet'), __('April', 'mailpoet'),
|
return [__('January', 'mailpoet'), __('February', 'mailpoet'), __('March', 'mailpoet'), __('April', 'mailpoet'),
|
||||||
__('May', 'mailpoet'), __('June', 'mailpoet'), __('July', 'mailpoet'), __('August', 'mailpoet'), __('September', 'mailpoet'),
|
__('May', 'mailpoet'), __('June', 'mailpoet'), __('July', 'mailpoet'), __('August', 'mailpoet'), __('September', 'mailpoet'),
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace MailPoet\Form\Block;
|
namespace MailPoet\Form\Block;
|
||||||
|
|
||||||
class Divider {
|
class Divider {
|
||||||
|
|
||||||
public function render(): string {
|
public function render(): string {
|
||||||
return '<hr class="mailpoet_divider" />';
|
return '<hr class="mailpoet_divider" />';
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace MailPoet\Form\Block;
|
namespace MailPoet\Form\Block;
|
||||||
|
|
||||||
class Html {
|
class Html {
|
||||||
|
|
||||||
public function render(array $block): string {
|
public function render(array $block): string {
|
||||||
$html = '';
|
$html = '';
|
||||||
$text = '';
|
$text = '';
|
||||||
|
@ -139,5 +139,4 @@ class DisplayFormInWPContent {
|
|||||||
) return true;
|
) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ namespace MailPoet\Form;
|
|||||||
use MailPoet\Models\Form;
|
use MailPoet\Models\Form;
|
||||||
|
|
||||||
class FormFactory {
|
class FormFactory {
|
||||||
|
|
||||||
/** @return Form */
|
/** @return Form */
|
||||||
public function createEmptyForm() {
|
public function createEmptyForm() {
|
||||||
$data = [
|
$data = [
|
||||||
@ -41,5 +40,4 @@ class FormFactory {
|
|||||||
];
|
];
|
||||||
return Form::createOrUpdate($data);
|
return Form::createOrUpdate($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,4 @@ class FormsRepository extends Repository {
|
|||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult();
|
->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,5 +46,4 @@ class FieldNameObfuscator {
|
|||||||
private function wasFieldObfuscated($name) {
|
private function wasFieldObfuscated($name) {
|
||||||
return strpos($name, FieldNameObfuscator::OBFUSCATED_FIELD_PREFIX) === 0;
|
return strpos($name, FieldNameObfuscator::OBFUSCATED_FIELD_PREFIX) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,5 +57,4 @@ class LogHandler extends AbstractProcessingHandler {
|
|||||||
Log::whereLt('created_at', Carbon::create()->subDays(self::DAYS_TO_KEEP_LOGS)->toDateTimeString())
|
Log::whereLt('created_at', Carbon::create()->subDays(self::DAYS_TO_KEEP_LOGS)->toDateTimeString())
|
||||||
->deleteMany();
|
->deleteMany();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -82,5 +82,4 @@ class LoggerFactory {
|
|||||||
return \MailPoetVendor\Monolog\Logger::ERROR;
|
return \MailPoetVendor\Monolog\Logger::ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -100,5 +100,4 @@ class WordPressMailer extends \PHPMailer {
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -110,5 +110,4 @@ class DynamicSegment extends MailPoetSegment {
|
|||||||
|
|
||||||
return ['count' => $count];
|
return ['count' => $count];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,5 +53,4 @@ class DynamicSegmentFilter extends Model {
|
|||||||
$query->deleteMany();
|
$query->deleteMany();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -137,5 +137,4 @@ class Form extends Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,4 @@ class MappingToExternalEntities extends Model {
|
|||||||
$relation->hydrate($data);
|
$relation->hydrate($data);
|
||||||
return $relation->save();
|
return $relation->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -647,7 +647,6 @@ class Newsletter extends Model {
|
|||||||
return ((int)$queue->count) > 0;
|
return ((int)$queue->count) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function getAnalytics() {
|
public static function getAnalytics() {
|
||||||
$welcomeNewslettersCount = Newsletter::getPublished()
|
$welcomeNewslettersCount = Newsletter::getPublished()
|
||||||
->filter('filterType', self::TYPE_WELCOME)
|
->filter('filterType', self::TYPE_WELCOME)
|
||||||
|
@ -53,5 +53,4 @@ class NewsletterTemplate extends Model {
|
|||||||
}
|
}
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ use MailPoet\DynamicSegments\RequirementsChecker;
|
|||||||
use MailPoet\WooCommerce\Helper as WooCommerceHelper;
|
use MailPoet\WooCommerce\Helper as WooCommerceHelper;
|
||||||
|
|
||||||
class SubscribersInDynamicSegment extends Subscriber {
|
class SubscribersInDynamicSegment extends Subscriber {
|
||||||
|
|
||||||
public static function listingQuery(array $data = []) {
|
public static function listingQuery(array $data = []) {
|
||||||
$query = self::select(self::$_table . '.*');
|
$query = self::select(self::$_table . '.*');
|
||||||
$singleSegmentLoader = new SingleSegmentLoader(new DBMapper());
|
$singleSegmentLoader = new SingleSegmentLoader(new DBMapper());
|
||||||
@ -32,6 +31,4 @@ class SubscribersInDynamicSegment extends Subscriber {
|
|||||||
$requirementsChecker = new RequirementsChecker(new WooCommerceHelper());
|
$requirementsChecker = new RequirementsChecker(new WooCommerceHelper());
|
||||||
return $requirementsChecker->shouldSkipSegment($dynamicSegment);
|
return $requirementsChecker->shouldSkipSegment($dynamicSegment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ namespace MailPoet\Newsletter\Editor;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class MetaInformationManager {
|
class MetaInformationManager {
|
||||||
|
|
||||||
public function appendMetaInformation($content, $post, $args) {
|
public function appendMetaInformation($content, $post, $args) {
|
||||||
// Append author and categories above and below contents
|
// Append author and categories above and below contents
|
||||||
foreach (['above', 'below'] as $position) {
|
foreach (['above', 'below'] as $position) {
|
||||||
@ -37,7 +36,6 @@ class MetaInformationManager {
|
|||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static function getPostCategories($postId, $postType, $precededBy) {
|
private static function getPostCategories($postId, $postType, $precededBy) {
|
||||||
$precededBy = trim($precededBy);
|
$precededBy = trim($precededBy);
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ use pQuery;
|
|||||||
use pQuery\DomNode;
|
use pQuery\DomNode;
|
||||||
|
|
||||||
class StructureTransformer {
|
class StructureTransformer {
|
||||||
|
|
||||||
public function transform($content, $imageFullWidth) {
|
public function transform($content, $imageFullWidth) {
|
||||||
$root = pQuery::parseStr($content);
|
$root = pQuery::parseStr($content);
|
||||||
|
|
||||||
@ -129,5 +128,4 @@ class StructureTransformer {
|
|||||||
|
|
||||||
return $updatedStructure;
|
return $updatedStructure;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ namespace MailPoet\Newsletter\Renderer\Columns;
|
|||||||
use MailPoet\Newsletter\Renderer\EscapeHelper as EHelper;
|
use MailPoet\Newsletter\Renderer\EscapeHelper as EHelper;
|
||||||
|
|
||||||
class Renderer {
|
class Renderer {
|
||||||
|
|
||||||
public function render($contentBlock, $columnsData) {
|
public function render($contentBlock, $columnsData) {
|
||||||
|
|
||||||
$columnsCount = count($contentBlock['blocks']);
|
$columnsCount = count($contentBlock['blocks']);
|
||||||
|
@ -9,7 +9,6 @@ use MailPoet\Models\SendingQueue;
|
|||||||
use MailPoet\Tasks\Sending as SendingTask;
|
use MailPoet\Tasks\Sending as SendingTask;
|
||||||
|
|
||||||
class AutomaticEmailScheduler {
|
class AutomaticEmailScheduler {
|
||||||
|
|
||||||
public function scheduleAutomaticEmail($group, $event, $schedulingCondition = false, $subscriberId = false, $meta = false) {
|
public function scheduleAutomaticEmail($group, $event, $schedulingCondition = false, $subscriberId = false, $meta = false) {
|
||||||
$newsletters = Scheduler::getNewsletters(Newsletter::TYPE_AUTOMATIC, $group);
|
$newsletters = Scheduler::getNewsletters(Newsletter::TYPE_AUTOMATIC, $group);
|
||||||
if (empty($newsletters)) return false;
|
if (empty($newsletters)) return false;
|
||||||
@ -102,5 +101,4 @@ class AutomaticEmailScheduler {
|
|||||||
$task->scheduledAt = Scheduler::getScheduledTimeWithDelay($newsletter->afterTimeType, $newsletter->afterTimeNumber);
|
$task->scheduledAt = Scheduler::getScheduledTimeWithDelay($newsletter->afterTimeType, $newsletter->afterTimeNumber);
|
||||||
$task->save();
|
$task->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ use MailPoet\WP\Functions as WPFunctions;
|
|||||||
use MailPoetVendor\Carbon\Carbon;
|
use MailPoetVendor\Carbon\Carbon;
|
||||||
|
|
||||||
class Scheduler {
|
class Scheduler {
|
||||||
|
|
||||||
public static function getNextRunDate($schedule, $fromTimestamp = false) {
|
public static function getNextRunDate($schedule, $fromTimestamp = false) {
|
||||||
$wp = new WPFunctions();
|
$wp = new WPFunctions();
|
||||||
$fromTimestamp = ($fromTimestamp) ? $fromTimestamp : $wp->currentTime('timestamp');
|
$fromTimestamp = ($fromTimestamp) ? $fromTimestamp : $wp->currentTime('timestamp');
|
||||||
|
@ -69,5 +69,4 @@ class WelcomeScheduler {
|
|||||||
);
|
);
|
||||||
return $sendingTask->save();
|
return $sendingTask->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ use MailPoet\Models\NewsletterLink;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class ShortcodesHelper {
|
class ShortcodesHelper {
|
||||||
|
|
||||||
public static function getShortcodes() {
|
public static function getShortcodes() {
|
||||||
$shortcodes = [
|
$shortcodes = [
|
||||||
WPFunctions::get()->__('Subscriber', 'mailpoet') => [
|
WPFunctions::get()->__('Subscriber', 'mailpoet') => [
|
||||||
|
@ -73,5 +73,4 @@ class NewsletterStatistics {
|
|||||||
'revenue' => empty($this->wooCommerceRevenue) ? null : $this->wooCommerceRevenue->asArray(),
|
'revenue' => empty($this->wooCommerceRevenue) ? null : $this->wooCommerceRevenue->asArray(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,5 +56,4 @@ class NewsletterWooCommerceRevenue {
|
|||||||
'formatted' => $this->getFormattedValue(),
|
'formatted' => $this->getFormattedValue(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -58,5 +58,4 @@ class BulkAction {
|
|||||||
throw new \InvalidArgumentException('No handler found for segment');
|
throw new \InvalidArgumentException('No handler found for segment');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -151,5 +151,4 @@ class SubscribersFinder {
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,5 +42,4 @@ class SubscribersListings {
|
|||||||
}
|
}
|
||||||
throw new \InvalidArgumentException('No handler found for segment');
|
throw new \InvalidArgumentException('No handler found for segment');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,5 +109,4 @@ class ConfirmationEmailMailer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -77,5 +77,4 @@ class DefaultSubscribersGetter extends SubscribersGetter {
|
|||||||
|
|
||||||
return $subscribers;
|
return $subscribers;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -76,5 +76,4 @@ class DynamicSubscribersGetter extends SubscribersGetter {
|
|||||||
|
|
||||||
return $subscribers;
|
return $subscribers;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,5 +56,4 @@ class NewsletterClicksExporter {
|
|||||||
'data' => $newsletterData,
|
'data' => $newsletterData,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -96,5 +96,4 @@ class NewslettersExporter {
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ use MailPoet\Models\Subscriber;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class SegmentsExporter {
|
class SegmentsExporter {
|
||||||
|
|
||||||
public function export($email) {
|
public function export($email) {
|
||||||
return [
|
return [
|
||||||
'data' => $this->exportSubscriber(Subscriber::findOne(trim($email))),
|
'data' => $this->exportSubscriber(Subscriber::findOne(trim($email))),
|
||||||
@ -48,6 +47,4 @@ class SegmentsExporter {
|
|||||||
'data' => $segmentData,
|
'data' => $segmentData,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ use MailPoet\Subscribers\Source;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class SubscriberExporter {
|
class SubscriberExporter {
|
||||||
|
|
||||||
public function export($email) {
|
public function export($email) {
|
||||||
return [
|
return [
|
||||||
'data' => $this->exportSubscriber(Subscriber::findOne(trim($email))),
|
'data' => $this->exportSubscriber(Subscriber::findOne(trim($email))),
|
||||||
@ -106,5 +105,4 @@ class SubscriberExporter {
|
|||||||
return WPFunctions::get()->__('Unknown', 'mailpoet');
|
return WPFunctions::get()->__('Unknown', 'mailpoet');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,5 +41,4 @@ class LinkTokens {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -107,5 +107,4 @@ class NewSubscriberNotificationMailer {
|
|||||||
}
|
}
|
||||||
return implode(', ', $names);
|
return implode(', ', $names);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ use MailPoet\Models\Form;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class RequiredCustomFieldValidator {
|
class RequiredCustomFieldValidator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @param Form|null $form
|
* @param Form|null $form
|
||||||
@ -74,5 +73,4 @@ class RequiredCustomFieldValidator {
|
|||||||
}
|
}
|
||||||
return $customFieldIds;
|
return $customFieldIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,5 +37,4 @@ class Source {
|
|||||||
$subscriber->set('source', $source);
|
$subscriber->set('source', $source);
|
||||||
return $subscriber;
|
return $subscriber;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -99,5 +99,4 @@ class SubscriberActions {
|
|||||||
|
|
||||||
return $subscriber;
|
return $subscriber;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ use MailPoet\Models\Subscriber;
|
|||||||
use MailPoet\Models\SubscriberCustomField;
|
use MailPoet\Models\SubscriberCustomField;
|
||||||
|
|
||||||
class SubscriberPersonalDataEraser {
|
class SubscriberPersonalDataEraser {
|
||||||
|
|
||||||
public function erase($email) {
|
public function erase($email) {
|
||||||
if (empty($email)) {
|
if (empty($email)) {
|
||||||
return [
|
return [
|
||||||
@ -51,5 +50,4 @@ class SubscriberPersonalDataEraser {
|
|||||||
$subscriber->confirmedIp = '0.0.0.0';
|
$subscriber->confirmedIp = '0.0.0.0';
|
||||||
$subscriber->save();
|
$subscriber->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -155,5 +155,4 @@ class DIPanel implements IBarPanel {
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ use MailPoetVendor\Twig\Extension\AbstractExtension;
|
|||||||
use MailPoetVendor\Twig\TwigFilter;
|
use MailPoetVendor\Twig\TwigFilter;
|
||||||
|
|
||||||
class Filters extends AbstractExtension {
|
class Filters extends AbstractExtension {
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
return 'filters';
|
return 'filters';
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ namespace MailPoet\Util;
|
|||||||
use pQuery\DomNode;
|
use pQuery\DomNode;
|
||||||
|
|
||||||
class DOM {
|
class DOM {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Splits a DOM tree around the cut element, bringing it up to bound
|
* Splits a DOM tree around the cut element, bringing it up to bound
|
||||||
* ancestor and splitting left and right siblings into subtrees along
|
* ancestor and splitting left and right siblings into subtrees along
|
||||||
@ -38,5 +37,4 @@ class DOM {
|
|||||||
}
|
}
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -58,5 +58,4 @@ class FreeDomains {
|
|||||||
$domain = end($emailParts);
|
$domain = end($emailParts);
|
||||||
return in_array($domain, self::FREE_DOMAINS);
|
return in_array($domain, self::FREE_DOMAINS);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -98,5 +98,4 @@ class Helpers {
|
|||||||
return trim($value);
|
return trim($value);
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,5 +47,4 @@ class AfterMigrationNotice {
|
|||||||
\MailPoet\WP\Notice::displaySuccess($message, $extraClasses, $dataNoticeName);
|
\MailPoet\WP\Notice::displaySuccess($message, $extraClasses, $dataNoticeName);
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,5 +39,4 @@ class BlackFridayNotice {
|
|||||||
public function disable() {
|
public function disable() {
|
||||||
WPFunctions::get()->setTransient(self::OPTION_NAME, true, self::DISMISS_NOTICE_TIMEOUT_SECONDS);
|
WPFunctions::get()->setTransient(self::OPTION_NAME, true, self::DISMISS_NOTICE_TIMEOUT_SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,5 +40,4 @@ class PHPVersionWarnings {
|
|||||||
public function disable() {
|
public function disable() {
|
||||||
WPFunctions::get()->setTransient(self::OPTION_NAME, true, self::DISMISS_NOTICE_TIMEOUT_SECONDS);
|
WPFunctions::get()->setTransient(self::OPTION_NAME, true, self::DISMISS_NOTICE_TIMEOUT_SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -88,5 +88,4 @@ class PermanentNotices {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,6 @@ if (!class_exists('ProgressBar', false)) {
|
|||||||
public function deleteProgressFile() {
|
public function deleteProgressFile() {
|
||||||
unlink($this->filename);
|
unlink($this->filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace MailPoet\Util;
|
namespace MailPoet\Util;
|
||||||
|
|
||||||
class SecondLevelDomainNames {
|
class SecondLevelDomainNames {
|
||||||
|
|
||||||
public function get($host) {
|
public function get($host) {
|
||||||
if (preg_match('/[^.]*\.[^.]{2,3}(?:\.[^.]{2,3})?$/', $host, $matches)) {
|
if (preg_match('/[^.]*\.[^.]{2,3}(?:\.[^.]{2,3})?$/', $host, $matches)) {
|
||||||
return $matches[0];
|
return $matches[0];
|
||||||
|
@ -682,5 +682,4 @@ class Functions {
|
|||||||
return [$host, $port, $socket, $isIpv6];
|
return [$host, $port, $socket, $isIpv6];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ namespace MailPoet\WP;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class Posts {
|
class Posts {
|
||||||
|
|
||||||
public static function getTerms($args) {
|
public static function getTerms($args) {
|
||||||
// Since WordPress 4.5.0 signature of get_terms changed to require
|
// Since WordPress 4.5.0 signature of get_terms changed to require
|
||||||
// one argument array, where taxonomy is key of that array
|
// one argument array, where taxonomy is key of that array
|
||||||
@ -25,5 +24,4 @@ class Posts {
|
|||||||
$args = array_merge($defaults, $args);
|
$args = array_merge($defaults, $args);
|
||||||
return WPFunctions::get()->getPostTypes($args, $output, $operator);
|
return WPFunctions::get()->getPostTypes($args, $output, $operator);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace MailPoet\WooCommerce;
|
namespace MailPoet\WooCommerce;
|
||||||
|
|
||||||
class Helper {
|
class Helper {
|
||||||
|
|
||||||
public function isWooCommerceActive() {
|
public function isWooCommerceActive() {
|
||||||
return class_exists('WooCommerce');
|
return class_exists('WooCommerce');
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ if (WP_DEBUG && PHP_VERSION_ID >= 70100 && file_exists($tracyPath)) {
|
|||||||
$tracyScriptHtml .= "<script>window.TracyMaxAjaxRows = $maxAjaxRows;</script>\n";
|
$tracyScriptHtml .= "<script>window.TracyMaxAjaxRows = $maxAjaxRows;</script>\n";
|
||||||
echo $tracyScriptHtml;
|
echo $tracyScriptHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action('admin_enqueue_scripts', 'render_tracy', PHP_INT_MAX, 0);
|
add_action('admin_enqueue_scripts', 'render_tracy', PHP_INT_MAX, 0);
|
||||||
session_start();
|
session_start();
|
||||||
Debugger::enable(Debugger::DEVELOPMENT);
|
Debugger::enable(Debugger::DEVELOPMENT);
|
||||||
|
@ -12,7 +12,6 @@ use PHPStan\Type\ObjectType;
|
|||||||
use PHPStan\Type\Type;
|
use PHPStan\Type\Type;
|
||||||
|
|
||||||
class StubDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension {
|
class StubDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension {
|
||||||
|
|
||||||
public function getClass(): string {
|
public function getClass(): string {
|
||||||
return Stub::class;
|
return Stub::class;
|
||||||
}
|
}
|
||||||
|
@ -34,5 +34,4 @@ class DynamicSegment extends Segment {
|
|||||||
$saver->save($dynamicSegment);
|
$saver->save($dynamicSegment);
|
||||||
return $dynamicSegment;
|
return $dynamicSegment;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -44,5 +44,4 @@ class Segment {
|
|||||||
public function create() {
|
public function create() {
|
||||||
return \MailPoet\Models\Segment::createOrUpdate($this->data);
|
return \MailPoet\Models\Segment::createOrUpdate($this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user