@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | public function read_until( $char ) { |
| 53 | 53 | $value = ''; |
| 54 | 54 | |
| 55 | - while ( $this->pos <= $this->max && ( $one = $this->string[ $this->pos++ ] ) !== $char ) { |
|
| 55 | + while ( $this->pos <= $this->max && ( $one = $this->string[$this->pos ++] ) !== $char ) { |
|
| 56 | 56 | $value .= $one; |
| 57 | 57 | } |
| 58 | 58 | return $value; |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | public function read( $count ) { |
| 71 | 71 | $value = ''; |
| 72 | 72 | |
| 73 | - while ( $count > 0 && $this->pos <= $this->max && ( ( $one = $this->string[ $this->pos ] ) || '0' === $one ) ) { |
|
| 73 | + while ( $count > 0 && $this->pos <= $this->max && ( ( $one = $this->string[$this->pos] ) || '0' === $one ) ) { |
|
| 74 | 74 | $value .= $one; |
| 75 | 75 | $this->pos += 1; |
| 76 | - --$count; |
|
| 76 | + -- $count; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -295,14 +295,14 @@ |
||
| 295 | 295 | $defaults = $this->get_defaults(); |
| 296 | 296 | |
| 297 | 297 | foreach ( $defaults as $val => $default ) { |
| 298 | - if ( isset( $values[ $val ] ) ) { |
|
| 298 | + if ( isset( $values[$val] ) ) { |
|
| 299 | 299 | if ( $default['sanitize'] === 'float' ) { |
| 300 | - $new_values[ $val ] = (float) $values[ $val ]; |
|
| 300 | + $new_values[$val] = (float) $values[$val]; |
|
| 301 | 301 | } elseif ( ! empty( $default['sanitize'] ) ) { |
| 302 | - $new_values[ $val ] = call_user_func( $default['sanitize'], $values[ $val ] ); |
|
| 302 | + $new_values[$val] = call_user_func( $default['sanitize'], $values[$val] ); |
|
| 303 | 303 | } |
| 304 | 304 | } elseif ( $values['action'] === 'create' ) { |
| 305 | - $new_values[ $val ] = $default['default']; |
|
| 305 | + $new_values[$val] = $default['default']; |
|
| 306 | 306 | } |
| 307 | 307 | } |
| 308 | 308 | } |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | * @return void |
| 58 | 58 | */ |
| 59 | 59 | private static function flag_new_unique_key( $unique_id ) { |
| 60 | - if ( ! isset( self::$unique_id_match_checks[ $unique_id ] ) ) { |
|
| 61 | - self::$unique_id_match_checks[ $unique_id ] = false; |
|
| 60 | + if ( ! isset( self::$unique_id_match_checks[$unique_id] ) ) { |
|
| 61 | + self::$unique_id_match_checks[$unique_id] = false; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | if ( 0 === (int) $meta->field_id ) { |
| 116 | 116 | continue; |
| 117 | 117 | } |
| 118 | - $field_metas[ $meta->field_id ] = $meta->meta_value; |
|
| 118 | + $field_metas[$meta->field_id] = $meta->meta_value; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | $filtered_vals = array_filter( $values['item_meta'] ); |
@@ -183,8 +183,8 @@ discard block |
||
| 183 | 183 | return false; |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | - if ( isset( self::$unique_id_match_checks[ $unique_id ] ) ) { |
|
| 187 | - return self::$unique_id_match_checks[ $unique_id ]; |
|
| 186 | + if ( isset( self::$unique_id_match_checks[$unique_id] ) ) { |
|
| 187 | + return self::$unique_id_match_checks[$unique_id]; |
|
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | $timestamp = strtotime( $created_at ); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $timestamp = time(); |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - self::$unique_id_match_checks[ $unique_id ] = (bool) FrmDb::get_var( |
|
| 196 | + self::$unique_id_match_checks[$unique_id] = (bool) FrmDb::get_var( |
|
| 197 | 197 | 'frm_item_metas', |
| 198 | 198 | array( |
| 199 | 199 | 'field_id' => 0, |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | 'id' |
| 204 | 204 | ); |
| 205 | 205 | |
| 206 | - return self::$unique_id_match_checks[ $unique_id ]; |
|
| 206 | + return self::$unique_id_match_checks[$unique_id]; |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | /** |
@@ -237,11 +237,11 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | foreach ( $filter_vals as $field_id => $value ) { |
| 239 | 239 | $field = FrmFieldFactory::get_field_object( $field_id ); |
| 240 | - $reduced[ $field_id ] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) ); |
|
| 241 | - $reduced[ $field_id ] = $field->set_value_before_save( $reduced[ $field_id ] ); |
|
| 240 | + $reduced[$field_id] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) ); |
|
| 241 | + $reduced[$field_id] = $field->set_value_before_save( $reduced[$field_id] ); |
|
| 242 | 242 | |
| 243 | - if ( '' === $reduced[ $field_id ] || ( is_array( $reduced[ $field_id ] ) && 0 === count( $reduced[ $field_id ] ) ) ) { |
|
| 244 | - unset( $reduced[ $field_id ] ); |
|
| 243 | + if ( '' === $reduced[$field_id] || ( is_array( $reduced[$field_id] ) && 0 === count( $reduced[$field_id] ) ) ) { |
|
| 244 | + unset( $reduced[$field_id] ); |
|
| 245 | 245 | } |
| 246 | 246 | } |
| 247 | 247 | return $reduced; |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | private static function prepare_entries( &$entries ) { |
| 544 | 544 | foreach ( $entries as $k => $entry ) { |
| 545 | 545 | self::prepare_entry( $entry ); |
| 546 | - $entries[ $k ] = $entry; |
|
| 546 | + $entries[$k] = $entry; |
|
| 547 | 547 | } |
| 548 | 548 | } |
| 549 | 549 | |
@@ -575,20 +575,20 @@ discard block |
||
| 575 | 575 | FrmFieldsHelper::prepare_field_value( $meta_val->meta_value, $meta_val->type ); |
| 576 | 576 | |
| 577 | 577 | if ( $meta_val->item_id == $entry->id ) { |
| 578 | - $entry->metas[ $meta_val->field_id ] = $meta_val->meta_value; |
|
| 578 | + $entry->metas[$meta_val->field_id] = $meta_val->meta_value; |
|
| 579 | 579 | |
| 580 | 580 | if ( $include_key ) { |
| 581 | - $entry->metas[ $meta_val->field_key ] = $entry->metas[ $meta_val->field_id ]; |
|
| 581 | + $entry->metas[$meta_val->field_key] = $entry->metas[$meta_val->field_id]; |
|
| 582 | 582 | } |
| 583 | 583 | continue; |
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | // include sub entries in an array |
| 587 | - if ( ! isset( $entry->metas[ $meta_val->field_id ] ) ) { |
|
| 588 | - $entry->metas[ $meta_val->field_id ] = array(); |
|
| 587 | + if ( ! isset( $entry->metas[$meta_val->field_id] ) ) { |
|
| 588 | + $entry->metas[$meta_val->field_id] = array(); |
|
| 589 | 589 | } |
| 590 | 590 | |
| 591 | - $entry->metas[ $meta_val->field_id ][] = $meta_val->meta_value; |
|
| 591 | + $entry->metas[$meta_val->field_id][] = $meta_val->meta_value; |
|
| 592 | 592 | |
| 593 | 593 | unset( $meta_val ); |
| 594 | 594 | }//end foreach |
@@ -696,16 +696,16 @@ discard block |
||
| 696 | 696 | } |
| 697 | 697 | |
| 698 | 698 | foreach ( $metas as $m_key => $meta_val ) { |
| 699 | - if ( ! isset( $entries[ $meta_val->item_id ] ) ) { |
|
| 699 | + if ( ! isset( $entries[$meta_val->item_id] ) ) { |
|
| 700 | 700 | continue; |
| 701 | 701 | } |
| 702 | 702 | |
| 703 | - if ( ! isset( $entries[ $meta_val->item_id ]->metas ) ) { |
|
| 704 | - $entries[ $meta_val->item_id ]->metas = array(); |
|
| 703 | + if ( ! isset( $entries[$meta_val->item_id]->metas ) ) { |
|
| 704 | + $entries[$meta_val->item_id]->metas = array(); |
|
| 705 | 705 | } |
| 706 | 706 | |
| 707 | 707 | FrmFieldsHelper::prepare_field_value( $meta_val->meta_value, $meta_val->type ); |
| 708 | - $entries[ $meta_val->item_id ]->metas[ $meta_val->field_id ] = $meta_val->meta_value; |
|
| 708 | + $entries[$meta_val->item_id]->metas[$meta_val->field_id] = $meta_val->meta_value; |
|
| 709 | 709 | unset( $m_key, $meta_val ); |
| 710 | 710 | } |
| 711 | 711 | |
@@ -904,7 +904,7 @@ discard block |
||
| 904 | 904 | * @return mixed |
| 905 | 905 | */ |
| 906 | 906 | private static function get_entry_value( $values, $name, $default ) { |
| 907 | - return $values[ $name ] ?? $default; |
|
| 907 | + return $values[$name] ?? $default; |
|
| 908 | 908 | } |
| 909 | 909 | |
| 910 | 910 | /** |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | global $frm_vars; |
| 1120 | 1120 | |
| 1121 | 1121 | if ( array_key_exists( 'captcha_scores', $frm_vars ) && array_key_exists( $form_id, $frm_vars['captcha_scores'] ) ) { |
| 1122 | - $captcha_score_meta = array( 'captcha_score' => $frm_vars['captcha_scores'][ $form_id ] ); |
|
| 1122 | + $captcha_score_meta = array( 'captcha_score' => $frm_vars['captcha_scores'][$form_id] ); |
|
| 1123 | 1123 | FrmEntryMeta::add_entry_meta( $entry_id, 0, '', maybe_serialize( $captcha_score_meta ) ); |
| 1124 | 1124 | } |
| 1125 | 1125 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $_GET['page'] = 'formidable'; |
| 28 | 28 | |
| 29 | - $values = array( |
|
| 29 | + $values = array( |
|
| 30 | 30 | 'id' => FrmAppHelper::get_post_param( 'form_id', '', 'absint' ), |
| 31 | 31 | 'doing_ajax' => true, |
| 32 | 32 | ); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | ob_start(); |
| 52 | 52 | self::load_single_field( $field, $values ); |
| 53 | - $field_html[ absint( $field->id ) ] = ob_get_contents(); |
|
| 53 | + $field_html[absint( $field->id )] = ob_get_contents(); |
|
| 54 | 54 | ob_end_clean(); |
| 55 | 55 | }//end foreach |
| 56 | 56 | |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | foreach ( $opts as $opt_key => $opt ) { |
| 289 | 289 | if ( strpos( $opt, '|' ) !== false ) { |
| 290 | 290 | $vals = explode( '|', $opt ); |
| 291 | - $opts[ $opt_key ] = array( |
|
| 291 | + $opts[$opt_key] = array( |
|
| 292 | 292 | 'label' => trim( $vals[0] ), |
| 293 | 293 | 'value' => trim( $vals[1] ), |
| 294 | 294 | ); |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | |
| 305 | 305 | foreach ( $field['options'] as $opt_key => $opt ) { |
| 306 | 306 | if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) { |
| 307 | - $other_array[ $opt_key ] = $opt; |
|
| 307 | + $other_array[$opt_key] = $opt; |
|
| 308 | 308 | } |
| 309 | 309 | unset( $opt_key, $opt ); |
| 310 | 310 | } |
@@ -349,18 +349,18 @@ discard block |
||
| 349 | 349 | $frm_settings = FrmAppHelper::get_settings(); |
| 350 | 350 | $field_types = FrmFieldTypeOptionData::get_field_types( $field['type'] ); |
| 351 | 351 | |
| 352 | - if ( ! isset( $all_field_types[ $field['type'] ] ) ) { |
|
| 352 | + if ( ! isset( $all_field_types[$field['type']] ) ) { |
|
| 353 | 353 | // Add fallback for an add-on field type that has been deactivated. |
| 354 | - $all_field_types[ $field['type'] ] = array( |
|
| 354 | + $all_field_types[$field['type']] = array( |
|
| 355 | 355 | 'name' => ucfirst( $field['type'] ), |
| 356 | 356 | 'icon' => 'frm_icon_font frm_pencil_icon', |
| 357 | 357 | ); |
| 358 | - } elseif ( ! is_array( $all_field_types[ $field['type'] ] ) ) { |
|
| 358 | + } elseif ( ! is_array( $all_field_types[$field['type']] ) ) { |
|
| 359 | 359 | // Fallback for fields added in a more basic way. |
| 360 | - FrmFormsHelper::prepare_field_type( $all_field_types[ $field['type'] ] ); |
|
| 360 | + FrmFormsHelper::prepare_field_type( $all_field_types[$field['type']] ); |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | - $type_name = $all_field_types[ $field['type'] ]['name']; |
|
| 363 | + $type_name = $all_field_types[$field['type']]['name']; |
|
| 364 | 364 | |
| 365 | 365 | if ( $field['type'] === 'divider' && FrmField::is_option_true( $field, 'repeat' ) ) { |
| 366 | 366 | $type_name = $all_field_types['divider|repeat']['name']; |
@@ -439,14 +439,14 @@ discard block |
||
| 439 | 439 | |
| 440 | 440 | if ( FrmAppHelper::pro_is_connected() ) { |
| 441 | 441 | foreach ( $settings as $type ) { |
| 442 | - if ( ! empty( $field[ $type ] ) ) { |
|
| 442 | + if ( ! empty( $field[$type] ) ) { |
|
| 443 | 443 | $active = $type; |
| 444 | 444 | } |
| 445 | 445 | } |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | - $types[ $active ]['class'] .= ' current'; |
|
| 449 | - $types[ $active ]['current'] = true; |
|
| 448 | + $types[$active]['class'] .= ' current'; |
|
| 449 | + $types[$active]['current'] = true; |
|
| 450 | 450 | |
| 451 | 451 | return $types; |
| 452 | 452 | } |
@@ -466,8 +466,8 @@ discard block |
||
| 466 | 466 | 'image' => 'url', |
| 467 | 467 | ); |
| 468 | 468 | |
| 469 | - if ( isset( $type_switch[ $type ] ) ) { |
|
| 470 | - $type = $type_switch[ $type ]; |
|
| 469 | + if ( isset( $type_switch[$type] ) ) { |
|
| 470 | + $type = $type_switch[$type]; |
|
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | $pro_fields = FrmField::pro_field_selection(); |
@@ -632,11 +632,11 @@ discard block |
||
| 632 | 632 | // include "col" for valid html |
| 633 | 633 | $unit = trim( preg_replace( '/[0-9]+/', '', $field['size'] ) ); |
| 634 | 634 | |
| 635 | - if ( ! isset( $calc[ $unit ] ) ) { |
|
| 635 | + if ( ! isset( $calc[$unit] ) ) { |
|
| 636 | 636 | return; |
| 637 | 637 | } |
| 638 | 638 | |
| 639 | - $size = (float) str_replace( $unit, '', $field['size'] ) / $calc[ $unit ]; |
|
| 639 | + $size = (float) str_replace( $unit, '', $field['size'] ) / $calc[$unit]; |
|
| 640 | 640 | |
| 641 | 641 | $add_html['cols'] = 'cols="' . absint( $size ) . '"'; |
| 642 | 642 | } |
@@ -892,12 +892,12 @@ discard block |
||
| 892 | 892 | global $frm_vars; |
| 893 | 893 | |
| 894 | 894 | if ( ! empty( $frm_vars['js_validate_forms'] ) ) { |
| 895 | - if ( isset( $frm_vars['js_validate_forms'][ $field['form_id'] ] ) ) { |
|
| 896 | - return $frm_vars['js_validate_forms'][ $field['form_id'] ]; |
|
| 895 | + if ( isset( $frm_vars['js_validate_forms'][$field['form_id']] ) ) { |
|
| 896 | + return $frm_vars['js_validate_forms'][$field['form_id']]; |
|
| 897 | 897 | } |
| 898 | 898 | |
| 899 | - if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][ $field['parent_form_id'] ] ) ) { |
|
| 900 | - return $frm_vars['js_validate_forms'][ $field['parent_form_id'] ]; |
|
| 899 | + if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][$field['parent_form_id']] ) ) { |
|
| 900 | + return $frm_vars['js_validate_forms'][$field['parent_form_id']]; |
|
| 901 | 901 | } |
| 902 | 902 | } |
| 903 | 903 | return false; |
@@ -991,13 +991,13 @@ discard block |
||
| 991 | 991 | if ( isset( $field['subfield_name'] ) && 0 === strpos( $k, 'aria-invalid' ) ) { |
| 992 | 992 | $subfield_name = $field['subfield_name']; |
| 993 | 993 | |
| 994 | - if ( ! isset( $field['shortcodes'][ 'aria-invalid-' . $subfield_name ] ) ) { |
|
| 994 | + if ( ! isset( $field['shortcodes']['aria-invalid-' . $subfield_name] ) ) { |
|
| 995 | 995 | continue; |
| 996 | 996 | } |
| 997 | 997 | // Change the key to the correct aria-invalid value so that $add_html is set correctly for the current subfield of a combo field. |
| 998 | 998 | $k = 'aria-invalid'; |
| 999 | - $v = $field['shortcodes'][ 'aria-invalid-' . $subfield_name ]; |
|
| 1000 | - unset( $field['shortcodes'][ 'aria-invalid-' . $subfield_name ] ); |
|
| 999 | + $v = $field['shortcodes']['aria-invalid-' . $subfield_name]; |
|
| 1000 | + unset( $field['shortcodes']['aria-invalid-' . $subfield_name] ); |
|
| 1001 | 1001 | } |
| 1002 | 1002 | |
| 1003 | 1003 | if ( 'opt' === $k || ! self::should_allow_input_attribute( $k ) ) { |
@@ -1006,10 +1006,10 @@ discard block |
||
| 1006 | 1006 | |
| 1007 | 1007 | if ( is_numeric( $k ) && strpos( $v, '=' ) ) { |
| 1008 | 1008 | $add_html[] = $v; |
| 1009 | - } elseif ( ! empty( $k ) && isset( $add_html[ $k ] ) ) { |
|
| 1010 | - $add_html[ $k ] = str_replace( $k . '="', $k . '="' . $v, $add_html[ $k ] ); |
|
| 1009 | + } elseif ( ! empty( $k ) && isset( $add_html[$k] ) ) { |
|
| 1010 | + $add_html[$k] = str_replace( $k . '="', $k . '="' . $v, $add_html[$k] ); |
|
| 1011 | 1011 | } else { |
| 1012 | - $add_html[ $k ] = $k . '="' . esc_attr( $v ) . '"'; |
|
| 1012 | + $add_html[$k] = $k . '="' . esc_attr( $v ) . '"'; |
|
| 1013 | 1013 | } |
| 1014 | 1014 | |
| 1015 | 1015 | unset( $k, $v ); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | foreach ( $field['options'] as $opt_key => $opt ) { |
| 56 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 56 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 57 | 57 | |
| 58 | 58 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 59 | 59 | continue; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | continue; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 29 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 30 | 30 | |
| 31 | 31 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 32 | 32 | continue; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | continue; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - $choice_limit_reached = $field_choices_limit_reached_statuses[ $opt_key ] ?? false; |
|
| 31 | + $choice_limit_reached = $field_choices_limit_reached_statuses[$opt_key] ?? false; |
|
| 32 | 32 | |
| 33 | 33 | if ( FrmFieldsHelper::should_hide_field_choice( $choice_limit_reached, $field['form_id'] ) ) { |
| 34 | 34 | continue; |
@@ -113,6 +113,6 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | ?></div> |
| 115 | 115 | <?php |
| 116 | - ++$option_index; |
|
| 116 | + ++ $option_index; |
|
| 117 | 117 | }//end foreach |
| 118 | 118 | }//end if |
@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | $buffer = ''; |
| 26 | 26 | |
| 27 | 27 | while ( $i < $length ) { |
| 28 | - $char = $css[ $i ]; |
|
| 28 | + $char = $css[$i]; |
|
| 29 | 29 | |
| 30 | 30 | if ( '@' === $char ) { |
| 31 | 31 | $brace_pos = strpos( $css, '{', $i ); |
| 32 | 32 | |
| 33 | 33 | if ( false === $brace_pos ) { |
| 34 | 34 | $buffer .= $char; |
| 35 | - ++$i; |
|
| 35 | + ++ $i; |
|
| 36 | 36 | continue; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | }//end if |
| 85 | 85 | |
| 86 | 86 | $buffer .= $char; |
| 87 | - ++$i; |
|
| 87 | + ++ $i; |
|
| 88 | 88 | }//end while |
| 89 | 89 | |
| 90 | 90 | return implode( '', $output ); |
@@ -112,14 +112,14 @@ discard block |
||
| 112 | 112 | $prefix_length = strlen( $prefix ); |
| 113 | 113 | |
| 114 | 114 | while ( $i < $length ) { |
| 115 | - $char = $css[ $i ]; |
|
| 115 | + $char = $css[$i]; |
|
| 116 | 116 | |
| 117 | 117 | if ( '@' === $char ) { |
| 118 | 118 | $brace_pos = strpos( $css, '{', $i ); |
| 119 | 119 | |
| 120 | 120 | if ( false === $brace_pos ) { |
| 121 | 121 | $buffer .= $char; |
| 122 | - ++$i; |
|
| 122 | + ++ $i; |
|
| 123 | 123 | |
| 124 | 124 | continue; |
| 125 | 125 | } |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | if ( '' !== $selector && '' !== trim( $declarations ) ) { |
| 149 | 149 | // Handle multiple selectors |
| 150 | - $selectors = array_filter( |
|
| 150 | + $selectors = array_filter( |
|
| 151 | 151 | array_map( 'trim', explode( ',', $selector ) ), |
| 152 | - function ( $s ) { |
|
| 152 | + function( $s ) { |
|
| 153 | 153 | return '' !== $s; |
| 154 | 154 | } |
| 155 | 155 | ); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | }//end if |
| 173 | 173 | |
| 174 | 174 | $buffer .= $char; |
| 175 | - ++$i; |
|
| 175 | + ++ $i; |
|
| 176 | 176 | }//end while |
| 177 | 177 | return implode( '', $output ); |
| 178 | 178 | } |
@@ -228,11 +228,11 @@ discard block |
||
| 228 | 228 | $in_string = false; |
| 229 | 229 | $string_char = ''; |
| 230 | 230 | |
| 231 | - for ( $i = $open_pos + 1; $i < $length; $i++ ) { |
|
| 232 | - $char = $css[ $i ]; |
|
| 231 | + for ( $i = $open_pos + 1; $i < $length; $i ++ ) { |
|
| 232 | + $char = $css[$i]; |
|
| 233 | 233 | |
| 234 | 234 | // Handle string literals to avoid matching braces inside strings |
| 235 | - if ( ( '"' === $char || "'" === $char ) && ( 0 === $i || '\\' !== $css[ $i - 1 ] ) ) { |
|
| 235 | + if ( ( '"' === $char || "'" === $char ) && ( 0 === $i || '\\' !== $css[$i - 1] ) ) { |
|
| 236 | 236 | if ( ! $in_string ) { |
| 237 | 237 | $in_string = true; |
| 238 | 238 | $string_char = $char; |
@@ -248,9 +248,9 @@ discard block |
||
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | if ( '{' === $char ) { |
| 251 | - ++$level; |
|
| 251 | + ++ $level; |
|
| 252 | 252 | } elseif ( '}' === $char ) { |
| 253 | - --$level; |
|
| 253 | + -- $level; |
|
| 254 | 254 | |
| 255 | 255 | if ( 0 === $level ) { |
| 256 | 256 | return $i; |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | // Get posted data. |
| 89 | 89 | $plugin_slug = FrmAppHelper::get_post_param( 'plugin', '', 'sanitize_text_field' ); |
| 90 | 90 | |
| 91 | - if ( ! empty( get_plugins()[ $plugin_slug ] ) ) { |
|
| 91 | + if ( ! empty( get_plugins()[$plugin_slug] ) ) { |
|
| 92 | 92 | $activate = activate_plugin( $plugin_slug ); |
| 93 | 93 | } else { |
| 94 | 94 | // Include necessary files for plugin installation. |