diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
index 2d306dff12..c83430ffa4 100644
--- a/.php-cs-fixer.php
+++ b/.php-cs-fixer.php
@@ -21,6 +21,8 @@
'elseif' => true,
'phpdoc_add_missing_param_annotation' => true,
'no_extra_blank_lines' => true,
+ 'no_trailing_whitespace' => true,
+ 'no_whitespace_in_blank_line' => true,
'blank_line_before_statement' => array(
'statements' => array(
'try',
diff --git a/classes/views/styles/components/FrmSliderStyleComponent.php b/classes/views/styles/components/FrmSliderStyleComponent.php
index 5e1aaed927..c9747be9ba 100644
--- a/classes/views/styles/components/FrmSliderStyleComponent.php
+++ b/classes/views/styles/components/FrmSliderStyleComponent.php
@@ -38,7 +38,7 @@ public function __construct( $field_name, $field_value, $data ) {
$this->data['unit_measurement'] = $this->detect_unit_measurement();
$this->data['has-multiple-values'] = count( $this->get_values() ) > 1;
$this->data['units'] = $this->get_units_list( $data );
- $this->data['value_label'] = empty( $this->detect_unit_measurement() ) ? $field_value : (float) $field_value;
+ $this->data['value_label'] = empty( $this->detect_unit_measurement() ) ? $field_value : (float) $field_value;
$this->init_defaults();
$this->init_icon();
diff --git a/classes/views/styles/components/templates/slider.php b/classes/views/styles/components/templates/slider.php
index 27b5ce9085..c3bcd8a3a1 100644
--- a/classes/views/styles/components/templates/slider.php
+++ b/classes/views/styles/components/templates/slider.php
@@ -190,7 +190,7 @@
-
diff --git a/stripe/controllers/FrmTransLiteActionsController.php b/stripe/controllers/FrmTransLiteActionsController.php
index f1ffecc38e..5ec5a489dc 100755
--- a/stripe/controllers/FrmTransLiteActionsController.php
+++ b/stripe/controllers/FrmTransLiteActionsController.php
@@ -167,7 +167,7 @@ public static function replace_success_message() {
return $message;
}
-
+
/**
* @param WP_Post $action
* @param stdClass $entry
@@ -615,7 +615,7 @@ public static function before_save_settings( $settings, $action ) {
if ( ! $gateway_field_id ) {
self::add_a_gateway_field( $form_id );
}
-
+
return $settings;
}
diff --git a/tests/phpunit/helpers/test_FrmCssScopeHelper.php b/tests/phpunit/helpers/test_FrmCssScopeHelper.php
index 9eb15ac7f5..6b351f019a 100644
--- a/tests/phpunit/helpers/test_FrmCssScopeHelper.php
+++ b/tests/phpunit/helpers/test_FrmCssScopeHelper.php
@@ -1,4 +1,4 @@
-helper->nest( $css, $this->scope_name );
$expected = "\n." . $this->scope_name . " .button { color: red; }\n";
-
+
$this->assertEquals( $expected, $result );
}
@@ -40,7 +40,7 @@ public function test_nest_basic_selector() {
public function test_nest_multiple_selectors() {
$css = '.button, .link { color: blue; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .button', $result );
$this->assertStringContainsString( '.' . $this->scope_name . ' .link', $result );
}
@@ -51,7 +51,7 @@ public function test_nest_multiple_selectors() {
public function test_nest_multiple_properties() {
$css = '.button { color: red; background: blue; padding: 10px; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .button', $result );
$this->assertStringContainsString( 'color: red;', $result );
$this->assertStringContainsString( 'background: blue;', $result );
@@ -64,7 +64,7 @@ public function test_nest_multiple_properties() {
public function test_nest_descendant_selectors() {
$css = '.parent .child { color: green; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .parent .child', $result );
}
@@ -74,7 +74,7 @@ public function test_nest_descendant_selectors() {
public function test_nest_pseudo_classes() {
$css = '.button:hover { color: red; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .button:hover', $result );
}
@@ -84,7 +84,7 @@ public function test_nest_pseudo_classes() {
public function test_nest_pseudo_elements() {
$css = '.button::before { content: "→"; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .button::before', $result );
}
@@ -94,7 +94,7 @@ public function test_nest_pseudo_elements() {
public function test_nest_media_query() {
$css = '@media (max-width: 768px) { .button { color: red; } }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '@media (max-width: 768px)', $result );
$this->assertStringContainsString( '.' . $this->scope_name . ' .button', $result );
}
@@ -105,7 +105,7 @@ public function test_nest_media_query() {
public function test_nest_keyframes() {
$css = '@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '@keyframes fadeIn', $result );
$this->assertStringContainsString( 'from { opacity: 0; }', $result );
$this->assertStringContainsString( 'to { opacity: 1; }', $result );
@@ -119,7 +119,7 @@ public function test_nest_keyframes() {
public function test_nest_removes_comments() {
$css = '/* Formidable CSS comment */ .button { color: red; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringNotContainsString( '/* Formidable CSS comment */', $result );
$this->assertStringContainsString( '.' . $this->scope_name . ' .button', $result );
}
@@ -134,7 +134,7 @@ public function test_nest_multiline_css() {
padding: 10px;
}';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .button', $result );
$this->assertStringContainsString( 'color: red;', $result );
}
@@ -145,7 +145,7 @@ public function test_nest_multiline_css() {
public function test_nest_attribute_selectors() {
$css = 'input[type="text"] { border: 1px solid #ccc; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' input[type="text"]', $result );
}
@@ -155,7 +155,7 @@ public function test_nest_attribute_selectors() {
public function test_nest_empty_css() {
$css = '';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertEquals( '', $result );
}
@@ -165,7 +165,7 @@ public function test_nest_empty_css() {
public function test_unnest_basic_selector() {
$css = '.' . $this->scope_name . ' .button { color: red; }';
$result = $this->helper->unnest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.button { color: red; }', $result );
$this->assertStringNotContainsString( '.' . $this->scope_name . ' .button', $result );
}
@@ -176,7 +176,7 @@ public function test_unnest_basic_selector() {
public function test_unnest_multiple_selectors() {
$css = '.' . $this->scope_name . ' .button, ' . $this->scope_name . ' .link { color: blue; }';
$result = $this->helper->unnest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.button', $result );
$this->assertStringContainsString( '.link', $result );
$this->assertStringNotContainsString( '.' . $this->scope_name, $result );
@@ -188,7 +188,7 @@ public function test_unnest_multiple_selectors() {
public function test_unnest_media_query() {
$css = '@media (max-width: 768px) { ' . $this->scope_name . ' .button { color: red; } }';
$result = $this->helper->unnest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '@media (max-width: 768px)', $result );
$this->assertStringContainsString( '.button', $result );
$this->assertStringNotContainsString( '.' . $this->scope_name . ' .button', $result );
@@ -200,7 +200,7 @@ public function test_unnest_media_query() {
public function test_unnest_non_prefixed_selector() {
$css = '.other-scope .button { color: red; }';
$result = $this->helper->unnest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.other-scope .button', $result );
}
@@ -210,7 +210,7 @@ public function test_unnest_non_prefixed_selector() {
public function test_unnest_mixed_selectors() {
$css = '.' . $this->scope_name . ' .button, .other .link { color: blue; }';
$result = $this->helper->unnest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.button', $result );
$this->assertStringContainsString( '.other .link', $result );
}
@@ -224,7 +224,7 @@ public function test_nest_complex_nested_structure() {
.link { color: blue; }
}';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '@media (max-width: 768px)', $result );
$this->assertStringContainsString( '.' . $this->scope_name . ' .button', $result );
$this->assertStringContainsString( '.' . $this->scope_name . ' .link', $result );
@@ -236,7 +236,7 @@ public function test_nest_complex_nested_structure() {
public function test_nest_id_selector() {
$css = '#element-id { color: red; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' #element-id', $result );
}
@@ -246,7 +246,7 @@ public function test_nest_id_selector() {
public function test_nest_child_combinator() {
$css = '.parent > .child { color: red; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .parent > .child', $result );
}
@@ -256,7 +256,7 @@ public function test_nest_child_combinator() {
public function test_nest_adjacent_sibling_combinator() {
$css = '.first + .second { margin-left: 10px; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .first + .second', $result );
}
@@ -266,7 +266,7 @@ public function test_nest_adjacent_sibling_combinator() {
public function test_nest_general_sibling_combinator() {
$css = '.first ~ .second { color: blue; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .first ~ .second', $result );
}
@@ -276,7 +276,7 @@ public function test_nest_general_sibling_combinator() {
public function test_nest_with_braces_in_strings() {
$css = '.button::after { content: "{test}"; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' .button::after', $result );
$this->assertStringContainsString( 'content: "{test}"', $result );
}
@@ -287,7 +287,7 @@ public function test_nest_with_braces_in_strings() {
public function test_nest_supports_rule() {
$css = '@supports (display: grid) { .container { display: grid; } }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '@supports (display: grid)', $result );
$this->assertStringContainsString( '.' . $this->scope_name . ' .container', $result );
}
@@ -298,7 +298,7 @@ public function test_nest_supports_rule() {
public function test_nest_element_selectors() {
$css = 'div { margin: 0; } p { padding: 10px; }';
$result = $this->helper->nest( $css, $this->scope_name );
-
+
$this->assertStringContainsString( '.' . $this->scope_name . ' div', $result );
$this->assertStringContainsString( '.' . $this->scope_name . ' p', $result );
}
@@ -309,7 +309,7 @@ public function test_nest_element_selectors() {
public function test_unnest_empty_css() {
$css = '';
$result = $this->helper->unnest( $css, $this->scope_name );
-
+
$this->assertEquals( '', $result );
}
}