GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 165b67...57aaae )
by Liuta
02:24
created
includes/class-xcloner-scheduler.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -48,10 +48,11 @@  discard block
 block discarded – undo
48 48
 		{
49 49
 			$new_list= array();
50 50
 			
51
-			foreach($list as $res)
52
-				if($res->status)
51
+			foreach($list as $res) {
52
+							if($res->status)
53 53
 				{
54 54
 					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id))+(get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
55
+			}
55 56
 					$new_list[] = $res;
56 57
 				}
57 58
 			$list = $new_list;	
@@ -77,8 +78,9 @@  discard block
 block discarded – undo
77 78
 	{
78 79
 		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A);
79 80
 		
80
-		if(!$data)
81
-			return false;
81
+		if(!$data) {
82
+					return false;
83
+		}
82 84
 		
83 85
 		$params = json_decode($data['params']);
84 86
 		
@@ -131,11 +133,11 @@  discard block
 block discarded – undo
131 133
 				if($schedule->recurrence == "single")
132 134
 				{
133 135
 					wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
134
-				}else{	
136
+				} else{	
135 137
 					wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
136 138
 				}
137 139
 					
138
-			}elseif(!$schedule->status)
140
+			} elseif(!$schedule->status)
139 141
 			{
140 142
 				$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
141 143
 				wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
@@ -157,7 +159,7 @@  discard block
 block discarded – undo
157 159
 			if($schedule->recurrence == "single")
158 160
 			{
159 161
 				wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
160
-			}else{	
162
+			} else{	
161 163
 				wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
162 164
 			}
163 165
 				
@@ -300,8 +302,9 @@  discard block
 block discarded – undo
300 302
 		
301 303
 		//getting the last backup archive file
302 304
 		$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension();
303
-		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
304
-				$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
305
+		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension())) {
306
+						$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
307
+		}
305 308
 				
306 309
 		$this->update_last_backup($schedule['id'], $return['extra']['backup_parent']);
307 310
 		
@@ -311,8 +314,9 @@  discard block
 block discarded – undo
311 314
 			
312 315
 			$this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON"));
313 316
 			
314
-			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
315
-				call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
317
+			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage")) {
318
+							call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
319
+			}
316 320
 		}
317 321
 		
318 322
 		if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
@@ -331,7 +335,7 @@  discard block
 block discarded – undo
331 335
 					$this->xcloner_file_system->delete_backup_by_name($return['extra']['backup_parent']);
332 336
 					
333 337
 				}
334
-			}catch(Exception $e)
338
+			} catch(Exception $e)
335 339
 			{
336 340
 				$this->logger->error($e->getMessage());
337 341
 			}
@@ -353,7 +357,7 @@  discard block
 block discarded – undo
353 357
 
354 358
 			$this->__xcloner_scheduler_callback($id, $schedule);
355 359
 			
356
-		}catch(Exception $e){
360
+		} catch(Exception $e){
357 361
 			
358 362
 			//send email to site admin if email notification is not set in the scheduler
359 363
 			if(!isset($schedule['backup_params']->email_notification) || !$schedule['backup_params']->email_notification)
Please login to merge, or discard this patch.