diff --git a/lib/Config/Menu.php b/lib/Config/Menu.php
index e6e0211d27..dd2f3aaf85 100644
--- a/lib/Config/Menu.php
+++ b/lib/Config/Menu.php
@@ -439,7 +439,7 @@ class Menu {
}
function formEditor() {
- $id = (isset($_GET['id']) ? (int) $_GET['id'] : 0);
+ $id = (isset($_GET['id']) ? (int)$_GET['id'] : 0);
$form = Form::findOne($id);
if($form !== false) {
$form = $form->asArray();
diff --git a/lib/Cron/Supervisor.php b/lib/Cron/Supervisor.php
index fc93fd478c..f89f51dfa0 100644
--- a/lib/Cron/Supervisor.php
+++ b/lib/Cron/Supervisor.php
@@ -28,7 +28,7 @@ class Supervisor {
return $this->formatDaemonStatusMessage($daemon['status']);
}
- $elapsed_time = time() - (int) $daemon['updated_at'];
+ $elapsed_time = time() - (int)$daemon['updated_at'];
// if it's been less than 40 seconds since last execution and we're not
// force-running the daemon, return its status and do nothing
if($elapsed_time < CronHelper::DAEMON_EXECUTION_TIMEOUT && !$this->force_run) {
diff --git a/lib/Cron/Workers/Scheduler.php b/lib/Cron/Workers/Scheduler.php
index 0714c7b348..5f05d891aa 100644
--- a/lib/Cron/Workers/Scheduler.php
+++ b/lib/Cron/Workers/Scheduler.php
@@ -51,7 +51,7 @@ class Scheduler {
$queue->delete();
return;
}
- $subscriber_id = (int) $subscriber['to_process'][0];
+ $subscriber_id = (int)$subscriber['to_process'][0];
if($newsletter->event === 'segment') {
if($this->verifyMailPoetSubscriber($subscriber_id, $newsletter, $queue) === false) {
return;
diff --git a/lib/Cron/Workers/SendingQueue.php b/lib/Cron/Workers/SendingQueue.php
index 3f2d200d83..244746c31d 100644
--- a/lib/Cron/Workers/SendingQueue.php
+++ b/lib/Cron/Workers/SendingQueue.php
@@ -352,9 +352,9 @@ class SendingQueue {
}
function checkSendingLimit() {
- $frequency_interval = (int) $this->mta_config['frequency']['interval'] * 60;
- $frequency_limit = (int) $this->mta_config['frequency']['emails'];
- $elapsed_time = time() - (int) $this->mta_log['started'];
+ $frequency_interval = (int)$this->mta_config['frequency']['interval'] * 60;
+ $frequency_limit = (int)$this->mta_config['frequency']['emails'];
+ $elapsed_time = time() - (int)$this->mta_log['started'];
if($this->mta_log['sent'] === $frequency_limit &&
$elapsed_time <= $frequency_interval
) {
diff --git a/lib/Models/NewsletterTemplate.php b/lib/Models/NewsletterTemplate.php
index 576f41760d..a523d4e0cf 100644
--- a/lib/Models/NewsletterTemplate.php
+++ b/lib/Models/NewsletterTemplate.php
@@ -28,8 +28,8 @@ class NewsletterTemplate extends Model {
static function createOrUpdate($data = array()) {
$template = false;
- if(isset($data['id']) && (int) $data['id'] > 0) {
- $template = self::findOne((int) $data['id']);
+ if(isset($data['id']) && (int)$data['id'] > 0) {
+ $template = self::findOne((int)$data['id']);
}
if($template === false) {
diff --git a/lib/Newsletter/AutomatedLatestContent.php b/lib/Newsletter/AutomatedLatestContent.php
index 4c4d6abaaa..72f8f6cdf2 100644
--- a/lib/Newsletter/AutomatedLatestContent.php
+++ b/lib/Newsletter/AutomatedLatestContent.php
@@ -32,8 +32,8 @@ class AutomatedLatestContent {
}
function getPosts($args, $posts_to_exclude = array()) {
- $posts_per_page = (!empty($args['amount']) && (int) $args['amount'] > 0)
- ? (int) $args['amount']
+ $posts_per_page = (!empty($args['amount']) && (int)$args['amount'] > 0)
+ ? (int)$args['amount']
: self::DEFAULT_POSTS_PER_PAGE;
$parameters = array(
'posts_per_page' => $posts_per_page,
diff --git a/lib/Newsletter/Renderer/Blocks/Button.php b/lib/Newsletter/Renderer/Blocks/Button.php
index 02e2d26be9..d2eff845c3 100644
--- a/lib/Newsletter/Renderer/Blocks/Button.php
+++ b/lib/Newsletter/Renderer/Blocks/Button.php
@@ -43,8 +43,8 @@ class Button {
static function calculateWidth($element, $column_count) {
$column_width = ColumnsHelper::columnWidth($column_count);
$column_width = $column_width - (StylesHelper::$padding_width * 2);
- $border_width = (int) $element['styles']['block']['borderWidth'];
- $button_width = (int) $element['styles']['block']['width'];
+ $border_width = (int)$element['styles']['block']['borderWidth'];
+ $button_width = (int)$element['styles']['block']['width'];
$button_width = ($button_width > $column_width) ?
$column_width :
$button_width;
diff --git a/lib/Newsletter/Renderer/Blocks/Footer.php b/lib/Newsletter/Renderer/Blocks/Footer.php
index 0fa0446d56..92ecbce865 100644
--- a/lib/Newsletter/Renderer/Blocks/Footer.php
+++ b/lib/Newsletter/Renderer/Blocks/Footer.php
@@ -8,7 +8,7 @@ class Footer {
$element['text'] = preg_replace('/\n/', '
', $element['text']);
$element['text'] = preg_replace('/(<\/?p.*?>)/i', '', $element['text']);
$line_height = sprintf(
- '%spx', StylesHelper::$line_height_multiplier * (int) $element['styles']['text']['fontSize']
+ '%spx', StylesHelper::$line_height_multiplier * (int)$element['styles']['text']['fontSize']
);
$DOM_parser = new \pQuery();
$DOM = $DOM_parser->parseStr($element['text']);
diff --git a/lib/Newsletter/Renderer/Blocks/Header.php b/lib/Newsletter/Renderer/Blocks/Header.php
index c5d1b916fe..7c4ef126cb 100644
--- a/lib/Newsletter/Renderer/Blocks/Header.php
+++ b/lib/Newsletter/Renderer/Blocks/Header.php
@@ -8,7 +8,7 @@ class Header {
$element['text'] = preg_replace('/\n/', '
', $element['text']);
$element['text'] = preg_replace('/(<\/?p.*?>)/i', '', $element['text']);
$line_height = sprintf(
- '%spx', StylesHelper::$line_height_multiplier * (int) $element['styles']['text']['fontSize']
+ '%spx', StylesHelper::$line_height_multiplier * (int)$element['styles']['text']['fontSize']
);
$DOM_parser = new \pQuery();
$DOM = $DOM_parser->parseStr($element['text']);
diff --git a/lib/Newsletter/Renderer/Blocks/Image.php b/lib/Newsletter/Renderer/Blocks/Image.php
index a25853bbb0..da5cf2e1a8 100644
--- a/lib/Newsletter/Renderer/Blocks/Image.php
+++ b/lib/Newsletter/Renderer/Blocks/Image.php
@@ -6,8 +6,8 @@ use MailPoet\Newsletter\Renderer\StylesHelper;
class Image {
static function render($element, $column_count) {
- $element['width'] = (int) $element['width'];
- $element['height'] = (int) $element['height'];
+ $element['width'] = (int)$element['width'];
+ $element['height'] = (int)$element['height'];
$element = self::adjustImageDimensions($element, $column_count);
$image_template = '
$column_width) {
$ratio = $element['width'] / $column_width;
$element['width'] = $column_width;
- $element['height'] = (int) ceil($element['height'] / $ratio);
+ $element['height'] = (int)ceil($element['height'] / $ratio);
}
// resize image if the image is padded and wider than padded column width
if($element['fullWidth'] === false &&
@@ -40,7 +40,7 @@ class Image {
) {
$ratio = $element['width'] / ($column_width - $padded_width);
$element['width'] = $column_width - $padded_width;
- $element['height'] = (int) ceil($element['height'] / $ratio);
+ $element['height'] = (int)ceil($element['height'] / $ratio);
}
return $element;
}
diff --git a/lib/Newsletter/Renderer/Blocks/Social.php b/lib/Newsletter/Renderer/Blocks/Social.php
index 8b177510ec..f5c2f10660 100644
--- a/lib/Newsletter/Renderer/Blocks/Social.php
+++ b/lib/Newsletter/Renderer/Blocks/Social.php
@@ -8,7 +8,7 @@ class Social {
foreach($element['icons'] as $index => $icon) {
$icons_block .= '
-
+
';
}
$template = '
diff --git a/lib/Newsletter/Renderer/Blocks/Spacer.php b/lib/Newsletter/Renderer/Blocks/Spacer.php
index bfbba556fb..659af7868e 100644
--- a/lib/Newsletter/Renderer/Blocks/Spacer.php
+++ b/lib/Newsletter/Renderer/Blocks/Spacer.php
@@ -3,7 +3,7 @@ namespace MailPoet\Newsletter\Renderer\Blocks;
class Spacer {
static function render($element) {
- $height = (int) $element['styles']['block']['height'];
+ $height = (int)$element['styles']['block']['height'];
$background_color = $element['styles']['block']['backgroundColor'];
$template = '