Completed
Pull Request — 1.10.x (#1244)
by
unknown
42:26
created
main/plagiarism/compilatio/compilatio.class.php 1 patch
Braces   +13 added lines, -20 removed lines patch added patch discarded remove patch
@@ -41,18 +41,16 @@  discard block
 block discarded – undo
41 41
 								'exceptions' => true);
42 42
 						}
43 43
 						$this->soapcli = new SoapClient($urlsoap,$param);
44
-					}else{
44
+					} else{
45 45
 						$this->soapcli = 'WS urlsoap not available' ;
46 46
 					}
47
-				}else{
47
+				} else{
48 48
 					$this->soapcli ='API key not available';
49 49
 				}
50
-			}
51
-			catch (SoapFault $fault)
50
+			} catch (SoapFault $fault)
52 51
 			{
53 52
 				$this->soapcli = "Error constructor compilatio " . $fault->faultcode ." " .$fault->faultstring ;
54
-			}
55
-			catch (Exception $e) {
53
+			} catch (Exception $e) {
56 54
 				$this->soapcli = "Error constructor compilatio with urlsoap" . $urlsoap;
57 55
 			}
58 56
 		}
@@ -72,8 +70,9 @@  discard block
 block discarded – undo
72 70
 		{
73 71
 			try
74 72
 			{
75
-				if (!is_object($this->soapcli))
76
-					return("Error in constructor compilatio() " . $this->soapcli);
73
+				if (!is_object($this->soapcli)) {
74
+									return("Error in constructor compilatio() " . $this->soapcli);
75
+				}
77 76
 				$idDocument = $this->soapcli->__call('addDocumentBase64',
78 77
 					array(
79 78
 						$this->key,
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
 					)
86 85
 				);
87 86
 				return $idDocument;
88
-			}
89
-			catch (SoapFault $fault)
87
+			} catch (SoapFault $fault)
90 88
 			{
91 89
                 return("Erreur sendDoc()" . $fault->faultcode ." " .$fault->faultstring);
92 90
 			}
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
 				$param = array($this->key, $compiHash);
109 107
 				$idDocument = $this->soapcli->__call('getDocument', $param);
110 108
 				return $idDocument;
111
-			}
112
-			catch (SoapFault $fault)
109
+			} catch (SoapFault $fault)
113 110
 			{
114 111
                 return("Erreur getDoc()" . $fault->faultcode . " " .$fault->faultstring);
115 112
 			}
@@ -130,8 +127,7 @@  discard block
 block discarded – undo
130 127
 				$param = array($this->key,$compiHash);
131 128
 				$idDocument = $this->soapcli->__call('getDocumentReportUrl', $param);
132 129
 				return $idDocument;
133
-			}
134
-			catch (SoapFault $fault)
130
+			} catch (SoapFault $fault)
135 131
 			{
136 132
                 return("Erreur  getReportUrl()" . $fault->faultcode ." " .$fault->faultstring);
137 133
 			}
@@ -151,8 +147,7 @@  discard block
 block discarded – undo
151 147
 				}
152 148
 				$param = array($this->key,$compiHash);
153 149
 				$this->soapcli->__call('deleteDocument', $param);
154
-			}
155
-			catch (SoapFault $fault)
150
+			} catch (SoapFault $fault)
156 151
 			{
157 152
                 return("Erreur  deldoc()" . $fault->faultcode . " " .$fault->faultstring);
158 153
 			}
@@ -172,8 +167,7 @@  discard block
 block discarded – undo
172 167
 				}
173 168
 				$param = array($this->key,$compiHash);
174 169
                 $this->soapcli->__call('startDocumentAnalyse', $param);
175
-			}
176
-			catch (SoapFault $fault)
170
+			} catch (SoapFault $fault)
177 171
 			{
178 172
                 return("Erreur  startAnalyse()" . $fault->faultcode ." " .$fault->faultstring);
179 173
 			}
@@ -193,8 +187,7 @@  discard block
 block discarded – undo
193 187
 				$param=array($this->key);
194 188
                 $resultat=$this->soapcli->__call('getAccountQuotas', $param);
195 189
 				return $resultat;
196
-			}
197
-			catch (SoapFault $fault)
190
+			} catch (SoapFault $fault)
198 191
 			{
199 192
                 return("Erreur  getQuotas()" . $fault->faultcode ." " .$fault->faultstring);
200 193
 			}
Please login to merge, or discard this patch.
main/plagiarism/compilatio/compilatio_ajax.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
                     $compilatioImgFolder,
90 90
                     $text
91 91
                 );
92
-            }
93
-            elseif ($status == "ANALYSE_IN_QUEUE") {
92
+            } elseif ($status == "ANALYSE_IN_QUEUE") {
94 93
                 $actionCompilatio.="<img src='"
95 94
                     . $compilatioImgFolder
96 95
                     . "/ajax-loader2.gif' style='margin-right:10px;' />"
Please login to merge, or discard this patch.
main/plagiarism/compilatio/upload.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
     if ($typeMessage == 1) {
141 141
         $message = $errorCodeNotValid;
142 142
         Display::display_error_message($message);
143
-    }elseif($typeMessage == 2){
143
+    } elseif($typeMessage == 2){
144 144
         $message = $errorLoadError;
145 145
         Display::display_error_message($message);
146
-    }else{
146
+    } else{
147 147
         $message = $msgWait;
148 148
         Display::display_confirmation_message($message);
149 149
     }
@@ -233,10 +233,10 @@  discard block
 block discarded – undo
233 233
     if ($typeMessage == 1) {
234 234
         $message = $errorCodeNotValid;
235 235
         Display::display_error_message($message);
236
-    }elseif($typeMessage == 2){
236
+    } elseif($typeMessage == 2){
237 237
         $message = $errorLoadError;
238 238
         Display::display_error_message($message);
239
-    }else{
239
+    } else{
240 240
         $message = $msgWait;
241 241
         Display::display_confirmation_message($message);
242 242
 	}
Please login to merge, or discard this patch.