@@ -261,14 +261,14 @@ |
||
261 | 261 | private function fill_values( $values, &$new_values ) { |
262 | 262 | $defaults = $this->get_defaults(); |
263 | 263 | foreach ( $defaults as $val => $default ) { |
264 | - if ( isset( $values[ $val ] ) ) { |
|
264 | + if ( isset( $values[$val] ) ) { |
|
265 | 265 | if ( $default['sanitize'] === 'float' ) { |
266 | - $new_values[ $val ] = (float) $values[ $val ]; |
|
266 | + $new_values[$val] = (float) $values[$val]; |
|
267 | 267 | } elseif ( ! empty( $default['sanitize'] ) ) { |
268 | - $new_values[ $val ] = call_user_func( $default['sanitize'], $values[ $val ] ); |
|
268 | + $new_values[$val] = call_user_func( $default['sanitize'], $values[$val] ); |
|
269 | 269 | } |
270 | 270 | } elseif ( $values['action'] === 'create' ) { |
271 | - $new_values[ $val ] = $default['default']; |
|
271 | + $new_values[$val] = $default['default']; |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | 'payments' => $frm_payment->get_count(), |
113 | 113 | 'subscriptions' => $frm_sub->get_count(), |
114 | 114 | ); |
115 | - $type = FrmAppHelper::get_simple_request( |
|
115 | + $type = FrmAppHelper::get_simple_request( |
|
116 | 116 | array( |
117 | 117 | 'param' => 'trans_type', |
118 | 118 | 'type' => 'request', |
@@ -127,10 +127,10 @@ discard block |
||
127 | 127 | $class = ''; |
128 | 128 | } |
129 | 129 | |
130 | - if ( $counts[ $status ] || 'published' === $status ) { |
|
131 | - $links[ $status ] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>' |
|
130 | + if ( $counts[$status] || 'published' === $status ) { |
|
131 | + $links[$status] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>' |
|
132 | 132 | // translators: %1$s: Transaction type (Payments or Subscriptions), %2$s: Span start tag, %3$s: Count, %3$s: Span close tag. |
133 | - . sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[ $status ] ), '</span>' ) |
|
133 | + . sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[$status] ), '</span>' ) |
|
134 | 134 | . '</a>'; |
135 | 135 | } |
136 | 136 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | echo '<tr id="payment-' . esc_attr( $item->id ) . '" valign="middle" '; |
202 | 202 | |
203 | 203 | $is_alternate = 0 === $alt % 2; |
204 | - $alt++; |
|
204 | + $alt ++; |
|
205 | 205 | |
206 | 206 | if ( $is_alternate ) { |
207 | 207 | echo 'class="alternate"'; |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | $form_ids = array(); |
292 | 292 | foreach ( $forms as $form ) { |
293 | - $form_ids[ $form->id ] = $form; |
|
293 | + $form_ids[$form->id] = $form; |
|
294 | 294 | unset( $form ); |
295 | 295 | } |
296 | 296 | |
@@ -390,8 +390,8 @@ discard block |
||
390 | 390 | * @return mixed |
391 | 391 | */ |
392 | 392 | private function get_form_id_column( $item, $atts ) { |
393 | - if ( isset( $atts['form_ids'][ $item->item_id ] ) ) { |
|
394 | - $form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][ $item->item_id ]->form_id ); |
|
393 | + if ( isset( $atts['form_ids'][$item->item_id] ) ) { |
|
394 | + $form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][$item->item_id]->form_id ); |
|
395 | 395 | return $form_link; |
396 | 396 | } |
397 | 397 | |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | |
448 | 448 | foreach ( $completed_payments as $completed_payment ) { |
449 | 449 | if ( $completed_payment->status === 'complete' ) { |
450 | - $count++; |
|
450 | + $count ++; |
|
451 | 451 | } |
452 | 452 | } |
453 | 453 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'user_id' => get_current_user_id(), |
109 | 109 | 'frm_strp_connect_mode' => $mode, |
110 | 110 | ); |
111 | - $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
111 | + $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
112 | 112 | |
113 | 113 | if ( is_string( $data ) ) { |
114 | 114 | return $data; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @return object|string |
146 | 146 | */ |
147 | 147 | private static function post_to_connect_server( $action, $additional_body = array() ) { |
148 | - $body = array( |
|
148 | + $body = array( |
|
149 | 149 | 'frm_strp_connect_action' => $action, |
150 | 150 | 'frm_strp_connect_mode' => FrmStrpLiteAppHelper::active_mode(), |
151 | 151 | ); |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | $site_url = home_url(); |
497 | 497 | $site_url = self::maybe_fix_wpml_url( $site_url ); |
498 | 498 | $site_url = preg_replace( '#^https?://#', '', $site_url ); // remove protocol from url (our url cannot include the colon). |
499 | - $site_url = preg_replace( '/:[0-9]+/', '', $site_url ); // remove port from url (mostly helpful in development) |
|
499 | + $site_url = preg_replace( '/:[0-9]+/', '', $site_url ); // remove port from url (mostly helpful in development) |
|
500 | 500 | $site_url = self::strip_lang_from_url( $site_url ); |
501 | 501 | |
502 | 502 | // $password is either a Pro license or a uuid (See FrmUsage::uuid). |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public static function show_status( $status ) { |
36 | 36 | $statuses = array_merge( self::get_payment_statuses(), self::get_subscription_statuses() ); |
37 | - return isset( $statuses[ $status ] ) ? $statuses[ $status ] : $status; |
|
37 | + return isset( $statuses[$status] ) ? $statuses[$status] : $status; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public static function get_action_setting( $option, $atts ) { |
121 | 121 | $settings = self::get_action_settings( $atts ); |
122 | - $value = isset( $settings[ $option ] ) ? $settings[ $option ] : ''; |
|
122 | + $value = isset( $settings[$option] ) ? $settings[$option] : ''; |
|
123 | 123 | return $value; |
124 | 124 | } |
125 | 125 | |
@@ -222,8 +222,8 @@ discard block |
||
222 | 222 | */ |
223 | 223 | public static function get_repeat_label_from_value( $value, $number ) { |
224 | 224 | $times = self::get_plural_repeat_times( $number ); |
225 | - if ( isset( $times[ $value ] ) ) { |
|
226 | - $value = $times[ $value ]; |
|
225 | + if ( isset( $times[$value] ) ) { |
|
226 | + $value = $times[$value]; |
|
227 | 227 | } |
228 | 228 | return $value; |
229 | 229 | } |