diff --git a/lib/API/JSON/API.php b/lib/API/JSON/API.php index f2b6da90e1..e1717a0026 100644 --- a/lib/API/JSON/API.php +++ b/lib/API/JSON/API.php @@ -95,7 +95,7 @@ class API { } function setRequestData($data) { - $this->_request_api_version = !empty($data['api_version']) ? $data['api_version']: false; + $this->_request_api_version = !empty($data['api_version']) ? $data['api_version'] : false; $this->_request_endpoint = isset($data['endpoint']) ? Helpers::underscoreToCamelCase(trim($data['endpoint'])) diff --git a/lib/Analytics/Reporter.php b/lib/Analytics/Reporter.php index 53f53745e4..762aa3aa56 100644 --- a/lib/Analytics/Reporter.php +++ b/lib/Analytics/Reporter.php @@ -50,7 +50,7 @@ class Reporter { 'users_can_register' => WPFunctions::get()->getOption('users_can_register') ? 'yes' : 'no', 'MailPoet Free version' => MAILPOET_VERSION, 'MailPoet Premium version' => (defined('MAILPOET_PREMIUM_VERSION')) ? MAILPOET_PREMIUM_VERSION : 'N/A', - 'Total number of subscribers' => Subscriber::getTotalSubscribers(), + 'Total number of subscribers' => Subscriber::getTotalSubscribers(), 'Sending Method' => isset($mta['method']) ? $mta['method'] : null, 'Date of plugin installation' => $this->settings->get('installed_at'), 'Subscribe in comments' => (boolean)$this->settings->get('subscribe.on_comment.enabled', false), diff --git a/lib/Config/MP2Migrator.php b/lib/Config/MP2Migrator.php index 08306535e2..7311b2b3b7 100644 --- a/lib/Config/MP2Migrator.php +++ b/lib/Config/MP2Migrator.php @@ -1077,7 +1077,7 @@ class MP2Migrator { $sending_emails_number = isset($options['sending_emails_number']) ? $options['sending_emails_number'] : ''; $sending_emails_each = isset($options['sending_emails_each']) ? $options['sending_emails_each'] : ''; $mta['frequency']['emails'] = $this->mapFrequencyEmails($sending_emails_number, $sending_emails_each); - $mta['frequency']['interval'] = $this->mapFrequencyInterval($sending_emails_each); + $mta['frequency']['interval'] = $this->mapFrequencyInterval($sending_emails_each); $mta['host'] = isset($options['smtp_host']) ? $options['smtp_host'] : ''; $mta['port'] = isset($options['smtp_port']) ? $options['smtp_port'] : ''; $mta['login'] = isset($options['smtp_login']) ? $options['smtp_login'] : ''; diff --git a/lib/Config/Menu.php b/lib/Config/Menu.php index cd2be8938f..d3429bbe33 100644 --- a/lib/Config/Menu.php +++ b/lib/Config/Menu.php @@ -655,9 +655,9 @@ class Menu { $data['segments'] = $segments; $data['settings'] = $this->settings->getAll(); $data['mss_active'] = Bridge::isMPSendingServiceEnabled(); - $data['current_wp_user'] = $this->wp->wpGetCurrentUser()->to_array(); - $data['current_wp_user_firstname'] = $this->wp->wpGetCurrentUser()->user_firstname; - $data['site_url'] = $this->wp->siteUrl(); + $data['current_wp_user'] = $this->wp->wpGetCurrentUser()->to_array(); + $data['current_wp_user_firstname'] = $this->wp->wpGetCurrentUser()->user_firstname; + $data['site_url'] = $this->wp->siteUrl(); $data['roles'] = $wp_roles->get_names(); $data['roles']['mailpoet_all'] = $this->wp->__('In any WordPress role', 'mailpoet'); @@ -673,7 +673,7 @@ class Menu { 24 ); $data['mailpoet_main_page'] = $this->wp->adminUrl('admin.php?page=' . self::MAIN_PAGE_SLUG); - $data['show_congratulate_after_first_newsletter'] = isset($data['settings']['show_congratulate_after_first_newsletter'])?$data['settings']['show_congratulate_after_first_newsletter']:'false'; + $data['show_congratulate_after_first_newsletter'] = isset($data['settings']['show_congratulate_after_first_newsletter']) ? $data['settings']['show_congratulate_after_first_newsletter'] : 'false'; $data['tracking_enabled'] = $this->settings->get('tracking.enabled'); $data['premium_plugin_active'] = License::getLicense(); diff --git a/lib/Config/Migrator.php b/lib/Config/Migrator.php index 5e05bd002d..6b3205c5dc 100644 --- a/lib/Config/Migrator.php +++ b/lib/Config/Migrator.php @@ -153,7 +153,7 @@ class Migrator { } function scheduledTaskSubscribers() { - $attributes = [ + $attributes = [ 'task_id int(11) unsigned NOT NULL,', 'subscriber_id int(11) unsigned NOT NULL,', 'processed int(1) NOT NULL,', diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index 25edf76b78..d9fce62b71 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -226,7 +226,7 @@ class Populator { $sender = $this->settings->fetch('sender', []); $this->settings->set('subscriber_email_notification', [ 'enabled' => true, - 'address' => isset($sender['address'])? $sender['address'] : null, + 'address' => isset($sender['address']) ? $sender['address'] : null, ]); } @@ -235,7 +235,7 @@ class Populator { $sender = $this->settings->fetch('sender', []); $this->settings->set('stats_notifications', [ 'enabled' => true, - 'address' => isset($sender['address'])? $sender['address'] : null, + 'address' => isset($sender['address']) ? $sender['address'] : null, ]); } diff --git a/lib/Config/PopulatorData/Templates/Charity.php b/lib/Config/PopulatorData/Templates/Charity.php index 55eb08471f..ba62dc6c28 100644 --- a/lib/Config/PopulatorData/Templates/Charity.php +++ b/lib/Config/PopulatorData/Templates/Charity.php @@ -711,7 +711,7 @@ class Charity { 'type' => 'socialIcon', 'iconType' => 'facebook', 'link' => 'http://www.facebook.com', - 'image' => $this->social_icon_url . '/07-full-symbol-black/Facebook.png', + 'image' => $this->social_icon_url . '/07-full-symbol-black/Facebook.png', 'height' => '32px', 'width' => '32px', 'text' => 'Facebook', @@ -721,7 +721,7 @@ class Charity { 'type' => 'socialIcon', 'iconType' => 'twitter', 'link' => 'http://www.twitter.com', - 'image' => $this->social_icon_url . '/07-full-symbol-black/Twitter.png', + 'image' => $this->social_icon_url . '/07-full-symbol-black/Twitter.png', 'height' => '32px', 'width' => '32px', 'text' => 'Twitter', @@ -731,7 +731,7 @@ class Charity { 'type' => 'socialIcon', 'iconType' => 'instagram', 'link' => 'http://instagram.com', - 'image' => $this->social_icon_url . '/07-full-symbol-black/Instagram.png', + 'image' => $this->social_icon_url . '/07-full-symbol-black/Instagram.png', 'height' => '32px', 'width' => '32px', 'text' => 'Instagram', @@ -1080,7 +1080,7 @@ class Charity { 'type' => 'socialIcon', 'iconType' => 'facebook', 'link' => 'http://www.facebook.com', - 'image' => $this->social_icon_url . '/01-social/Facebook.png', + 'image' => $this->social_icon_url . '/01-social/Facebook.png', 'height' => '32px', 'width' => '32px', 'text' => 'Facebook', @@ -1090,7 +1090,7 @@ class Charity { 'type' => 'socialIcon', 'iconType' => 'twitter', 'link' => 'http://www.twitter.com', - 'image' => $this->social_icon_url . '/01-social/Twitter.png', + 'image' => $this->social_icon_url . '/01-social/Twitter.png', 'height' => '32px', 'width' => '32px', 'text' => 'Twitter', diff --git a/lib/Config/PopulatorData/Templates/PieceOfCake.php b/lib/Config/PopulatorData/Templates/PieceOfCake.php index 77ee0dfcbf..b6c8c294cc 100644 --- a/lib/Config/PopulatorData/Templates/PieceOfCake.php +++ b/lib/Config/PopulatorData/Templates/PieceOfCake.php @@ -86,7 +86,7 @@ class PieceOfCake { 2 => [ 'type' => 'image', 'link' => '', - 'src' => $this->template_image_url . '/Restaurant-Bakery-Logo-1.png', + 'src' => $this->template_image_url . '/Restaurant-Bakery-Logo-1.png', 'alt' => 'Restaurant-Bakery-Logo-1', 'fullWidth' => true, 'width' => '1280px', @@ -109,7 +109,7 @@ class PieceOfCake { 4 => [ 'type' => 'image', 'link' => '', - 'src' => $this->template_image_url . '/Restaurant-Bakery-Header.jpg', + 'src' => $this->template_image_url . '/Restaurant-Bakery-Header.jpg', 'alt' => 'Restaurant-Bakery-Header', 'fullWidth' => true, 'width' => '1280px', diff --git a/lib/Cron/Workers/StatsNotifications/Worker.php b/lib/Cron/Workers/StatsNotifications/Worker.php index 021913905b..aca24cf869 100644 --- a/lib/Cron/Workers/StatsNotifications/Worker.php +++ b/lib/Cron/Workers/StatsNotifications/Worker.php @@ -121,7 +121,7 @@ class Worker { $clicked = ($newsletter->statistics['clicked'] * 100) / $newsletter->total_sent; $opened = ($newsletter->statistics['opened'] * 100) / $newsletter->total_sent; $unsubscribed = ($newsletter->statistics['unsubscribed'] * 100) / $newsletter->total_sent; - $context = [ + $context = [ 'subject' => $newsletter->subject, 'preheader' => sprintf(_x( '%1$s%% opens, %2$s%% clicks, %3$s%% unsubscribes in a nutshell.', 'newsletter open rate, click rate and unsubscribe rate', 'mailpoet'), diff --git a/lib/Helpscout/Beacon.php b/lib/Helpscout/Beacon.php index a68876efcf..df231cefd8 100644 --- a/lib/Helpscout/Beacon.php +++ b/lib/Helpscout/Beacon.php @@ -57,7 +57,7 @@ class Beacon { 'Default FROM address' => $settings->get('sender.address'), 'Default Reply-To address' => $settings->get('reply_to.address'), 'Bounce Email Address' => $settings->get('bounce.address'), - 'Total number of subscribers' => Subscriber::getTotalSubscribers(), + 'Total number of subscribers' => Subscriber::getTotalSubscribers(), 'Plugin installed at' => $settings->get('installed_at'), ]; } diff --git a/lib/Mailer/MailerError.php b/lib/Mailer/MailerError.php index 2ddb105fc1..0357b8c90a 100644 --- a/lib/Mailer/MailerError.php +++ b/lib/Mailer/MailerError.php @@ -93,9 +93,9 @@ class MailerError { $message .= $this->message ? ' ' : ''; if (count($this->subscribers_errors) === 1) { - $message .= WPFunctions::get()->__('Unprocessed subscriber:', 'mailpoet') . ' '; + $message .= WPFunctions::get()->__('Unprocessed subscriber:', 'mailpoet') . ' '; } else { - $message .= WPFunctions::get()->__('Unprocessed subscribers:', 'mailpoet') . ' '; + $message .= WPFunctions::get()->__('Unprocessed subscribers:', 'mailpoet') . ' '; } $message .= implode( diff --git a/lib/Mailer/Methods/AmazonSES.php b/lib/Mailer/Methods/AmazonSES.php index 543f2f550e..1c7ce29a0c 100644 --- a/lib/Mailer/Methods/AmazonSES.php +++ b/lib/Mailer/Methods/AmazonSES.php @@ -107,7 +107,7 @@ class AmazonSES { ]) ->setSender($this->sender['from_email']) ->setReplyTo([ - $this->reply_to['reply_to_email'] => $this->reply_to['reply_to_name'], + $this->reply_to['reply_to_email'] => $this->reply_to['reply_to_name'], ]) ->setReturnPath($this->return_path) ->setSubject($newsletter['subject']); diff --git a/lib/Mailer/Methods/MailPoet.php b/lib/Mailer/Methods/MailPoet.php index f9d57a11aa..a87ef3b7e2 100644 --- a/lib/Mailer/Methods/MailPoet.php +++ b/lib/Mailer/Methods/MailPoet.php @@ -48,7 +48,7 @@ class MailPoet { } function processSendError($result, $subscriber, $newsletter) { - if (!empty($result['code']) && $result['code'] === API::RESPONSE_CODE_KEY_INVALID) { + if (!empty($result['code']) && $result['code'] === API::RESPONSE_CODE_KEY_INVALID) { Bridge::invalidateKey(); } return $this->error_mapper->getErrorForResult($result, $subscriber, $this->sender, $newsletter); diff --git a/lib/Newsletter/Editor/PostContentManager.php b/lib/Newsletter/Editor/PostContentManager.php index 493ee246de..28842297fd 100644 --- a/lib/Newsletter/Editor/PostContentManager.php +++ b/lib/Newsletter/Editor/PostContentManager.php @@ -56,7 +56,7 @@ class PostContentManager { '', '