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.
Passed
Branch dev (79c8c7)
by Liuta
02:51
created
includes/class-xcloner-api.php 1 patch
Braces   +22 added lines, -14 removed lines patch added patch discarded remove patch
@@ -810,23 +810,23 @@  discard block
 block discarded – undo
810 810
 
811 811
 			if(isset($this->form_params['extra']['start'])) {
812 812
 				$start = $this->xcloner_sanitization->sanitize_input_as_int($this->form_params['extra']['start']);
813
-			}else{
813
+			} else{
814 814
 				$start = 0;
815 815
 			}
816 816
 
817 817
 			if(isset($this->form_params['extra']['iv'])) {
818 818
 				$iv = $this->xcloner_sanitization->sanitize_input_as_raw($this->form_params['extra']['iv']);
819
-			}else{
819
+			} else{
820 820
 				$iv = "";
821 821
 			}
822 822
 
823 823
 			if(isset($this->form_params['extra']['part'])) {
824 824
 				$return['part'] = (int)$this->xcloner_sanitization->sanitize_input_as_int($this->form_params['extra']['part']);
825
-			}else{
825
+			} else{
826 826
 				$return['part'] = 0;
827 827
 			}
828 828
 
829
-		}else{
829
+		} else{
830 830
 			$source_backup_file = $this->xcloner_sanitization->sanitize_input_as_string($_POST['file']);
831 831
 			$start = $this->xcloner_sanitization->sanitize_input_as_int($_POST['start']);
832 832
 			$iv = $this->xcloner_sanitization->sanitize_input_as_raw($_POST['iv']);
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
 			$this->logger->info($iv);
849 849
 			$return = array_merge($return,
850 850
 				$this->xcloner_encryption->encrypt_file($backup_file, "", "", $start, base64_decode($iv)));
851
-		}catch(\Exception $e){
851
+		} catch(\Exception $e){
852 852
 			$return['error'] = true;
853 853
 			$return['message'] = $e->getMessage();
854 854
 			$return['error_message'] = $e->getMessage();
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
 		try {
906 906
 			$return = array_merge($return,
907 907
 				$this->xcloner_encryption->decrypt_file($backup_file, "", $decryption_key, $start, base64_decode($iv)));
908
-		}catch(\Exception $e){
908
+		} catch(\Exception $e){
909 909
 			$return['error'] = true;
910 910
 			$return['message'] = $e->getMessage();
911 911
 		}
@@ -1009,7 +1009,8 @@  discard block
 block discarded – undo
1009 1009
                                                    title="<?php echo __('Backup Decryption', 'xcloner-backup-and-restore') ?>">
1010 1010
                                                     <i class="material-icons">enhanced_encryption</i>
1011 1011
                                                 </a>
1012
-                                            <?php else: ?>
1012
+                                            <?php else {
1013
+	: ?>
1013 1014
                                                 <a href="#<?php echo $child[0] ?>" class="list-backup-content"
1014 1015
                                                    title="<?php echo __('List Backup Content',
1015 1016
 													   'xcloner-backup-and-restore') ?>"><i
@@ -1028,7 +1029,9 @@  discard block
 block discarded – undo
1028 1029
                                                         class="material-icons">file_upload</i></a>
1029 1030
                                         <?php endif ?>
1030 1031
                                     </li>
1031
-                                <?php endforeach; ?>
1032
+                                <?php endforeach;
1033
+}
1034
+?>
1032 1035
                             </ul>
1033 1036
                         <?php endif; ?>
1034 1037
                 <?php
@@ -1036,11 +1039,12 @@  discard block
 block discarded – undo
1036 1039
 				ob_end_clean();
1037 1040
 				?>
1038 1041
                     <?php ob_start(); ?>
1039
-                        <?php if (isset($file_info['timestamp']))
1042
+                        <?php if (isset($file_info['timestamp'])) {
1040 1043
 							echo date("Y-m-d H:i", $file_info['timestamp'])
1041 1044
 						?>
1042 1045
                     <?php
1043 1046
 						$return['data'][$i][] = ob_get_contents();
1047
+}
1044 1048
 						ob_end_clean();
1045 1049
 						?>
1046 1050
 
@@ -1065,15 +1069,17 @@  discard block
 block discarded – undo
1065 1069
                             <?php endif ?>
1066 1070
                             <?php
1067 1071
 							$basename = $file_info['basename'];
1068
-							if(isset($file_info['childs']) and sizeof($file_info['childs']))
1069
-								$basename = $file_info['childs'][0][0];
1072
+							if(isset($file_info['childs']) and sizeof($file_info['childs'])) {
1073
+															$basename = $file_info['childs'][0][0];
1074
+							}
1070 1075
 							?>
1071 1076
                             <?php if($this->xcloner_encryption->is_encrypted_file($basename)) :?>
1072 1077
                                 <a href="#<?php echo $file_info['basename'] ?>" class="backup-decryption"
1073 1078
                                    title="<?php echo __('Backup Decryption', 'xcloner-backup-and-restore') ?>">
1074 1079
                                     <i class="material-icons">enhanced_encryption</i>
1075 1080
                                 </a>
1076
-                            <?php else: ?>
1081
+                            <?php else {
1082
+	: ?>
1077 1083
                                 <a href="#<?php echo $file_info['basename'] ?>" class="list-backup-content"
1078 1084
                                     title="<?php echo __('List Backup Content', 'xcloner-backup-and-restore') ?>"><i
1079 1085
                                     class="material-icons">folder_open</i></a>
@@ -1083,7 +1089,9 @@  discard block
 block discarded – undo
1083 1089
                                     <i class="material-icons">no_encryption</i>
1084 1090
                                 </a>
1085 1091
                             <?php endif?>
1086
-                        <?php endif; ?>
1092
+                        <?php endif;
1093
+}
1094
+?>
1087 1095
 
1088 1096
                         <a href="#<?php echo $file_info['basename'] ?>" class="delete"
1089 1097
                            title="<?php echo __('Delete Backup', 'xcloner-backup-and-restore') ?>">
@@ -1335,7 +1343,7 @@  discard block
 block discarded – undo
1335 1343
 
1336 1344
 		try {
1337 1345
             unlink($tmp_file);
1338
-        }catch(Exception $e) {
1346
+        } catch(Exception $e) {
1339 1347
 		    //We are not interested in the error here
1340 1348
         }
1341 1349
 
Please login to merge, or discard this patch.