Completed
Pull Request — master (#1839)
by Stephanie
49s
created
classes/views/styles/_style-card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 				'text-color'      => $style->post_content['text_color'],
41 41
 				'submit-bg-color' => $style->post_content['submit_bg_color'],
42 42
 			);
43
-			$index  = 0;
43
+			$index = 0;
44 44
 			foreach ( $colors as $css_var_name => $color ) {
45 45
 				if ( 0 !== strpos( $color, 'rgb' ) ) {
46 46
 					$color = '#' . $color;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 					'style' => 'background-color: var(--' . $css_var_name . ')',
52 52
 				);
53 53
 
54
-				++$index;
54
+				++ $index;
55 55
 				?>
56 56
 				<div <?php FrmAppHelper::array_to_html_params( $circle_params, true ); ?>></div>
57 57
 				<?php
Please login to merge, or discard this patch.
classes/models/FrmFormApi.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 			if ( isset( $addon['categories'] ) ) {
106 106
 				$cats = array_intersect( $this->skip_categories(), $addon['categories'] );
107 107
 				if ( ! empty( $cats ) ) {
108
-					unset( $addons[ $k ] );
108
+					unset( $addons[$k] );
109 109
 					continue;
110 110
 				}
111 111
 			}
112 112
 
113 113
 			if ( ! array_key_exists( 'is_new', $addon ) && array_key_exists( 'released', $addon ) ) {
114
-				$addons[ $k ]['is_new'] = $this->is_new( $addon );
114
+				$addons[$k]['is_new'] = $this->is_new( $addon );
115 115
 			}
116 116
 		}
117 117
 
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
 					return $addon;
154 154
 				}
155 155
 			}
156
-		} elseif ( isset( $addons[ $download_id ] ) ) {
157
-			$plugin = $addons[ $download_id ];
156
+		} elseif ( isset( $addons[$download_id] ) ) {
157
+			$plugin = $addons[$download_id];
158 158
 		}
159 159
 
160 160
 		return $plugin;
Please login to merge, or discard this patch.
classes/models/FrmReviews.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 		$show_intervals = array( 50, 200, 500 );
81 81
 		$asked          = $this->review_status['asked'];
82 82
 
83
-		if ( ! isset( $show_intervals[ $asked ] ) ) {
83
+		if ( ! isset( $show_intervals[$asked] ) ) {
84 84
 			return;
85 85
 		}
86 86
 
87 87
 		$entries = FrmEntry::getRecordCount();
88
-		$count   = $show_intervals[ $asked ];
88
+		$count   = $show_intervals[$asked];
89 89
 		$user    = wp_get_current_user();
90 90
 
91 91
 		// Only show review request if the site has collected enough entries
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 		$requests = $message->get_messages();
135 135
 		$key      = $this->inbox_key . ( $asked ? $asked : '' );
136 136
 
137
-		if ( isset( $requests[ $key ] ) ) {
137
+		if ( isset( $requests[$key] ) ) {
138 138
 			return;
139 139
 		}
140 140
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 * @return bool
174 174
 	 */
175 175
 	private function has_later_request( $requests, $asked ) {
176
-		return isset( $requests[ $this->inbox_key . ( $asked + 1 ) ] ) || isset( $requests[ $this->inbox_key . ( $asked + 2 ) ] );
176
+		return isset( $requests[$this->inbox_key . ( $asked + 1 )] ) || isset( $requests[$this->inbox_key . ( $asked + 2 )] );
177 177
 	}
178 178
 
179 179
 	/**
Please login to merge, or discard this patch.
classes/models/FrmTableHTMLGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 * @return void
87 87
 	 */
88 88
 	private function init_style_settings( $atts ) {
89
-		$style_settings       = array(
89
+		$style_settings = array(
90 90
 			'border_color' => 'dddddd',
91 91
 			'bg_color'     => 'f7f7f7',
92 92
 			'text_color'   => '444444',
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 		$this->style_settings = apply_filters( 'frm_show_entry_styles', $style_settings );
98 98
 
99 99
 		foreach ( $this->style_settings as $key => $setting ) {
100
-			if ( isset( $atts[ $key ] ) && $atts[ $key ] !== '' ) {
101
-				$this->style_settings[ $key ] = $atts[ $key ];
100
+			if ( isset( $atts[$key] ) && $atts[$key] !== '' ) {
101
+				$this->style_settings[$key] = $atts[$key];
102 102
 			}
103 103
 
104 104
 			if ( $this->is_color_setting( $key ) ) {
105
-				$this->style_settings[ $key ] = $this->get_color_markup( $this->style_settings[ $key ] );
105
+				$this->style_settings[$key] = $this->get_color_markup( $this->style_settings[$key] );
106 106
 			}
107 107
 		}
108 108
 
Please login to merge, or discard this patch.
classes/models/FrmFormState.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * @return void
60 60
 	 */
61 61
 	public function set( $key, $value ) {
62
-		$this->state[ $key ] = $value;
62
+		$this->state[$key] = $value;
63 63
 	}
64 64
 
65 65
 	/**
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	}
76 76
 
77 77
 	public function get( $key, $default ) {
78
-		if ( isset( $this->state[ $key ] ) ) {
79
-			return $this->state[ $key ];
78
+		if ( isset( $this->state[$key] ) ) {
79
+			return $this->state[$key];
80 80
 		}
81 81
 		return $default;
82 82
 	}
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	private function compressed_state() {
172 172
 		$compressed = array();
173 173
 		foreach ( $this->state as $key => $value ) {
174
-			$compressed[ self::compressed_key( $key ) ] = $value;
174
+			$compressed[self::compressed_key( $key )] = $value;
175 175
 		}
176 176
 		return $compressed;
177 177
 	}
Please login to merge, or discard this patch.
classes/helpers/FrmOnSubmitHelper.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -240,26 +240,26 @@  discard block
 block discarded – undo
240 240
 	public static function populate_on_submit_data( &$form_options, $action = null, $event = 'create' ) {
241 241
 		$opt = 'update' === $event ? 'edit_' : 'success_';
242 242
 		if ( ! $action || ! is_object( $action ) ) {
243
-			$form_options[ $opt . 'action' ] = self::get_default_action_type();
244
-			$form_options[ $opt . 'msg' ]    = self::get_default_msg();
243
+			$form_options[$opt . 'action'] = self::get_default_action_type();
244
+			$form_options[$opt . 'msg']    = self::get_default_msg();
245 245
 
246 246
 			return;
247 247
 		}
248 248
 
249
-		$form_options[ $opt . 'action' ] = isset( $action->post_content['success_action'] ) ? $action->post_content['success_action'] : 'message';
249
+		$form_options[$opt . 'action'] = isset( $action->post_content['success_action'] ) ? $action->post_content['success_action'] : 'message';
250 250
 
251
-		switch ( $form_options[ $opt . 'action' ] ) {
251
+		switch ( $form_options[$opt . 'action'] ) {
252 252
 			case 'redirect':
253
-				$form_options[ $opt . 'url' ]    = isset( $action->post_content['success_url'] ) ? $action->post_content['success_url'] : '';
253
+				$form_options[$opt . 'url']    = isset( $action->post_content['success_url'] ) ? $action->post_content['success_url'] : '';
254 254
 				$form_options['open_in_new_tab'] = ! empty( $action->post_content['open_in_new_tab'] );
255 255
 				break;
256 256
 
257 257
 			case 'page':
258
-				$form_options[ $opt . 'page_id' ] = isset( $action->post_content['success_page_id'] ) ? $action->post_content['success_page_id'] : '';
258
+				$form_options[$opt . 'page_id'] = isset( $action->post_content['success_page_id'] ) ? $action->post_content['success_page_id'] : '';
259 259
 				break;
260 260
 
261 261
 			default:
262
-				$form_options[ $opt . 'msg' ] = ! empty( $action->post_content['success_msg'] ) ? $action->post_content['success_msg'] : self::get_default_msg();
262
+				$form_options[$opt . 'msg'] = ! empty( $action->post_content['success_msg'] ) ? $action->post_content['success_msg'] : self::get_default_msg();
263 263
 				$form_options['show_form']    = ! empty( $action->post_content['show_form'] );
264 264
 		}
265 265
 	}
@@ -348,20 +348,20 @@  discard block
 block discarded – undo
348 348
 	private static function get_on_submit_action_data_from_form_options( $form_options, $event = 'create' ) {
349 349
 		$opt  = 'update' === $event ? 'edit_' : 'success_';
350 350
 		$data = array(
351
-			'success_action' => isset( $form_options[ $opt . 'action' ] ) ? $form_options[ $opt . 'action' ] : self::get_default_action_type(),
351
+			'success_action' => isset( $form_options[$opt . 'action'] ) ? $form_options[$opt . 'action'] : self::get_default_action_type(),
352 352
 		);
353 353
 
354 354
 		switch ( $data['success_action'] ) {
355 355
 			case 'redirect':
356
-				$data['success_url'] = isset( $form_options[ $opt . 'url' ] ) ? $form_options[ $opt . 'url' ] : '';
356
+				$data['success_url'] = isset( $form_options[$opt . 'url'] ) ? $form_options[$opt . 'url'] : '';
357 357
 				break;
358 358
 
359 359
 			case 'page':
360
-				$data['success_page_id'] = isset( $form_options[ $opt . 'page_id' ] ) ? $form_options[ $opt . 'page_id' ] : '';
360
+				$data['success_page_id'] = isset( $form_options[$opt . 'page_id'] ) ? $form_options[$opt . 'page_id'] : '';
361 361
 				break;
362 362
 
363 363
 			default:
364
-				$data['success_msg'] = isset( $form_options[ $opt . 'msg' ] ) ? $form_options[ $opt . 'msg' ] : self::get_default_msg();
364
+				$data['success_msg'] = isset( $form_options[$opt . 'msg'] ) ? $form_options[$opt . 'msg'] : self::get_default_msg();
365 365
 				$data['show_form']   = ! empty( $form_options['show_form'] );
366 366
 		}
367 367
 
Please login to merge, or discard this patch.
classes/controllers/FrmSimpleBlocksController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 			return false;
77 77
 		}
78 78
 
79
-		return $addons[ $addon_id ];
79
+		return $addons[$addon_id];
80 80
 	}
81 81
 
82 82
 	/**
Please login to merge, or discard this patch.
stripe/controllers/FrmTransLiteListsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 			'sort'   => '',
101 101
 			'sdir'   => '',
102 102
 		) as $var => $default ) {
103
-			$values[ $var ] = FrmAppHelper::get_param( $var, $default );
103
+			$values[$var] = FrmAppHelper::get_param( $var, $default );
104 104
 		}
105 105
 
106 106
 		return $values;
Please login to merge, or discard this patch.
stripe/models/FrmStrpLiteSettings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@
 block discarded – undo
84 84
 		$settings = $this->default_options();
85 85
 
86 86
 		foreach ( $settings as $setting => $default ) {
87
-			if ( isset( $params[ 'frm_' . $this->param() . '_' . $setting ] ) ) {
88
-				$this->settings->{$setting} = trim( sanitize_text_field( $params[ 'frm_' . $this->param() . '_' . $setting ] ) );
87
+			if ( isset( $params['frm_' . $this->param() . '_' . $setting] ) ) {
88
+				$this->settings->{$setting} = trim( sanitize_text_field( $params['frm_' . $this->param() . '_' . $setting] ) );
89 89
 			}
90 90
 		}
91 91
 
Please login to merge, or discard this patch.