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 ( 768e89...1a6a13 )
by Liuta
05:43 queued 02:30
created
includes/class-xcloner-scheduler.php 1 patch
Braces   +23 added lines, -18 removed lines patch added patch discarded remove patch
@@ -35,10 +35,11 @@  discard block
 block discarded – undo
35 35
 		{
36 36
 			$new_list= array();
37 37
 			
38
-			foreach($list as $res)
39
-				if($res->status)
38
+			foreach($list as $res) {
39
+							if($res->status)
40 40
 				{
41 41
 					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id));
42
+			}
42 43
 					$new_list[] = $res;
43 44
 				}
44 45
 			$list = $new_list;	
@@ -64,8 +65,9 @@  discard block
 block discarded – undo
64 65
 	{
65 66
 		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A);
66 67
 		
67
-		if(!$data)
68
-			return false;
68
+		if(!$data) {
69
+					return false;
70
+		}
69 71
 		
70 72
 		$params = json_decode($data['params']);
71 73
 		
@@ -115,12 +117,13 @@  discard block
 block discarded – undo
115 117
 			
116 118
 			if ( ! wp_next_scheduled( $hook, array($schedule->id) ) and $schedule->status) {
117 119
 				
118
-				if($schedule->recurrence == "single")
119
-					wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
120
-				else	
121
-					wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
120
+				if($schedule->recurrence == "single") {
121
+									wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
122
+				} else {
123
+									wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
124
+				}
122 125
 					
123
-			}elseif(!$schedule->status)
126
+			} elseif(!$schedule->status)
124 127
 			{
125 128
 				$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
126 129
 				wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
@@ -139,9 +142,9 @@  discard block
 block discarded – undo
139 142
 		
140 143
 		if ($schedule->status) {
141 144
 			
142
-			if($schedule->recurrence == "single")
143
-				wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
144
-			else{	
145
+			if($schedule->recurrence == "single") {
146
+							wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
147
+			} else{	
145 148
 				wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
146 149
 			}
147 150
 				
@@ -271,8 +274,9 @@  discard block
 block discarded – undo
271 274
 		
272 275
 		//getting the last backup archive file
273 276
 		$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension();
274
-		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
275
-				$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
277
+		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension())) {
278
+						$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
279
+		}
276 280
 		
277 281
 		$this->update_last_backup($schedule['id'], $return['extra']['backup_parent']);
278 282
 		
@@ -282,8 +286,9 @@  discard block
 block discarded – undo
282 286
 			
283 287
 			$this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON"));
284 288
 			
285
-			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
286
-				call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
289
+			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage")) {
290
+							call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
291
+			}
287 292
 		}
288 293
 		
289 294
 		
@@ -292,7 +297,7 @@  discard block
 block discarded – undo
292 297
 			try{
293 298
 				$from = "XCloner Schedule - ".$schedule['name'];
294 299
 				$this->archive_system->send_notification($to, $from, "", $return['extra']['backup_parent'], $schedule);
295
-			}catch(Exception $e)
300
+			} catch(Exception $e)
296 301
 			{
297 302
 				$this->logger->error($e->getMessage());
298 303
 			}
@@ -311,7 +316,7 @@  discard block
 block discarded – undo
311 316
 
312 317
 			$this->__xcloner_scheduler_callback($id, $schedule);
313 318
 			
314
-		}catch(Exception $e){
319
+		} catch(Exception $e){
315 320
 			
316 321
 			if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
317 322
 			{
Please login to merge, or discard this patch.