Add space between foreach and ‘(‘

[MAILPOET-1791]
This commit is contained in:
Ján Mikláš
2019-02-13 12:52:39 +01:00
committed by M. Shull
parent fba2914392
commit ebbdec5ebd
134 changed files with 351 additions and 351 deletions

View File

@@ -54,7 +54,7 @@ abstract class Base {
if(!empty($rules)) {
$rules = array_unique($rules);
foreach($rules as $rule => $value) {
foreach ($rules as $rule => $value) {
if(is_bool($value)) {
$value = ($value) ? 'true' : 'false';
}

View File

@@ -22,7 +22,7 @@ class Checkbox extends Base {
$selected_value = self::getFieldValue($block);
foreach($options as $option) {
foreach ($options as $option) {
$html .= '<label class="mailpoet_checkbox_label">';
$html .= '<input type="checkbox" class="mailpoet_checkbox" ';
@@ -51,4 +51,4 @@ class Checkbox extends Base {
return $html;
}
}
}

View File

@@ -67,7 +67,7 @@ class Date extends Base {
}
}
foreach($date_selectors as $date_selector) {
foreach ($date_selectors as $date_selector) {
if($date_selector === 'DD') {
$block['selected'] = $day;
$html .= '<select class="mailpoet_date_day" ';

View File

@@ -22,7 +22,7 @@ class Radio extends Base {
$selected_value = self::getFieldValue($block);
foreach($options as $option) {
foreach ($options as $option) {
$html .= '<label class="mailpoet_radio_label">';
$html .= '<input type="radio" class="mailpoet_radio" ';
@@ -58,4 +58,4 @@ class Radio extends Base {
return $html;
}
}
}

View File

@@ -20,7 +20,7 @@ class Segment extends Base {
: array()
);
foreach($options as $option) {
foreach ($options as $option) {
if(!isset($option['id']) || !isset($option['name'])) continue;
$is_checked = (isset($option['is_checked']) && $option['is_checked']) ? 'checked="checked"' : '';
@@ -40,4 +40,4 @@ class Segment extends Base {
return $html;
}
}
}

View File

@@ -28,7 +28,7 @@ class Select extends Base {
: array()
);
foreach($options as $option) {
foreach ($options as $option) {
if(!empty($option['is_hidden'])) {
continue;
}
@@ -59,4 +59,4 @@ class Select extends Base {
return $html;
}
}
}

View File

@@ -46,7 +46,7 @@ class Renderer {
$html = ($honeypot_enabled) ?
'<label class="mailpoet_hp_email_label">' . __('Please leave this field empty', 'mailpoet') . '<input type="email" name="data[email]"></label>' :
'';
foreach($blocks as $key => $block) {
foreach ($blocks as $key => $block) {
if($block['type'] == 'submit' && $settings->get('re_captcha.enabled')) {
$site_key = $settings->get('re_captcha.site_token');
$html .= '<div class="mailpoet_recaptcha" data-sitekey="'. $site_key .'">
@@ -70,7 +70,7 @@ class Renderer {
}
$html .= static::renderBlock($block) . PHP_EOL;
}
return $html;
}

View File

@@ -17,7 +17,7 @@ class FieldNameObfuscator {
public function deobfuscateFormPayload($data) {
$result = array();
foreach($data as $key => $value) {
foreach ($data as $key => $value) {
$result[$this->deobfuscateField($key)] = $value;
}
return $result;
@@ -35,4 +35,4 @@ class FieldNameObfuscator {
return strpos($name, FieldNameObfuscator::OBFUSCATED_FIELD_PREFIX) === 0;
}
}
}

View File

@@ -89,7 +89,7 @@ EOL;
$styles = new CSSParser($this->stylesheet);
$styles = $styles->parse();
$formatted_styles = array();
foreach($styles->getAllDeclarationBlocks() as $style_declaration) {
foreach ($styles->getAllDeclarationBlocks() as $style_declaration) {
$selectors = array_map(function($selector) use ($prefix) {
return sprintf('%s %s', $prefix, $selector->__toString());
}, $style_declaration->getSelectors());

View File

@@ -213,7 +213,7 @@ EOL;
<p>
<select class="widefat" id="<?php echo $this->get_field_id('form') ?>" name="<?php echo $this->get_field_name('form'); ?>">
<?php
foreach($forms as $form) {
foreach ($forms as $form) {
$is_selected = ($selected_form === (int)$form['id']) ? 'selected="selected"' : '';
?>
<option value="<?php echo (int)$form['id']; ?>" <?php echo $is_selected; ?>><?php echo esc_html($form['name']); ?></option>