Autofix number of newlines between methods

[MAILPOET-2715]
This commit is contained in:
Jan Jakeš
2020-02-17 13:08:33 +01:00
committed by Jack Kitterhing
parent 73963bd37a
commit b39dac75d6
285 changed files with 60 additions and 303 deletions

View File

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

View File

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

View File

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

View File

@ -67,5 +67,4 @@ class MP2Migrator extends APIEndpoint {
]); ]);
} }
} }
} }

View File

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

View File

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

View File

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

View File

@ -33,5 +33,4 @@ class DeferredAdminNotices {
WPFunctions::get()->deleteOption(DeferredAdminNotices::OPTIONS_KEY_NAME); WPFunctions::get()->deleteOption(DeferredAdminNotices::OPTIONS_KEY_NAME);
} }
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -25,5 +25,4 @@ class ExportFilesCleanup extends SimpleWorker {
} }
return true; return true;
} }
} }

View File

@ -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) {

View File

@ -16,7 +16,6 @@ class PremiumKeyCheck extends KeyCheckWorker {
parent::__construct(); parent::__construct();
} }
public function checkProcessingRequirements() { public function checkProcessingRequirements() {
return Bridge::isPremiumKeySpecified(); return Bridge::isPremiumKeySpecified();
} }

View File

@ -27,5 +27,4 @@ class NewsletterLinkRepository extends Repository {
->getQuery() ->getQuery()
->getOneOrNullResult(); ->getOneOrNullResult();
} }
} }

View File

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

View File

@ -53,5 +53,4 @@ class StatsNotificationsRepository extends Repository {
} }
return $query->getQuery()->getResult(); return $query->getQuery()->getResult();
} }
} }

View File

@ -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'),
]; ];
} }
} }

View File

@ -171,5 +171,4 @@ class ApiDataSanitizer {
} }
return $result; return $result;
} }
} }

View File

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

View File

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

View File

@ -22,5 +22,4 @@ trait AutoincrementedIdTrait {
public function setId($id) { public function setId($id) {
$this->id = $id; $this->id = $id;
} }
} }

View File

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

View File

@ -63,5 +63,4 @@ class AddToSubscribersFilters {
}); });
return array_merge($specialSegmentFilters, $segments); return array_merge($specialSegmentFilters, $segments);
} }
} }

View File

@ -52,5 +52,4 @@ class SendingNewslettersSubscribersFinder {
} }
return $result; return $result;
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -31,5 +31,4 @@ class Loader {
return $this->mapper->mapSegments($segments, $filters); return $this->mapper->mapSegments($segments, $filters);
} }
} }

View File

@ -29,7 +29,4 @@ class SingleSegmentLoader {
return $this->mapper->mapSegment($segment, $filters); return $this->mapper->mapSegment($segment, $filters);
} }
} }

View File

@ -34,5 +34,4 @@ class SubscribersCount {
} }
return $orm->findOne()->cnt; return $orm->findOne()->cnt;
} }
} }

View File

@ -40,5 +40,4 @@ class SubscribersIds {
} }
return $orm->findMany(); return $orm->findMany();
} }
} }

View File

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

View File

@ -41,5 +41,4 @@ class RequirementsChecker {
return $constants['SEGMENT_TYPE'] === 'woocommerce'; return $constants['SEGMENT_TYPE'] === 'woocommerce';
} }
} }

View File

@ -114,5 +114,4 @@ class FormEntity {
'deleted_at' => $this->getDeletedAt(), 'deleted_at' => $this->getDeletedAt(),
]; ];
} }
} }

View File

@ -331,7 +331,6 @@ class NewsletterEntity {
$this->gaCampaign = $gaCampaign; $this->gaCampaign = $gaCampaign;
} }
/** /**
* @param string|null $unsubscribeToken * @param string|null $unsubscribeToken
*/ */

View File

@ -46,5 +46,4 @@ class StatsNotificationEntity {
public function getTask() { public function getTask() {
return $this->task; return $this->task;
} }
} }

View File

@ -346,5 +346,4 @@ class SubscriberEntity {
public function setLinkToken($linkToken) { public function setLinkToken($linkToken) {
$this->linkToken = $linkToken; $this->linkToken = $linkToken;
} }
} }

View File

@ -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'),

View File

@ -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" />';
} }

View File

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

View File

@ -139,5 +139,4 @@ class DisplayFormInWPContent {
) return true; ) return true;
return false; return false;
} }
} }

View File

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

View File

@ -31,5 +31,4 @@ class FormsRepository extends Repository {
->getQuery() ->getQuery()
->getResult(); ->getResult();
} }
} }

View File

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

View File

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

View File

@ -82,5 +82,4 @@ class LoggerFactory {
return \MailPoetVendor\Monolog\Logger::ERROR; return \MailPoetVendor\Monolog\Logger::ERROR;
} }
} }
} }

View File

@ -100,5 +100,4 @@ class WordPressMailer extends \PHPMailer {
} }
return $result; return $result;
} }
} }

View File

@ -110,5 +110,4 @@ class DynamicSegment extends MailPoetSegment {
return ['count' => $count]; return ['count' => $count];
} }
} }

View File

@ -53,5 +53,4 @@ class DynamicSegmentFilter extends Model {
$query->deleteMany(); $query->deleteMany();
} }
} }

View File

@ -137,5 +137,4 @@ class Form extends Model {
} }
} }
} }
} }

View File

@ -10,5 +10,4 @@ class MappingToExternalEntities extends Model {
$relation->hydrate($data); $relation->hydrate($data);
return $relation->save(); return $relation->save();
} }
} }

View File

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

View File

@ -53,5 +53,4 @@ class NewsletterTemplate extends Model {
} }
return $template; return $template;
} }
} }

View File

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

View File

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

View File

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

View File

@ -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']);

View File

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

View File

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

View File

@ -69,5 +69,4 @@ class WelcomeScheduler {
); );
return $sendingTask->save(); return $sendingTask->save();
} }
} }

View File

@ -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') => [

View File

@ -73,5 +73,4 @@ class NewsletterStatistics {
'revenue' => empty($this->wooCommerceRevenue) ? null : $this->wooCommerceRevenue->asArray(), 'revenue' => empty($this->wooCommerceRevenue) ? null : $this->wooCommerceRevenue->asArray(),
]; ];
} }
} }

View File

@ -56,5 +56,4 @@ class NewsletterWooCommerceRevenue {
'formatted' => $this->getFormattedValue(), 'formatted' => $this->getFormattedValue(),
]; ];
} }
} }

View File

@ -58,5 +58,4 @@ class BulkAction {
throw new \InvalidArgumentException('No handler found for segment'); throw new \InvalidArgumentException('No handler found for segment');
} }
} }
} }

View File

@ -151,5 +151,4 @@ class SubscribersFinder {
} }
return $result; return $result;
} }
} }

View File

@ -42,5 +42,4 @@ class SubscribersListings {
} }
throw new \InvalidArgumentException('No handler found for segment'); throw new \InvalidArgumentException('No handler found for segment');
} }
} }

View File

@ -109,5 +109,4 @@ class ConfirmationEmailMailer {
return false; return false;
} }
} }
} }

View File

@ -77,5 +77,4 @@ class DefaultSubscribersGetter extends SubscribersGetter {
return $subscribers; return $subscribers;
} }
} }

View File

@ -76,5 +76,4 @@ class DynamicSubscribersGetter extends SubscribersGetter {
return $subscribers; return $subscribers;
} }
} }

View File

@ -56,5 +56,4 @@ class NewsletterClicksExporter {
'data' => $newsletterData, 'data' => $newsletterData,
]; ];
} }
} }

View File

@ -96,5 +96,4 @@ class NewslettersExporter {
} }
return $result; return $result;
} }
} }

View File

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

View File

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

View File

@ -41,5 +41,4 @@ class LinkTokens {
} }
return false; return false;
} }
} }

View File

@ -107,5 +107,4 @@ class NewSubscriberNotificationMailer {
} }
return implode(', ', $names); return implode(', ', $names);
} }
} }

View File

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

View File

@ -37,5 +37,4 @@ class Source {
$subscriber->set('source', $source); $subscriber->set('source', $source);
return $subscriber; return $subscriber;
} }
} }

View File

@ -99,5 +99,4 @@ class SubscriberActions {
return $subscriber; return $subscriber;
} }
} }

View File

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

View File

@ -155,5 +155,4 @@ class DIPanel implements IBarPanel {
echo '</div>'; echo '</div>';
} }
} }
} }

View File

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

View File

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

View File

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

View File

@ -98,5 +98,4 @@ class Helpers {
return trim($value); return trim($value);
return $value; return $value;
} }
} }

View File

@ -47,5 +47,4 @@ class AfterMigrationNotice {
\MailPoet\WP\Notice::displaySuccess($message, $extraClasses, $dataNoticeName); \MailPoet\WP\Notice::displaySuccess($message, $extraClasses, $dataNoticeName);
return $message; return $message;
} }
} }

View File

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

View File

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

View File

@ -88,5 +88,4 @@ class PermanentNotices {
break; break;
} }
} }
} }

View File

@ -100,7 +100,6 @@ if (!class_exists('ProgressBar', false)) {
public function deleteProgressFile() { public function deleteProgressFile() {
unlink($this->filename); unlink($this->filename);
} }
} }
} }

View File

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

View File

@ -682,5 +682,4 @@ class Functions {
return [$host, $port, $socket, $isIpv6]; return [$host, $port, $socket, $isIpv6];
} }
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -34,5 +34,4 @@ class DynamicSegment extends Segment {
$saver->save($dynamicSegment); $saver->save($dynamicSegment);
return $dynamicSegment; return $dynamicSegment;
} }
} }

View File

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