@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $active_step = 0; |
| 127 | 127 | |
| 128 | 128 | foreach ( $step_keys as $index => $step_key ) { |
| 129 | - $completed_step = isset( self::$checklist['completed_steps'][ $step_key ] ); |
|
| 129 | + $completed_step = isset( self::$checklist['completed_steps'][$step_key] ); |
|
| 130 | 130 | |
| 131 | 131 | if ( false === $completed_step ) { |
| 132 | 132 | switch ( $step_key ) { |
@@ -139,16 +139,16 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - if ( $completed_step && ! isset( self::$checklist['completed_steps'][ $step_key ] ) ) { |
|
| 143 | - self::$checklist['completed_steps'][ $step_key ] = true; |
|
| 142 | + if ( $completed_step && ! isset( self::$checklist['completed_steps'][$step_key] ) ) { |
|
| 143 | + self::$checklist['completed_steps'][$step_key] = true; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | // Count completed steps from start until gap found. |
| 147 | 147 | if ( $completed_step && $index === $active_step ) { |
| 148 | - $active_step++; |
|
| 148 | + $active_step ++; |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - self::$steps['steps'][ $index ]['completed'] = $completed_step; |
|
| 151 | + self::$steps['steps'][$index]['completed'] = $completed_step; |
|
| 152 | 152 | }//end foreach |
| 153 | 153 | |
| 154 | 154 | self::$checklist['active_step'] = $active_step; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | self::$checklist['done'] = true; |
| 158 | 158 | self::$checklist['active_step_key'] = 'completed'; |
| 159 | 159 | } else { |
| 160 | - self::$checklist['active_step_key'] = $step_keys[ $active_step ]; |
|
| 160 | + self::$checklist['active_step_key'] = $step_keys[$active_step]; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | self::save_checklist(); |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | private static function fill_step_completed_data( $steps, $steps_keys ) { |
| 213 | 213 | return array_map( |
| 214 | - function ( $step, $step_key ) { |
|
| 215 | - $step['completed'] = isset( self::$checklist['completed_steps'][ $step_key ] ); |
|
| 214 | + function( $step, $step_key ) { |
|
| 215 | + $step['completed'] = isset( self::$checklist['completed_steps'][$step_key] ); |
|
| 216 | 216 | return $step; |
| 217 | 217 | }, |
| 218 | 218 | $steps, |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | break; |
| 261 | 261 | }//end switch |
| 262 | 262 | |
| 263 | - return array_merge( self::$steps['steps'][ self::$checklist['active_step'] ], $spotlight_data ); |
|
| 263 | + return array_merge( self::$steps['steps'][self::$checklist['active_step']], $spotlight_data ); |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | /** |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | self::$checklist = self::get_checklist(); |
| 356 | - self::$checklist['completed_steps'][ $step_key ] = true; |
|
| 356 | + self::$checklist['completed_steps'][$step_key] = true; |
|
| 357 | 357 | self::save_checklist(); |
| 358 | 358 | |
| 359 | 359 | wp_send_json_success(); |