@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $active_step = 0; |
| 124 | 124 | |
| 125 | 125 | foreach ( $step_keys as $index => $step_key ) { |
| 126 | - $completed_step = isset( self::$checklist['completed_steps'][ $step_key ] ); |
|
| 126 | + $completed_step = isset( self::$checklist['completed_steps'][$step_key] ); |
|
| 127 | 127 | |
| 128 | 128 | if ( false === $completed_step ) { |
| 129 | 129 | switch ( $step_key ) { |
@@ -136,16 +136,16 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - if ( $completed_step && ! isset( self::$checklist['completed_steps'][ $step_key ] ) ) { |
|
| 140 | - self::$checklist['completed_steps'][ $step_key ] = true; |
|
| 139 | + if ( $completed_step && ! isset( self::$checklist['completed_steps'][$step_key] ) ) { |
|
| 140 | + self::$checklist['completed_steps'][$step_key] = true; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | // Count completed steps from start until gap found. |
| 144 | 144 | if ( $completed_step && $index === $active_step ) { |
| 145 | - $active_step++; |
|
| 145 | + $active_step ++; |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - self::$steps['steps'][ $index ]['completed'] = $completed_step; |
|
| 148 | + self::$steps['steps'][$index]['completed'] = $completed_step; |
|
| 149 | 149 | }//end foreach |
| 150 | 150 | |
| 151 | 151 | self::$checklist['active_step'] = $active_step; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | FrmUsageController::update_flows_data( 'welcome_tour_completed_steps', $step_key ); |
| 159 | 159 | } |
| 160 | 160 | } else { |
| 161 | - self::$checklist['active_step_key'] = $step_keys[ $active_step ]; |
|
| 161 | + self::$checklist['active_step_key'] = $step_keys[$active_step]; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | self::save_checklist(); |
@@ -212,8 +212,8 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | private static function fill_step_completed_data( $steps, $steps_keys ) { |
| 214 | 214 | return array_map( |
| 215 | - function ( $step, $step_key ) { |
|
| 216 | - $step['completed'] = isset( self::$checklist['completed_steps'][ $step_key ] ); |
|
| 215 | + function( $step, $step_key ) { |
|
| 216 | + $step['completed'] = isset( self::$checklist['completed_steps'][$step_key] ); |
|
| 217 | 217 | return $step; |
| 218 | 218 | }, |
| 219 | 219 | $steps, |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | 'target' => '#frm_style_sidebar .frm-style-card > div', |
| 250 | 250 | 'left-position' => 'end', |
| 251 | 251 | 'offset' => array( |
| 252 | - 'top' => -22, |
|
| 252 | + 'top' => - 22, |
|
| 253 | 253 | 'left' => 16, |
| 254 | 254 | ), |
| 255 | 255 | ); |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | break; |
| 266 | 266 | }//end switch |
| 267 | 267 | |
| 268 | - return array_merge( self::$steps['steps'][ self::$checklist['active_step'] ], $spotlight_data ); |
|
| 268 | + return array_merge( self::$steps['steps'][self::$checklist['active_step']], $spotlight_data ); |
|
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | /** |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | self::$checklist = self::get_checklist(); |
| 361 | - self::$checklist['completed_steps'][ $step_key ] = true; |
|
| 361 | + self::$checklist['completed_steps'][$step_key] = true; |
|
| 362 | 362 | self::save_checklist(); |
| 363 | 363 | |
| 364 | 364 | wp_send_json_success(); |