@@ -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,20 +136,20 @@ 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; |
| 152 | - self::$checklist['active_step_key'] = $step_keys[ $active_step ]; |
|
| 152 | + self::$checklist['active_step_key'] = $step_keys[$active_step]; |
|
| 153 | 153 | self::save_checklist(); |
| 154 | 154 | } |
| 155 | 155 | |
@@ -200,8 +200,8 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | private static function fill_step_completed_data( $steps, $steps_keys ) { |
| 202 | 202 | return array_map( |
| 203 | - function ( $step, $step_key ) { |
|
| 204 | - $step['completed'] = isset( self::$checklist['completed_steps'][ $step_key ] ); |
|
| 203 | + function( $step, $step_key ) { |
|
| 204 | + $step['completed'] = isset( self::$checklist['completed_steps'][$step_key] ); |
|
| 205 | 205 | return $step; |
| 206 | 206 | }, |
| 207 | 207 | $steps, |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | break; |
| 254 | 254 | }//end switch |
| 255 | 255 | |
| 256 | - return array_merge( self::$steps['steps'][ self::$checklist['active_step'] ], $spotlight_data ); |
|
| 256 | + return array_merge( self::$steps['steps'][self::$checklist['active_step']], $spotlight_data ); |
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | /** |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | self::$checklist = self::get_checklist(); |
| 339 | - self::$checklist['completed_steps'][ $step_key ] = true; |
|
| 339 | + self::$checklist['completed_steps'][$step_key] = true; |
|
| 340 | 340 | self::save_checklist(); |
| 341 | 341 | |
| 342 | 342 | wp_send_json_success(); |