@@ -249,7 +249,7 @@ |
||
249 | 249 | if (self::$decoder->getElementStartTag(SYNC_ITEMOPERATIONS_DELETESUBFOLDERS)) { |
250 | 250 | $operation['deletesubfolders'] = true; |
251 | 251 | if (($dsf = self::$decoder->getElementContent()) !== false) { |
252 | - $operation['deletesubfolders'] = (bool) $dsf; |
|
252 | + $operation['deletesubfolders'] = (bool)$dsf; |
|
253 | 253 | if (!self::$decoder->getElementEndTag()) { |
254 | 254 | return false; |
255 | 255 | } |
@@ -315,8 +315,7 @@ discard block |
||
315 | 315 | try { |
316 | 316 | self::$topCollector->AnnounceInformation("Get attachment data from backend with file reference"); |
317 | 317 | $data = self::$backend->GetAttachmentData($operation['filereference']); |
318 | - } |
|
319 | - catch (StatusException $stex) { |
|
318 | + } catch (StatusException $stex) { |
|
320 | 319 | $status = $stex->getCode(); |
321 | 320 | } |
322 | 321 | } |
@@ -331,8 +330,7 @@ discard block |
||
331 | 330 | $tmp = explode(":", $operation['longid']); |
332 | 331 | $data = self::$backend->Fetch(self::$deviceManager->GetBackendIdForFolderId($tmp[0]), $tmp[1], $operation["cpo"]); |
333 | 332 | } |
334 | - } |
|
335 | - catch (StatusException $stex) { |
|
333 | + } catch (StatusException $stex) { |
|
336 | 334 | // the only option to return is that we could not retrieve it |
337 | 335 | $status = SYNC_ITEMOPERATIONSSTATUS_CONVERSIONFAILED; |
338 | 336 | } |
@@ -396,8 +394,7 @@ discard block |
||
396 | 394 | |
397 | 395 | // send request to backend |
398 | 396 | self::$backend->EmptyFolder($operation['backendfolderid'], $operation['deletesubfolders']); |
399 | - } |
|
400 | - catch (StatusException $stex) { |
|
397 | + } catch (StatusException $stex) { |
|
401 | 398 | $status = $stex->getCode(); |
402 | 399 | } |
403 | 400 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | elseif (self::$decoder->getElementStartTag(SYNC_CONVERSATIONMODE)) { |
62 | 62 | $spa->SetConversationMode(true); |
63 | 63 | if (($conversationmode = self::$decoder->getElementContent()) !== false) { |
64 | - $spa->SetConversationMode((bool) $conversationmode); |
|
64 | + $spa->SetConversationMode((bool)$conversationmode); |
|
65 | 65 | if (!self::$decoder->getElementEndTag()) { |
66 | 66 | return false; |
67 | 67 | } |
@@ -38,8 +38,7 @@ discard block |
||
38 | 38 | if (self::$decoder->getElementStartTag(SYNC_SYNCKEY)) { |
39 | 39 | try { |
40 | 40 | $spa->SetSyncKey(self::$decoder->getElementContent()); |
41 | - } |
|
42 | - catch (StateInvalidException $siex) { |
|
41 | + } catch (StateInvalidException $siex) { |
|
43 | 42 | $spastatus = SYNC_GETITEMESTSTATUS_SYNCSTATENOTPRIMED; |
44 | 43 | } |
45 | 44 | |
@@ -149,8 +148,7 @@ discard block |
||
149 | 148 | if (!$spa->HasContentClass() && $spa->HasFolderId()) { |
150 | 149 | try { |
151 | 150 | $spa->SetContentClass(self::$deviceManager->GetFolderClassFromCacheByID($spa->GetFolderId())); |
152 | - } |
|
153 | - catch (NoHierarchyCacheAvailableException $nhca) { |
|
151 | + } catch (NoHierarchyCacheAvailableException $nhca) { |
|
154 | 152 | $spastatus = SYNC_GETITEMESTSTATUS_COLLECTIONINVALID; |
155 | 153 | } |
156 | 154 | } |
@@ -174,22 +172,19 @@ discard block |
||
174 | 172 | if (!self::$backend->Setup(GSync::GetAdditionalSyncFolderStore($spa->GetBackendFolderId()))) { |
175 | 173 | throw new StatusException(sprintf("HandleGetItemEstimate() could not Setup() the backend for folder id %s/%s", $spa->GetFolderId(), $spa->GetBackendFolderId()), SYNC_GETITEMESTSTATUS_COLLECTIONINVALID); |
176 | 174 | } |
177 | - } |
|
178 | - catch (StateNotFoundException $snfex) { |
|
175 | + } catch (StateNotFoundException $snfex) { |
|
179 | 176 | // ok, the key is invalid. Question is, if the hierarchycache is still ok |
180 | 177 | // if not, we have to issue SYNC_GETITEMESTSTATUS_COLLECTIONINVALID which triggers a FolderSync |
181 | 178 | try { |
182 | 179 | self::$deviceManager->GetFolderClassFromCacheByID($spa->GetFolderId()); |
183 | 180 | // we got here, so the HierarchyCache is ok |
184 | 181 | $sc->AddParameter($spa, "status", SYNC_GETITEMESTSTATUS_SYNCKKEYINVALID); |
185 | - } |
|
186 | - catch (NoHierarchyCacheAvailableException $nhca) { |
|
182 | + } catch (NoHierarchyCacheAvailableException $nhca) { |
|
187 | 183 | $sc->AddParameter($spa, "status", SYNC_GETITEMESTSTATUS_COLLECTIONINVALID); |
188 | 184 | } |
189 | 185 | |
190 | 186 | self::$topCollector->AnnounceInformation("StateNotFoundException " . $sc->GetParameter($spa, "status"), true); |
191 | - } |
|
192 | - catch (StatusException $stex) { |
|
187 | + } catch (StatusException $stex) { |
|
193 | 188 | if ($stex->getCode() == SYNC_GETITEMESTSTATUS_COLLECTIONINVALID) { |
194 | 189 | $sc->AddParameter($spa, "status", SYNC_GETITEMESTSTATUS_COLLECTIONINVALID); |
195 | 190 | } |
@@ -216,8 +211,7 @@ discard block |
||
216 | 211 | |
217 | 212 | try { |
218 | 213 | $sc->CountChanges(); |
219 | - } |
|
220 | - catch (StatusException $ste) { |
|
214 | + } catch (StatusException $ste) { |
|
221 | 215 | $status = SYNC_GETITEMESTSTATUS_COLLECTIONINVALID; |
222 | 216 | } |
223 | 217 | $changes = $sc->GetChangedFolderIds(); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | if (self::$decoder->getElementStartTag(SYNC_DELETESASMOVES)) { |
207 | 207 | $spa->SetDeletesAsMoves(true); |
208 | 208 | if (($dam = self::$decoder->getElementContent()) !== false) { |
209 | - $spa->SetDeletesAsMoves((bool) $dam); |
|
209 | + $spa->SetDeletesAsMoves((bool)$dam); |
|
210 | 210 | if (!self::$decoder->getElementEndTag()) { |
211 | 211 | return false; |
212 | 212 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | if (self::$decoder->getElementStartTag(SYNC_CONVERSATIONMODE)) { |
250 | 250 | $spa->SetConversationMode(true); |
251 | 251 | if (($conversationmode = self::$decoder->getElementContent()) !== false) { |
252 | - $spa->SetConversationMode((bool) $conversationmode); |
|
252 | + $spa->SetConversationMode((bool)$conversationmode); |
|
253 | 253 | if (!self::$decoder->getElementEndTag()) { |
254 | 254 | return false; |
255 | 255 | } |
@@ -1197,7 +1197,7 @@ discard block |
||
1197 | 1197 | } |
1198 | 1198 | |
1199 | 1199 | // Stream outgoing changes |
1200 | - if ($status == SYNC_STATUS_SUCCESS && $sc->GetParameter($spa, "getchanges") == true && $windowSize > 0 && (bool) $exporter) { |
|
1200 | + if ($status == SYNC_STATUS_SUCCESS && $sc->GetParameter($spa, "getchanges") == true && $windowSize > 0 && (bool)$exporter) { |
|
1201 | 1201 | self::$topCollector->AnnounceInformation(sprintf("Streaming data of %d objects", (($changecount > $windowSize) ? $windowSize : $changecount))); |
1202 | 1202 | |
1203 | 1203 | // Output message changes per folder |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | |
1250 | 1250 | // $progress is not an array when exporting the last message |
1251 | 1251 | // so we get the number to display from the streamimporter if it's available |
1252 | - if ((bool) $streamimporter) { |
|
1252 | + if ((bool)$streamimporter) { |
|
1253 | 1253 | $n = $streamimporter->GetImportedMessages(); |
1254 | 1254 | } |
1255 | 1255 |
@@ -141,8 +141,7 @@ discard block |
||
141 | 141 | } |
142 | 142 | $spa->SetSyncKey($synckey); |
143 | 143 | } |
144 | - } |
|
145 | - catch (StateInvalidException $stie) { |
|
144 | + } catch (StateInvalidException $stie) { |
|
146 | 145 | $spa = new SyncParameters(); |
147 | 146 | $status = SYNC_STATUS_INVALIDSYNCKEY; |
148 | 147 | self::$topCollector->AnnounceInformation("State invalid - Resync folder", $this->singleFolder); |
@@ -163,8 +162,7 @@ discard block |
||
163 | 162 | try { |
164 | 163 | $spa->SetContentClass(self::$deviceManager->GetFolderClassFromCacheByID($spa->GetFolderId())); |
165 | 164 | SLog::Write(LOGLEVEL_DEBUG, sprintf("GetFolderClassFromCacheByID from Device Manager: '%s' for id:'%s'", $spa->GetContentClass(), $spa->GetFolderId())); |
166 | - } |
|
167 | - catch (NoHierarchyCacheAvailableException $nhca) { |
|
165 | + } catch (NoHierarchyCacheAvailableException $nhca) { |
|
168 | 166 | $status = SYNC_STATUS_FOLDERHIERARCHYCHANGED; |
169 | 167 | self::$deviceManager->ForceFullResync(); |
170 | 168 | } |
@@ -563,8 +561,7 @@ discard block |
||
563 | 561 | try { |
564 | 562 | // Save the updated state, which is used for the exporter later |
565 | 563 | $sc->AddParameter($spa, "state", $this->importer->GetState()); |
566 | - } |
|
567 | - catch (StatusException $stex) { |
|
564 | + } catch (StatusException $stex) { |
|
568 | 565 | $status = $stex->getCode(); |
569 | 566 | } |
570 | 567 | } |
@@ -657,13 +654,11 @@ discard block |
||
657 | 654 | // Load all collections - do not overwrite existing (received!), load states, check permissions and only load confirmed states! |
658 | 655 | try { |
659 | 656 | $sc->LoadAllCollections(false, true, true, true, true); |
660 | - } |
|
661 | - catch (StateInvalidException $siex) { |
|
657 | + } catch (StateInvalidException $siex) { |
|
662 | 658 | $status = SYNC_STATUS_INVALIDSYNCKEY; |
663 | 659 | self::$topCollector->AnnounceInformation("StateNotFoundException", $this->singleFolder); |
664 | 660 | $this->saveMultiFolderInfo("exception", "StateNotFoundException"); |
665 | - } |
|
666 | - catch (StatusException $stex) { |
|
661 | + } catch (StatusException $stex) { |
|
667 | 662 | $status = SYNC_STATUS_FOLDERHIERARCHYCHANGED; |
668 | 663 | self::$topCollector->AnnounceInformation(sprintf("StatusException code: %d", $status), $this->singleFolder); |
669 | 664 | $this->saveMultiFolderInfo("exception", "StatusException"); |
@@ -730,8 +725,7 @@ discard block |
||
730 | 725 | // always check for changes |
731 | 726 | SLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): Entering Heartbeat mode")); |
732 | 727 | $foundchanges = $sc->CheckForChanges($sc->GetLifetime(), $interval); |
733 | - } |
|
734 | - catch (StatusException $stex) { |
|
728 | + } catch (StatusException $stex) { |
|
735 | 729 | if ($stex->getCode() == SyncCollections::OBSOLETE_CONNECTION) { |
736 | 730 | $status = SYNC_COMMONSTATUS_SYNCSTATEVERSIONINVALID; |
737 | 731 | } |
@@ -875,8 +869,7 @@ discard block |
||
875 | 869 | if ($exporter === false) { |
876 | 870 | throw new StatusException(sprintf("HandleSync() could not get an exporter for folder id %s/%s", $spa->GetFolderId(), $spa->GetBackendFolderId()), SYNC_STATUS_FOLDERHIERARCHYCHANGED); |
877 | 871 | } |
878 | - } |
|
879 | - catch (StatusException $stex) { |
|
872 | + } catch (StatusException $stex) { |
|
880 | 873 | $status = $stex->getCode(); |
881 | 874 | } |
882 | 875 | |
@@ -891,8 +884,7 @@ discard block |
||
891 | 884 | |
892 | 885 | $changecount = $exporter->GetChangeCount(); |
893 | 886 | } |
894 | - } |
|
895 | - catch (StatusException $stex) { |
|
887 | + } catch (StatusException $stex) { |
|
896 | 888 | if ($stex->getCode() === SYNC_FSSTATUS_CODEUNKNOWN && $spa->HasSyncKey()) { |
897 | 889 | $status = SYNC_STATUS_INVALIDSYNCKEY; |
898 | 890 | } |
@@ -1150,8 +1142,7 @@ discard block |
||
1150 | 1142 | SLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): message not to be streamed as requested by DeviceManager, id = %s", $id)); |
1151 | 1143 | $fetchstatus = SYNC_STATUS_CLIENTSERVERCONVERSATIONERROR; |
1152 | 1144 | } |
1153 | - } |
|
1154 | - catch (StatusException $stex) { |
|
1145 | + } catch (StatusException $stex) { |
|
1155 | 1146 | $fetchstatus = $stex->getCode(); |
1156 | 1147 | } |
1157 | 1148 | |
@@ -1215,8 +1206,7 @@ discard block |
||
1215 | 1206 | if ($n % 10 == 0) { |
1216 | 1207 | self::$topCollector->AnnounceInformation(sprintf("Streamed data of %d objects out of %d", $n, (($changecount > $windowSize) ? $windowSize : $changecount))); |
1217 | 1208 | } |
1218 | - } |
|
1219 | - catch (SyncObjectBrokenException $mbe) { |
|
1209 | + } catch (SyncObjectBrokenException $mbe) { |
|
1220 | 1210 | $brokenSO = $mbe->GetSyncObject(); |
1221 | 1211 | if (!$brokenSO) { |
1222 | 1212 | SLog::Write(LOGLEVEL_ERROR, sprintf("HandleSync(): Caught SyncObjectBrokenException but broken SyncObject not available. This should be fixed in the backend.")); |
@@ -1316,8 +1306,7 @@ discard block |
||
1316 | 1306 | elseif (!$spa->HasSyncKey()) { |
1317 | 1307 | $state = ""; |
1318 | 1308 | } |
1319 | - } |
|
1320 | - catch (StatusException $stex) { |
|
1309 | + } catch (StatusException $stex) { |
|
1321 | 1310 | $status = $stex->getCode(); |
1322 | 1311 | } |
1323 | 1312 | |
@@ -1365,13 +1354,11 @@ discard block |
||
1365 | 1354 | if (!self::$backend->Setup(GSync::GetAdditionalSyncFolderStore($spa->GetBackendFolderId()))) { |
1366 | 1355 | throw new StatusException(sprintf("HandleSync() could not Setup() the backend for folder id %s/%s", $spa->GetFolderId(), $spa->GetBackendFolderId()), SYNC_STATUS_FOLDERHIERARCHYCHANGED); |
1367 | 1356 | } |
1368 | - } |
|
1369 | - catch (StateNotFoundException $snfex) { |
|
1357 | + } catch (StateNotFoundException $snfex) { |
|
1370 | 1358 | $status = SYNC_STATUS_INVALIDSYNCKEY; |
1371 | 1359 | self::$topCollector->AnnounceInformation("StateNotFoundException", $this->singleFolder); |
1372 | 1360 | $this->saveMultiFolderInfo("exception", "StateNotFoundException"); |
1373 | - } |
|
1374 | - catch (StatusException $stex) { |
|
1361 | + } catch (StatusException $stex) { |
|
1375 | 1362 | $status = $stex->getCode(); |
1376 | 1363 | self::$topCollector->AnnounceInformation(sprintf("StatusException code: %d", $status), $this->singleFolder); |
1377 | 1364 | $this->saveMultiFolderInfo("exception", "StateNotFoundException"); |
@@ -1420,8 +1407,7 @@ discard block |
||
1420 | 1407 | $this->importer->ConfigContentParameters($spa->GetCPO()); |
1421 | 1408 | $this->importer->LoadConflicts($spa->GetCPO(), $sc->GetParameter($spa, "state")); |
1422 | 1409 | } |
1423 | - } |
|
1424 | - catch (StatusException $stex) { |
|
1410 | + } catch (StatusException $stex) { |
|
1425 | 1411 | $status = $stex->getCode(); |
1426 | 1412 | } |
1427 | 1413 | |
@@ -1521,8 +1507,7 @@ discard block |
||
1521 | 1507 | |
1522 | 1508 | $actiondata["statusids"][$serverid] = SYNC_STATUS_SUCCESS; |
1523 | 1509 | } |
1524 | - } |
|
1525 | - catch (StatusException $stex) { |
|
1510 | + } catch (StatusException $stex) { |
|
1526 | 1511 | $actiondata["statusids"][$serverid] = $stex->getCode(); |
1527 | 1512 | } |
1528 | 1513 | break; |
@@ -1552,8 +1537,7 @@ discard block |
||
1552 | 1537 | $actiondata["clientids"][$clientid] = $this->importer->ImportMessageChange(false, $message); |
1553 | 1538 | $actiondata["statusids"][$clientid] = SYNC_STATUS_SUCCESS; |
1554 | 1539 | } |
1555 | - } |
|
1556 | - catch (StatusException $stex) { |
|
1540 | + } catch (StatusException $stex) { |
|
1557 | 1541 | $actiondata["statusids"][$clientid] = $stex->getCode(); |
1558 | 1542 | } |
1559 | 1543 | break; |
@@ -1587,8 +1571,7 @@ discard block |
||
1587 | 1571 | $this->importer->ImportMessageDeletion($serverid); |
1588 | 1572 | $actiondata["statusids"][$serverid] = SYNC_STATUS_SUCCESS; |
1589 | 1573 | } |
1590 | - } |
|
1591 | - catch (StatusException $stex) { |
|
1574 | + } catch (StatusException $stex) { |
|
1592 | 1575 | if ($stex->getCode() != SYNC_MOVEITEMSSTATUS_SUCCESS) { |
1593 | 1576 | $actiondata["statusids"][$serverid] = SYNC_STATUS_OBJECTNOTFOUND; |
1594 | 1577 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | class Request { |
11 | - public const MAXMEMORYUSAGE = 0.9; // use max. 90% of allowed memory when syncing |
|
11 | + public const MAXMEMORYUSAGE = 0.9; // use max. 90% of allowed memory when syncing |
|
12 | 12 | public const UNKNOWN = "unknown"; |
13 | 13 | public const IMPERSONATE_DELIM = '#'; |
14 | 14 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | if (isset(self::$base64QueryDecoded['PolKey'])) { |
143 | - self::$policykey = (int) self::filterEvilInput(self::$base64QueryDecoded['PolKey'], self::NUMBERS_ONLY); |
|
143 | + self::$policykey = (int)self::filterEvilInput(self::$base64QueryDecoded['PolKey'], self::NUMBERS_ONLY); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | if (isset(self::$base64QueryDecoded['ProtVer'])) { |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | else { |
199 | 199 | preg_replace_callback( |
200 | 200 | '/(\-?\d+)(.?)/', |
201 | - function ($m) { |
|
201 | + function($m) { |
|
202 | 202 | self::$memoryLimit = $m[1] * pow(1024, strpos('BKMG', $m[2])) * self::MAXMEMORYUSAGE; |
203 | 203 | }, |
204 | 204 | strtoupper($memoryLimit) |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | // the policy key might be set in Request::Initialize from the base64 encoded query |
223 | 223 | if (!isset(self::$policykey)) { |
224 | 224 | if (isset(self::$headers["x-ms-policykey"])) { |
225 | - self::$policykey = (int) self::filterEvilInput(self::$headers["x-ms-policykey"], self::NUMBERS_ONLY); |
|
225 | + self::$policykey = (int)self::filterEvilInput(self::$headers["x-ms-policykey"], self::NUMBERS_ONLY); |
|
226 | 226 | } |
227 | 227 | else { |
228 | 228 | self::$policykey = 0; |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | * @return int |
638 | 638 | */ |
639 | 639 | public static function GetContentLength() { |
640 | - return (isset(self::$headers["content-length"])) ? (int) self::$headers["content-length"] : 0; |
|
640 | + return (isset(self::$headers["content-length"])) ? (int)self::$headers["content-length"] : 0; |
|
641 | 641 | } |
642 | 642 | |
643 | 643 | /** |
@@ -212,7 +212,7 @@ |
||
212 | 212 | $errstr = $error["message"]; |
213 | 213 | |
214 | 214 | // do NOT log PHP Notice, Warning, Deprecated or Strict as FATAL |
215 | - if ($errno & ~(E_NOTICE | E_WARNING | E_DEPRECATED | E_STRICT)) { |
|
215 | + if ($errno & ~(E_NOTICE|E_WARNING|E_DEPRECATED|E_STRICT)) { |
|
216 | 216 | SLog::Write(LOGLEVEL_FATAL, sprintf("Fatal error: %s:%d - %s (%s)", $errfile, $errline, $errstr, $errno)); |
217 | 217 | } |
218 | 218 | } |
@@ -63,8 +63,7 @@ |
||
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 | } |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | $current['loopcount'] = 1; |
759 | 759 | // the MaxCount is the max number of messages exported before |
760 | 760 | $current['maxCount'] = $counter + (($maxItems < $queuedMessages) ? $maxItems : $queuedMessages); |
761 | - $loop = true; // loop mode!! |
|
761 | + $loop = true; // loop mode!! |
|
762 | 762 | } |
763 | 763 | } |
764 | 764 | elseif ($queuedMessages == 0) { |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | $this->ignore_messageid = $current['potential']; |
779 | 779 | } |
780 | 780 | $current['maxCount'] = $counter + (($maxItems < $queuedMessages) ? $maxItems : $queuedMessages); |
781 | - $loop = true; // loop mode!! |
|
781 | + $loop = true; // loop mode!! |
|
782 | 782 | } |
783 | 783 | } |
784 | 784 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | "ended" => 0, |
46 | 46 | "push" => false, |
47 | 47 | ]; |
48 | - $this->disabled = (bool) (defined('TOPCOLLECTOR_DISABLED') && constant('TOPCOLLECTOR_DISABLED') === true); |
|
48 | + $this->disabled = (bool)(defined('TOPCOLLECTOR_DISABLED') && constant('TOPCOLLECTOR_DISABLED') === true); |
|
49 | 49 | $this->checkEnabledTime = time() - self::ENABLED_CACHETIME - 1; |
50 | 50 | $this->AnnounceInformation("initializing"); |
51 | 51 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | public const UNAUTHENTICATED = 1; |
12 | 12 | public const UNPROVISIONED = 2; |
13 | 13 | public const NOACTIVESYNCCOMMAND = 3; |
14 | - public const WEBSERVICECOMMAND = 4; // DEPRECATED |
|
14 | + public const WEBSERVICECOMMAND = 4; // DEPRECATED |
|
15 | 15 | public const HIERARCHYCOMMAND = 5; |
16 | 16 | public const PLAININPUT = 6; |
17 | 17 | public const REQUESTHANDLER = 7; |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | throw new StateInvalidException(sprintf("SyncKey '%s' is invalid", $synckey)); |
420 | 420 | } |
421 | 421 | |
422 | - return [$matches[1], (int) $matches[2]]; |
|
422 | + return [$matches[1], (int)$matches[2]]; |
|
423 | 423 | } |
424 | 424 | |
425 | 425 | /** |
@@ -520,8 +520,8 @@ discard block |
||
520 | 520 | mt_rand(0, 0xFFFF), |
521 | 521 | mt_rand(0, 0xFFFF), |
522 | 522 | mt_rand(0, 0xFFFF), |
523 | - mt_rand(0, 0x0FFF) | 0x4000, |
|
524 | - mt_rand(0, 0x3FFF) | 0x8000, |
|
523 | + mt_rand(0, 0x0FFF)|0x4000, |
|
524 | + mt_rand(0, 0x3FFF)|0x8000, |
|
525 | 525 | mt_rand(0, 0xFFFF), |
526 | 526 | mt_rand(0, 0xFFFF), |
527 | 527 | mt_rand(0, 0xFFFF) |
@@ -101,8 +101,7 @@ discard block |
||
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 |
||
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 | } |