Passed
Push — master ( 34e8da...f497d2 )
by
unknown
06:10 queued 02:50
created
lib/log/log.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -286,10 +286,10 @@
 block discarded – undo
286 286
 				return "[ERROR]";
287 287
 
288 288
 			case LOGLEVEL_WARN:
289
-				return "[" . $s . "WARN]";
289
+				return "[".$s."WARN]";
290 290
 
291 291
 			case LOGLEVEL_INFO:
292
-				return "[" . $s . "INFO]";
292
+				return "[".$s."INFO]";
293 293
 
294 294
 			case LOGLEVEL_DEBUG:
295 295
 				return "[DEBUG]";
Please login to merge, or discard this patch.
lib/syncobjects/syncprovisioning.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
 					self::STREAMER_VAR => "unapprovedinromapplist",
237 237
 					self::STREAMER_PROP => self::STREAMER_TYPE_SEND_EMPTY,
238 238
 					self::STREAMER_ARRAY => SYNC_PROVISION_APPNAME,
239
-				],  // TODO check
239
+				], // TODO check
240 240
 				SYNC_PROVISION_APPROVEDAPPLIST => [
241 241
 					self::STREAMER_VAR => "approvedapplist",
242 242
 					self::STREAMER_PROP => self::STREAMER_TYPE_SEND_EMPTY,
Please login to merge, or discard this patch.
lib/syncobjects/syncobject.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 * @return string
163 163
 	 */
164 164
 	public function __toString() {
165
-		$str = get_class($this) . " (\n";
165
+		$str = get_class($this)." (\n";
166 166
 
167 167
 		$streamerVars = [];
168 168
 		foreach ($this->mapping as $k => $v) {
@@ -183,16 +183,16 @@  discard block
 block discarded – undo
183 183
 
184 184
 			// self::STREAMER_ARRAY ?
185 185
 			if (is_array($v)) {
186
-				$str .= "\t" . $strV . $k . "(Array) size: " . count($v) . "\n";
186
+				$str .= "\t".$strV.$k."(Array) size: ".count($v)."\n";
187 187
 				foreach ($v as $value) {
188
-					$str .= "\t\t" . Utils::PrintAsString($value) . "\n";
188
+					$str .= "\t\t".Utils::PrintAsString($value)."\n";
189 189
 				}
190 190
 			}
191 191
 			elseif ($v instanceof SyncObject) {
192
-				$str .= "\t" . $strV . $k . " => " . str_replace("\n", "\n\t\t\t", $v->__toString()) . "\n";
192
+				$str .= "\t".$strV.$k." => ".str_replace("\n", "\n\t\t\t", $v->__toString())."\n";
193 193
 			}
194 194
 			else {
195
-				$str .= "\t" . $strV . $k . " => " . (isset($this->{$k}) ? Utils::PrintAsString($this->{$k}) : "null") . "\n";
195
+				$str .= "\t".$strV.$k." => ".(isset($this->{$k}) ? Utils::PrintAsString($this->{$k}) : "null")."\n";
196 196
 			}
197 197
 		}
198 198
 		$str .= ")";
Please login to merge, or discard this patch.
lib/syncobjects/syncmeetingrequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
 			SYNC_POOMMAIL_TIMEZONE => [
115 115
 				self::STREAMER_VAR => "timezone",
116 116
 				self::STREAMER_CHECKS => [
117
-					self::STREAMER_CHECK_REQUIRED => base64_encode(pack("la64vvvvvvvv" . "la64vvvvvvvv" . "l", 0, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0, 0)),
117
+					self::STREAMER_CHECK_REQUIRED => base64_encode(pack("la64vvvvvvvv"."la64vvvvvvvv"."l", 0, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0, 0)),
118 118
 				],
119 119
 			],
120 120
 			SYNC_POOMMAIL_GLOBALOBJID => [self::STREAMER_VAR => "globalobjid"],
Please login to merge, or discard this patch.
lib/grommunio/listfolders.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
 		listfolders_getlist($zarafaAdmin['adminStore'], $zarafaAdmin['session'], trim($options['l']));
79 79
 	}
80 80
 	else {
81
-		echo "Usage:\n" .
82
-				"listfolders.php [actions] [options]\n\n" .
83
-				"Actions: [-l username]\n" .
84
-					"\t-l username\tlist folders of user, for public folder use 'SYSTEM'\n\n" .
85
-				"Global options: [-h path] [[-u remoteuser] [-p password]] [[-c certificate_path] [-p password]]\n" .
86
-					"\t-h path\t\tconnect through <path>, e.g. file:///var/run/socket or https://10.0.0.1:237/grommunio\n" .
87
-					"\t-u remoteuser\tlogin as authenticated administration user\n" .
88
-					"\t-c certificate\tlogin with a ssl certificate located in this location, e.g. /etc/zarafa/ssl/client.pem\n" .
81
+		echo "Usage:\n".
82
+				"listfolders.php [actions] [options]\n\n".
83
+				"Actions: [-l username]\n".
84
+					"\t-l username\tlist folders of user, for public folder use 'SYSTEM'\n\n".
85
+				"Global options: [-h path] [[-u remoteuser] [-p password]] [[-c certificate_path] [-p password]]\n".
86
+					"\t-h path\t\tconnect through <path>, e.g. file:///var/run/socket or https://10.0.0.1:237/grommunio\n".
87
+					"\t-u remoteuser\tlogin as authenticated administration user\n".
88
+					"\t-c certificate\tlogin with a ssl certificate located in this location, e.g. /etc/zarafa/ssl/client.pem\n".
89 89
 					"\t-p password\tpassword of the remoteuser or certificate\n\n";
90 90
 	}
91 91
 }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	$h_table = @mapi_folder_gethierarchytable($root, CONVENIENT_DEPTH);
176 176
 	$subfolders = @mapi_table_queryallrows($h_table, [PR_ENTRYID, PR_DISPLAY_NAME, PR_CONTAINER_CLASS, PR_SOURCE_KEY, PR_PARENT_SOURCE_KEY, PR_FOLDER_TYPE, PR_ATTR_HIDDEN]);
177 177
 
178
-	echo "Available folders in store '{$user}':\n" . str_repeat("-", 50) . "\n";
178
+	echo "Available folders in store '{$user}':\n".str_repeat("-", 50)."\n";
179 179
 	foreach ($subfolders as $folder) {
180 180
 		// do not display hidden and search folders
181 181
 		if ((isset($folder[PR_ATTR_HIDDEN]) && $folder[PR_ATTR_HIDDEN]) ||
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
 		}
193 193
 
194 194
 		if (isset($folder[PR_CONTAINER_CLASS]) && array_key_exists($folder[PR_CONTAINER_CLASS], $supported_classes)) {
195
-			echo "Folder name:\t" . $folder[PR_DISPLAY_NAME] . "\n";
196
-			echo "Folder ID:\t" . bin2hex($folder[PR_SOURCE_KEY]) . "\n";
197
-			echo "Type:\t\t" . $supported_classes[$folder[PR_CONTAINER_CLASS]] . "\n";
195
+			echo "Folder name:\t".$folder[PR_DISPLAY_NAME]."\n";
196
+			echo "Folder ID:\t".bin2hex($folder[PR_SOURCE_KEY])."\n";
197
+			echo "Type:\t\t".$supported_classes[$folder[PR_CONTAINER_CLASS]]."\n";
198 198
 			echo "\n";
199 199
 		}
200 200
 	}
Please login to merge, or discard this patch.
lib/grommunio/mapiphpwrapper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			$folderidHex = bin2hex($folderid);
46 46
 			$folderid = GSync::GetDeviceManager()->GetFolderIdForBackendId($folderidHex);
47 47
 			if ($folderid != $folderidHex) {
48
-				$this->prefix = $folderid . ':';
48
+				$this->prefix = $folderid.':';
49 49
 			}
50 50
 		}
51 51
 	}
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 			$message->flags = $flags;
143 143
 		}
144 144
 
145
-		$this->importer->ImportMessageChange($this->prefix . bin2hex($sourcekey), $message);
146
-		SLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportMessageChange(): change for: '%s'", $this->prefix . bin2hex($sourcekey)));
145
+		$this->importer->ImportMessageChange($this->prefix.bin2hex($sourcekey), $message);
146
+		SLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportMessageChange(): change for: '%s'", $this->prefix.bin2hex($sourcekey)));
147 147
 
148 148
 		// Tell MAPI it doesn't need to do anything itself, as we've done all the work already.
149 149
 		return SYNC_E_IGNORE;
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 
164 164
 		foreach ($sourcekeys as $sourcekey) {
165 165
 			// TODO if we would know that ICS is removing the message because it's outside the sync interval, we could send a $asSoftDelete = true to the importer. Could they pass that via $flags?
166
-			$this->importer->ImportMessageDeletion($this->prefix . bin2hex($sourcekey));
167
-			SLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportMessageDeletion(): delete for :'%s'", $this->prefix . bin2hex($sourcekey)));
166
+			$this->importer->ImportMessageDeletion($this->prefix.bin2hex($sourcekey));
167
+			SLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportMessageDeletion(): delete for :'%s'", $this->prefix.bin2hex($sourcekey)));
168 168
 		}
169 169
 	}
170 170
 
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	public function ImportPerUserReadStateChange($readstates) {
179 179
 		foreach ($readstates as $readstate) {
180
-			$this->importer->ImportMessageReadFlag($this->prefix . bin2hex($readstate["sourcekey"]), $readstate["flags"] & MSGFLAG_READ);
181
-			SLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportPerUserReadStateChange(): read for :'%s'", $this->prefix . bin2hex($readstate["sourcekey"])));
180
+			$this->importer->ImportMessageReadFlag($this->prefix.bin2hex($readstate["sourcekey"]), $readstate["flags"] & MSGFLAG_READ);
181
+			SLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportPerUserReadStateChange(): read for :'%s'", $this->prefix.bin2hex($readstate["sourcekey"])));
182 182
 		}
183 183
 	}
184 184
 
Please login to merge, or discard this patch.
lib/grommunio/mapiutils.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 					],
143 143
 				], // EXISTS OR
144 144
 			],
145
-		];        // global OR
145
+		]; // global OR
146 146
 	}
147 147
 
148 148
 	/**
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 						[
179 179
 							RES_CONTENT,
180 180
 							[
181
-								FUZZYLEVEL => FL_SUBSTRING | FL_IGNORECASE,
181
+								FUZZYLEVEL => FL_SUBSTRING|FL_IGNORECASE,
182 182
 								ULPROPTAG => PR_DISPLAY_NAME,
183 183
 								VALUE => $query,
184 184
 							],
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 						[
187 187
 							RES_CONTENT,
188 188
 							[
189
-								FUZZYLEVEL => FL_SUBSTRING | FL_IGNORECASE,
189
+								FUZZYLEVEL => FL_SUBSTRING|FL_IGNORECASE,
190 190
 								ULPROPTAG => PR_ACCOUNT,
191 191
 								VALUE => $query,
192 192
 							],
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 						[
195 195
 							RES_CONTENT,
196 196
 							[
197
-								FUZZYLEVEL => FL_SUBSTRING | FL_IGNORECASE,
197
+								FUZZYLEVEL => FL_SUBSTRING|FL_IGNORECASE,
198 198
 								ULPROPTAG => PR_SMTP_ADDRESS,
199 199
 								VALUE => $query,
200 200
 							],
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 				PR_SENT_REPRESENTING_ENTRYID => $props[PR_SENT_REPRESENTING_ENTRYID],
679 679
 				PR_SENT_REPRESENTING_SEARCH_KEY => $props[PR_SENT_REPRESENTING_SEARCH_KEY],
680 680
 				// mark the message as read if the main message has read flag
681
-				PR_MESSAGE_FLAGS => $read ? $mprops[PR_MESSAGE_FLAGS] | MSGFLAG_READ : $mprops[PR_MESSAGE_FLAGS],
681
+				PR_MESSAGE_FLAGS => $read ? $mprops[PR_MESSAGE_FLAGS]|MSGFLAG_READ : $mprops[PR_MESSAGE_FLAGS],
682 682
 			]);
683 683
 		}
684 684
 		// TODO check if we need to do this for encrypted (and signed?) message as well
@@ -749,13 +749,13 @@  discard block
 block discarded – undo
749 749
 		$entryId = strtoupper($entryid);
750 750
 
751 751
 		$res = [
752
-			'abFlags' => '',  // BYTE[4],  4 bytes,  8 hex characters
753
-			'guid' => '',  // GUID,    16 bytes, 32 hex characters
754
-			'version' => '',  // ULONG,    4 bytes,  8 hex characters
755
-			'type' => '',  // ULONG,    4 bytes,  8 hex characters
756
-			'id' => '',  // ULONG,    4 bytes,  8 hex characters
757
-			'server' => '',  // CHAR,    variable length
758
-			'padding' => '',  // TCHAR[3], 4 bytes,  8 hex characters (upto 4 bytes)
752
+			'abFlags' => '', // BYTE[4],  4 bytes,  8 hex characters
753
+			'guid' => '', // GUID,    16 bytes, 32 hex characters
754
+			'version' => '', // ULONG,    4 bytes,  8 hex characters
755
+			'type' => '', // ULONG,    4 bytes,  8 hex characters
756
+			'id' => '', // ULONG,    4 bytes,  8 hex characters
757
+			'server' => '', // CHAR,    variable length
758
+			'padding' => '', // TCHAR[3], 4 bytes,  8 hex characters (upto 4 bytes)
759 759
 		];
760 760
 
761 761
 		$res['length'] = strlen($entryId);
@@ -800,13 +800,13 @@  discard block
 block discarded – undo
800 800
 		$entryId = strtoupper($entryid);
801 801
 
802 802
 		$res = [
803
-			'abFlags' => '',  // BYTE[4],  4 bytes,  8 hex characters
804
-			'guid' => '',  // GUID,    16 bytes, 32 hex characters
805
-			'version' => '',  // ULONG,    4 bytes,  8 hex characters
806
-			'type' => '',  // ULONG,    4 bytes,  8 hex characters
807
-			'uniqueId' => '',  // ULONG,   16 bytes,  32 hex characters
808
-			'server' => '',  // CHAR,    variable length
809
-			'padding' => '',  // TCHAR[3], 4 bytes,  8 hex characters (upto 4 bytes)
803
+			'abFlags' => '', // BYTE[4],  4 bytes,  8 hex characters
804
+			'guid' => '', // GUID,    16 bytes, 32 hex characters
805
+			'version' => '', // ULONG,    4 bytes,  8 hex characters
806
+			'type' => '', // ULONG,    4 bytes,  8 hex characters
807
+			'uniqueId' => '', // ULONG,   16 bytes,  32 hex characters
808
+			'server' => '', // CHAR,    variable length
809
+			'padding' => '', // TCHAR[3], 4 bytes,  8 hex characters (upto 4 bytes)
810 810
 		];
811 811
 
812 812
 		$res['length'] = strlen($entryId);
Please login to merge, or discard this patch.
lib/grommunio/grommunio.php 1 patch
Spacing   +18 added lines, -19 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			if (function_exists('mapi_feature') && mapi_feature('LOGONFLAGS')) {
143 143
 				// send grommunio-sync version and user agent to ZCP - ZP-589
144 144
 				if (Utils::CheckMapiExtVersion('7.2.0')) {
145
-					$gsync_version = 'Grommunio-Sync_' . @constant('GROMMUNIOSYNC_VERSION');
145
+					$gsync_version = 'Grommunio-Sync_'.@constant('GROMMUNIOSYNC_VERSION');
146 146
 					$user_agent = ($deviceId) ? GSync::GetDeviceManager()->GetUserAgent() : "unknown";
147 147
 					$this->session = @mapi_logon_zarafa($this->mainUser, $pass, MAPI_SERVER, null, null, 0, $gsync_version, $user_agent);
148 148
 				}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		$this->store = $this->defaultstore;
196 196
 		$this->storeName = $defaultUser;
197 197
 
198
-		SLog::Write(LOGLEVEL_DEBUG, sprintf("Grommunio->Logon(): User '%s' is authenticated%s", $this->mainUser, ($this->impersonateUser ? " impersonating '" . $this->impersonateUser . "'" : '')));
198
+		SLog::Write(LOGLEVEL_DEBUG, sprintf("Grommunio->Logon(): User '%s' is authenticated%s", $this->mainUser, ($this->impersonateUser ? " impersonating '".$this->impersonateUser."'" : '')));
199 199
 
200 200
 		$this->isGSyncEnabled();
201 201
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 							$fwbody = w2u($fwbody);
590 590
 						}
591 591
 
592
-						$mapiprops[$sendMailProps["body"]] = $body . "\r\n\r\n" . $fwbody;
592
+						$mapiprops[$sendMailProps["body"]] = $body."\r\n\r\n".$fwbody;
593 593
 					}
594 594
 
595 595
 					if (strlen($bodyHtml) > 0) {
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 							$fwbodyHtml = w2u($fwbodyHtml);
606 606
 						}
607 607
 
608
-						$mapiprops[$sendMailProps["html"]] = $bodyHtml . "<br><br>" . $fwbodyHtml;
608
+						$mapiprops[$sendMailProps["html"]] = $bodyHtml."<br><br>".$fwbodyHtml;
609 609
 					}
610 610
 				}
611 611
 			}
@@ -969,11 +969,11 @@  discard block
 block discarded – undo
969 969
 		if ($calFolderId) {
970 970
 			$shortFolderId = GSync::GetDeviceManager()->GetFolderIdForBackendId($calFolderId);
971 971
 			if ($calFolderId != $shortFolderId) {
972
-				$prefix = $shortFolderId . ':';
972
+				$prefix = $shortFolderId.':';
973 973
 			}
974 974
 		}
975 975
 
976
-		return $prefix . $calendarid;
976
+		return $prefix.$calendarid;
977 977
 	}
978 978
 
979 979
 	/**
@@ -1321,7 +1321,7 @@  discard block
 block discarded – undo
1321 1321
 			}
1322 1322
 		}
1323 1323
 		$nrResults = count($items);
1324
-		$items['range'] = ($nrResults > 0) ? $rangestart . '-' . ($nrResults - 1) : '0-0';
1324
+		$items['range'] = ($nrResults > 0) ? $rangestart.'-'.($nrResults - 1) : '0-0';
1325 1325
 		$items['searchtotal'] = $nrResults;
1326 1326
 
1327 1327
 		return $items;
@@ -1372,8 +1372,7 @@  discard block
 block discarded – undo
1372 1372
 
1373 1373
 		// if the search range is set limit the result to it, otherwise return all found messages
1374 1374
 		$rows = (is_array($searchRange) && isset($searchRange[0], $searchRange[1])) ?
1375
-			mapi_table_queryrows($table, [PR_ENTRYID], $searchRange[0], $searchRange[1] - $searchRange[0] + 1) :
1376
-			mapi_table_queryrows($table, [PR_ENTRYID], 0, SEARCH_MAXRESULTS);
1375
+			mapi_table_queryrows($table, [PR_ENTRYID], $searchRange[0], $searchRange[1] - $searchRange[0] + 1) : mapi_table_queryrows($table, [PR_ENTRYID], 0, SEARCH_MAXRESULTS);
1377 1376
 
1378 1377
 		$cnt = count($rows);
1379 1378
 		$items['searchtotal'] = $cnt;
@@ -1423,7 +1422,7 @@  discard block
 block discarded – undo
1423 1422
 				[
1424 1423
 					FUZZYLEVEL => FL_PREFIX,
1425 1424
 					ULPROPTAG => PR_DISPLAY_NAME,
1426
-					VALUE => [PR_DISPLAY_NAME => "grommunio-sync Search Folder " . $pid],
1425
+					VALUE => [PR_DISPLAY_NAME => "grommunio-sync Search Folder ".$pid],
1427 1426
 				],
1428 1427
 			],
1429 1428
 			TBL_BATCH
@@ -1567,7 +1566,7 @@  discard block
 block discarded – undo
1567 1566
 				$content_unread = isset($folder[PR_CONTENT_UNREAD]) ? $folder[PR_CONTENT_UNREAD] : -1;
1568 1567
 				$content_deleted = isset($folder[PR_DELETED_MSG_COUNT]) ? $folder[PR_DELETED_MSG_COUNT] : -1;
1569 1568
 
1570
-				$this->folderStatCache[$user][bin2hex($folder[PR_SOURCE_KEY])] = $commit_time . "/" . $content_count . "/" . $content_unread . "/" . $content_deleted;
1569
+				$this->folderStatCache[$user][bin2hex($folder[PR_SOURCE_KEY])] = $commit_time."/".$content_count."/".$content_unread."/".$content_deleted;
1571 1570
 			}
1572 1571
 			SLog::Write(LOGLEVEL_DEBUG, sprintf("Grommunio->GetFolderStat() fetched status information of %d folders for store '%s'", count($this->folderStatCache[$user]), $user));
1573 1572
 		}
@@ -1749,7 +1748,7 @@  discard block
 block discarded – undo
1749 1748
 				));
1750 1749
 			}
1751 1750
 		}
1752
-		$messageName = rtrim((($key !== false) ? $key . "-" : "") . (($type !== "") ? $type : ""), "-");
1751
+		$messageName = rtrim((($key !== false) ? $key."-" : "").(($type !== "") ? $type : ""), "-");
1753 1752
 		$restriction = $this->getStateMessageRestriction($messageName, $counter, $thisCounterOnly);
1754 1753
 		$stateFolderContents = mapi_folder_getcontentstable($this->stateFolder, MAPI_ASSOCIATED);
1755 1754
 		if ($stateFolderContents) {
@@ -1923,7 +1922,7 @@  discard block
 block discarded – undo
1923 1922
 				));
1924 1923
 			}
1925 1924
 		}
1926
-		$messageName = rtrim((($key !== false) ? $key . "-" : "") . (($type !== "") ? $type : ""), "-");
1925
+		$messageName = rtrim((($key !== false) ? $key."-" : "").(($type !== "") ? $type : ""), "-");
1927 1926
 		$restriction = $this->getStateMessageRestriction($messageName, $counter, true);
1928 1927
 		$stateFolderContents = mapi_folder_getcontentstable($this->stateFolder, MAPI_ASSOCIATED);
1929 1928
 		if ($stateFolderContents) {
@@ -1972,17 +1971,17 @@  discard block
 block discarded – undo
1972 1971
 			$stateMessage = mapi_folder_createmessage($this->stateFolder, MAPI_ASSOCIATED);
1973 1972
 			SLog::Write(LOGLEVEL_DEBUG, sprintf("Grommunio->setStateMessage(): mapi_folder_createmessage 0x%08X", mapi_last_hresult()));
1974 1973
 
1975
-			$messageName = rtrim((($key !== false) ? $key . "-" : "") . (($type !== "") ? $type : ""), "-");
1974
+			$messageName = rtrim((($key !== false) ? $key."-" : "").(($type !== "") ? $type : ""), "-");
1976 1975
 			SLog::Write(LOGLEVEL_DEBUG, sprintf("Grommunio->setStateMessage(): creating new state message '%s-%d'", $messageName, is_int($counter) ? $counter : 0));
1977 1976
 			mapi_setprops($stateMessage, [PR_DISPLAY_NAME => $messageName, PR_MESSAGE_CLASS => 'IPM.Note.GrommunioState']);
1978 1977
 		}
1979 1978
 		if (isset($stateMessage)) {
1980
-			$jsonEncodedState = is_object($state) || is_array($state) ? json_encode($state, JSON_INVALID_UTF8_IGNORE | JSON_UNESCAPED_UNICODE) : $state;
1979
+			$jsonEncodedState = is_object($state) || is_array($state) ? json_encode($state, JSON_INVALID_UTF8_IGNORE|JSON_UNESCAPED_UNICODE) : $state;
1981 1980
 
1982 1981
 			$encodedState = base64_encode($jsonEncodedState);
1983 1982
 			$encodedStateLength = strlen($encodedState);
1984 1983
 			mapi_setprops($stateMessage, [PR_LAST_VERB_EXECUTED => is_int($counter) ? $counter : 0]);
1985
-			$stream = mapi_openproperty($stateMessage, PR_BODY, IID_IStream, STGM_DIRECT, MAPI_CREATE | MAPI_MODIFY);
1984
+			$stream = mapi_openproperty($stateMessage, PR_BODY, IID_IStream, STGM_DIRECT, MAPI_CREATE|MAPI_MODIFY);
1986 1985
 			mapi_stream_setsize($stream, $encodedStateLength);
1987 1986
 			mapi_stream_write($stream, $encodedState);
1988 1987
 			mapi_stream_commit($stream);
@@ -2077,7 +2076,7 @@  discard block
 block discarded – undo
2077 2076
 	private function adviseStoreToSink($store) {
2078 2077
 		// check if we already advised the store
2079 2078
 		if (!in_array($store, $this->changesSinkStores)) {
2080
-			mapi_msgstore_advise($store, null, fnevObjectModified | fnevObjectCreated | fnevObjectMoved | fnevObjectDeleted, $this->changesSink);
2079
+			mapi_msgstore_advise($store, null, fnevObjectModified|fnevObjectCreated|fnevObjectMoved|fnevObjectDeleted, $this->changesSink);
2081 2080
 
2082 2081
 			if (mapi_last_hresult()) {
2083 2082
 				SLog::Write(LOGLEVEL_WARN, sprintf("Grommunio->adviseStoreToSink(): failed to advised store '%s' with code 0x%X. Polling will be performed.", $store, mapi_last_hresult()));
@@ -2502,7 +2501,7 @@  discard block
 block discarded – undo
2502 2501
 	 * @return mapiFolderObject
2503 2502
 	 */
2504 2503
 	private function createSearchFolder($searchFolderRoot) {
2505
-		$folderName = "grommunio-sync Search Folder " . @getmypid();
2504
+		$folderName = "grommunio-sync Search Folder ".@getmypid();
2506 2505
 		$searchFolders = mapi_folder_gethierarchytable($searchFolderRoot);
2507 2506
 		$restriction = [
2508 2507
 			RES_CONTENT,
@@ -2551,7 +2550,7 @@  discard block
 block discarded – undo
2551 2550
 					$resOr,
2552 2551
 					[RES_CONTENT,
2553 2552
 						[
2554
-							FUZZYLEVEL => FL_SUBSTRING | FL_IGNORECASE,
2553
+							FUZZYLEVEL => FL_SUBSTRING|FL_IGNORECASE,
2555 2554
 							ULPROPTAG => $property,
2556 2555
 							VALUE => u2w($term),
2557 2556
 						],
Please login to merge, or discard this patch.
lib/grommunio/mapistreamwrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
 	public static function Open($mapistream, $truncatehtmlsafe = false) {
173 173
 		$context = stream_context_create([self::PROTOCOL => ['stream' => &$mapistream, 'truncatehtmlsafe' => $truncatehtmlsafe]]);
174 174
 
175
-		return fopen(self::PROTOCOL . "://", 'r', false, $context);
175
+		return fopen(self::PROTOCOL."://", 'r', false, $context);
176 176
 	}
177 177
 }
178 178
 
Please login to merge, or discard this patch.