Passed
Push — master ( f497d2...0d7e8b )
by
unknown
03:27 queued 12s
created
lib/grommunio/exporter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,8 +76,7 @@
 block discarded – undo
76 76
 			else {
77 77
 				$this->exporter = false;
78 78
 			}
79
-		}
80
-		catch (MAPIException $me) {
79
+		} catch (MAPIException $me) {
81 80
 			$this->exporter = false;
82 81
 			// We return the general error SYNC_FSSTATUS_CODEUNKNOWN (12) which is also SYNC_STATUS_FOLDERHIERARCHYCHANGED (12)
83 82
 			// if this happened while doing content sync, the mobile will try to resync the folderhierarchy
Please login to merge, or discard this patch.
lib/core/interprocessdata.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@
 block discarded – undo
36 36
 			// this method is not suitable for the TopCollector atm
37 37
 			$type = Request::GetDeviceID();
38 38
 			$this->ipcProvider = GSync::GetRedis();
39
-		}
40
-		catch (Exception $e) {
39
+		} catch (Exception $e) {
41 40
 			// ipcProvider could not initialise
42 41
 			SLog::Write(LOGLEVEL_ERROR, sprintf("%s could not initialise IPC Redis provider: %s", get_class($this), $e->getMessage()));
43 42
 		}
Please login to merge, or discard this patch.
lib/core/devicemanager.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -165,8 +165,7 @@  discard block
 block discarded – undo
165 165
 					$this->setDeviceUserData($this->type, [self::$user => $this->device], self::$devid, -1, $doCas = "merge");
166 166
 					SLog::Write(LOGLEVEL_DEBUG, "DeviceManager->Save(): Device data saved");
167 167
 				}
168
-			}
169
-			catch (StateNotFoundException $snfex) {
168
+			} catch (StateNotFoundException $snfex) {
170 169
 				SLog::Write(LOGLEVEL_ERROR, "DeviceManager->Save(): Exception: " . $snfex->getMessage());
171 170
 			}
172 171
 		}
@@ -950,11 +949,9 @@  discard block
 block discarded – undo
950 949
 				}
951 950
 				$this->stateManager->SetDevice($this->device);
952 951
 			}
953
-		}
954
-		catch (StateNotFoundException $snfex) {
952
+		} catch (StateNotFoundException $snfex) {
955 953
 			$this->hierarchySyncRequired = true;
956
-		}
957
-		catch (UnavailableException $uaex) {
954
+		} catch (UnavailableException $uaex) {
958 955
 			// This is temporary and can be ignored e.g. in PING - see https://jira.z-hub.io/browse/ZP-1054
959 956
 			// If the hash was not available before we treat it like a StateNotFoundException.
960 957
 			if ($this->deviceHash === false) {
Please login to merge, or discard this patch.
lib/core/statemanager.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@  discard block
 block discarded – undo
101 101
 				if ($data !== false) {
102 102
 					$this->synchedFolders[$folderid] = $data;
103 103
 				}
104
-			}
105
-			catch (StateNotFoundException $ex) {
104
+			} catch (StateNotFoundException $ex) {
106 105
 			}
107 106
 		}
108 107
 
@@ -231,8 +230,7 @@  discard block
 block discarded – undo
231 230
 
232 231
 		try {
233 232
 			return $this->statemachine->GetState($this->device->GetDeviceId(), IStateMachine::FAILSAVE, $this->uuid, $this->oldStateCounter, $this->deleteOldStates);
234
-		}
235
-		catch (StateNotFoundException $snfex) {
233
+		} catch (StateNotFoundException $snfex) {
236 234
 			return false;
237 235
 		}
238 236
 	}
Please login to merge, or discard this patch.
lib/core/synccollections.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
 			}
61 61
 
62 62
 			return true;
63
-		}
64
-		catch (GSyncException $e) {
63
+		} catch (GSyncException $e) {
65 64
 		}
66 65
 
67 66
 		return false;
@@ -165,8 +164,7 @@  discard block
 block discarded – undo
165 164
 
166 165
 				return true;
167 166
 			}
168
-		}
169
-		catch (StateInvalidException $sive) {
167
+		} catch (StateInvalidException $sive) {
170 168
 			// in case there is something wrong with the state, just stop here
171 169
 			// later when trying to retrieve the SyncParameters nothing will be found
172 170
 
@@ -193,8 +191,7 @@  discard block
 block discarded – undo
193 191
 			try {
194 192
 				// make sure the hierarchy cache is loaded when we are loading hierarchy states
195 193
 				$this->addparms[$folderid]["state"] = $this->stateManager->GetSyncState($spa->GetLatestSyncKey($confirmedOnly), ($folderid === false));
196
-			}
197
-			catch (StateNotFoundException $snfe) {
194
+			} catch (StateNotFoundException $snfe) {
198 195
 				// if we can't find the state, first we should try a sync of that folder, so
199 196
 				// we generate a fake change, so a sync on this folder is triggered
200 197
 				$this->changes[$folderid] = 1;
@@ -698,8 +695,7 @@  discard block
 block discarded – undo
698 695
 					$changecount = $exporter->GetChangeCount();
699 696
 				}
700 697
 			}
701
-		}
702
-		catch (StatusException $ste) {
698
+		} catch (StatusException $ste) {
703 699
 			if ($ste->getCode() == SYNC_STATUS_FOLDERHIERARCHYCHANGED) {
704 700
 				SLog::Write(LOGLEVEL_WARN, "SyncCollections->CountChange(): exporter can not be re-configured due to state error, emulating change in folder to force Sync.");
705 701
 				$this->changes[$folderid] = 1;
@@ -767,8 +763,7 @@  discard block
 block discarded – undo
767 763
 
768 764
 					$this->hierarchyExporterChecked = true;
769 765
 				}
770
-			}
771
-			catch (StatusException $ste) {
766
+			} catch (StatusException $ste) {
772 767
 				throw new StatusException("SyncCollections->countHierarchyChange(): exporter can not be re-configured.", self::ERROR_WRONG_HIERARCHY, null, LOGLEVEL_WARN);
773 768
 			}
774 769
 
Please login to merge, or discard this patch.
lib/core/slog.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
 
64 64
 		try {
65 65
 			self::getLogger()->Log($loglevel, $message);
66
-		}
67
-		catch (\Exception $e) {
66
+		} catch (\Exception $e) {
68 67
 			// @TODO How should we handle logging error ?
69 68
 			// Ignore any error.
70 69
 		}
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,8 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
 		// destruct backend after all data is on the stream
152 152
 		$backend->Logoff();
153
-	}
154
-	catch (NoPostRequestException $nopostex) {
153
+	} catch (NoPostRequestException $nopostex) {
155 154
 		if ($nopostex->getCode() == NoPostRequestException::OPTIONS_REQUEST) {
156 155
 			header(GSync::GetServerHeader());
157 156
 			header(GSync::GetSupportedProtocolVersions());
@@ -166,8 +165,7 @@  discard block
 block discarded – undo
166 165
 				GSync::PrintGrommunioSyncLegal('GET not supported', $nopostex->getMessage());
167 166
 			}
168 167
 		}
169
-	}
170
-	catch (Exception $ex) {
168
+	} catch (Exception $ex) {
171 169
 		// Extract any previous exception message for logging purpose.
172 170
 		$exclass = get_class($ex);
173 171
 		$exception_message = $ex->getMessage();
Please login to merge, or discard this patch.