Passed
Push — master ( 34e8da...f497d2 )
by
unknown
06:10 queued 02:50
created
lib/utils/utils.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,17 +65,17 @@  discard block
 block discarded – undo
65 65
 			$zcs = $zip;
66 66
 		}
67 67
 		if (isset($city) && $city != "") {
68
-			$zcs .= (($zcs) ? " " : "") . $city;
68
+			$zcs .= (($zcs) ? " " : "").$city;
69 69
 		}
70 70
 		if (isset($state) && $state != "") {
71
-			$zcs .= (($zcs) ? " " : "") . $state;
71
+			$zcs .= (($zcs) ? " " : "").$state;
72 72
 		}
73 73
 		if ($zcs) {
74
-			$out = $zcs . "\r\n" . $out;
74
+			$out = $zcs."\r\n".$out;
75 75
 		}
76 76
 
77 77
 		if (isset($street) && $street != "") {
78
-			$out = $street . (($out) ? "\r\n\r\n" . $out : "");
78
+			$out = $street.(($out) ? "\r\n\r\n".$out : "");
79 79
 		}
80 80
 
81 81
 		return ($out) ? $out : null;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	public static function BuildFileAs($lastname = "", $firstname = "", $middlename = "", $company = "") {
95 95
 		if (defined('FILEAS_ORDER')) {
96 96
 			$fileas = $lastfirst = $firstlast = "";
97
-			$names = trim($firstname . " " . $middlename);
97
+			$names = trim($firstname." ".$middlename);
98 98
 			$lastname = trim($lastname);
99 99
 			$company = trim($company);
100 100
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 			$OLUid .= pack("V", 1);
258 258
 			$OLUid .= $icalUid;
259 259
 
260
-			return hex2bin("040000008200E00074C5B7101A82E0080000000000000000000000000000000000000000" . bin2hex($OLUid) . "00");
260
+			return hex2bin("040000008200E00074C5B7101A82E0080000000000000000000000000000000000000000".bin2hex($OLUid)."00");
261 261
 		}
262 262
 
263 263
 		return hex2bin($icalUid);
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 	 */
410 410
 	public static function Utf8_truncate($string, $length, $htmlsafe = false) {
411 411
 		// make sure length is always an integer
412
-		$length = (int) $length;
412
+		$length = (int)$length;
413 413
 
414 414
 		// if the input string is shorter then the trunction, make sure it's valid UTF-8!
415 415
 		if (strlen($string) <= $length) {
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 	 * @return bool
480 480
 	 */
481 481
 	public static function IsBase64String($string) {
482
-		return (bool) preg_match("#^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+/]{4})?$#", $string);
482
+		return (bool)preg_match("#^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+/]{4})?$#", $string);
483 483
 	}
484 484
 
485 485
 	/**
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 	}
976 976
 
977 977
 	if (function_exists("iconv")) {
978
-		return @iconv("UTF-8", "Windows-1252" . $option, $string);
978
+		return @iconv("UTF-8", "Windows-1252".$option, $string);
979 979
 	}
980 980
 
981 981
 	return utf8_decode($string); // no euro support here
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
 	}
989 989
 
990 990
 	if (function_exists("iconv")) {
991
-		return @iconv("Windows-1252", "UTF-8" . $option, $string);
991
+		return @iconv("Windows-1252", "UTF-8".$option, $string);
992 992
 	}
993 993
 
994 994
 	return utf8_encode($string); // no euro support here
Please login to merge, or discard this patch.
lib/exceptions/gsyncexception.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@
 block discarded – undo
23 23
 			$logLevel = $this->defaultLogLevel;
24 24
 		}
25 25
 
26
-		parent::__construct($message, (int) $code);
27
-		SLog::Write($logLevel, get_class($this) . ': ' . $message . ' - code: ' . $code . ' - file: ' . $this->getFile() . ':' . $this->getLine(), false);
26
+		parent::__construct($message, (int)$code);
27
+		SLog::Write($logLevel, get_class($this).': '.$message.' - code: '.$code.' - file: '.$this->getFile().':'.$this->getLine(), false);
28 28
 	}
29 29
 
30 30
 	public function getHTTPCodeString() {
31
-		return $this->httpReturnCode . " " . $this->httpReturnMessage;
31
+		return $this->httpReturnCode." ".$this->httpReturnMessage;
32 32
 	}
33 33
 
34 34
 	public function getHTTPHeaders() {
Please login to merge, or discard this patch.
lib/exceptions/httpreturncodeexception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
 		if ($code) {
16 16
 			$this->httpReturnCode = $code;
17 17
 		}
18
-		parent::__construct($message, (int) $code, $previous, $logLevel);
18
+		parent::__construct($message, (int)$code, $previous, $logLevel);
19 19
 	}
20 20
 }
Please login to merge, or discard this patch.
lib/exceptions/serviceunavailableexception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 	public function __construct($message = "", $code = 0, $previous = null, $logLevel = false) {
18 18
 		parent::__construct($message, $code, $previous, $logLevel);
19 19
 		if (RETRY_AFTER_DELAY !== false) {
20
-			$this->httpHeaders[] = 'Retry-After: ' . RETRY_AFTER_DELAY;
20
+			$this->httpHeaders[] = 'Retry-After: '.RETRY_AFTER_DELAY;
21 21
 		}
22 22
 	}
23 23
 }
Please login to merge, or discard this patch.
config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	define('TIMEZONE', '');
15 15
 
16 16
 	// Defines the base path on the server
17
-	define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']) . '/');
17
+	define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
18 18
 
19 19
 	// Try to set unlimited timeout
20 20
 	define('SCRIPT_TIMEOUT', 0);
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 
81 81
 	// Filelog settings
82 82
 	define('LOGFILEDIR', '/var/log/grommunio-sync/');
83
-	define('LOGFILE', LOGFILEDIR . 'grommunio-sync.log');
84
-	define('LOGERRORFILE', LOGFILEDIR . 'grommunio-sync-error.log');
83
+	define('LOGFILE', LOGFILEDIR.'grommunio-sync.log');
84
+	define('LOGERRORFILE', LOGFILEDIR.'grommunio-sync-error.log');
85 85
 
86 86
 	// Syslog settings
87 87
 	// false will log to local syslog, otherwise put the remote syslog IP here
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -100,13 +100,13 @@  discard block
 block discarded – undo
100 100
 		header(GSync::GetServerHeader());
101 101
 
102 102
 		if (RequestProcessor::isUserAuthenticated()) {
103
-			header("X-Grommunio-Sync-Version: " . @constant('GROMMUNIOSYNC_VERSION'));
103
+			header("X-Grommunio-Sync-Version: ".@constant('GROMMUNIOSYNC_VERSION'));
104 104
 
105 105
 			// announce the supported AS versions (if not already sent to device)
106 106
 			if (GSync::GetDeviceManager()->AnnounceASVersion()) {
107 107
 				$versions = GSync::GetSupportedProtocolVersions(true);
108 108
 				SLog::Write(LOGLEVEL_INFO, sprintf("Announcing latest AS version to device: %s", $versions));
109
-				header("X-MS-RP: " . $versions);
109
+				header("X-MS-RP: ".$versions);
110 110
 			}
111 111
 		}
112 112
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		if ($ex->getPrevious()) {
175 175
 			do {
176 176
 				$current_exception = $ex->getPrevious();
177
-				$exception_message .= ' -> ' . $current_exception->getMessage();
177
+				$exception_message .= ' -> '.$current_exception->getMessage();
178 178
 			}
179 179
 			while ($current_exception->getPrevious());
180 180
 		}
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
 		if (!headers_sent()) {
189 189
 			if ($ex instanceof GSyncException) {
190
-				header('HTTP/1.1 ' . $ex->getHTTPCodeString());
190
+				header('HTTP/1.1 '.$ex->getHTTPCodeString());
191 191
 				foreach ($ex->getHTTPHeaders() as $h) {
192 192
 					header($h);
193 193
 				}
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
 		elseif (!($ex instanceof GSyncException) || $ex->showLegalNotice()) {
224 224
 			$cmdinfo = (Request::GetCommand()) ? sprintf(" processing command <i>%s</i>", Request::GetCommand()) : "";
225 225
 			$extrace = $ex->getTrace();
226
-			$trace = (!empty($extrace)) ? "\n\nTrace:\n" . print_r($extrace, 1) : "";
227
-			GSync::PrintGrommunioSyncLegal($exclass . $cmdinfo, sprintf('<pre>%s</pre>', $ex->getMessage() . $trace));
226
+			$trace = (!empty($extrace)) ? "\n\nTrace:\n".print_r($extrace, 1) : "";
227
+			GSync::PrintGrommunioSyncLegal($exclass.$cmdinfo, sprintf('<pre>%s</pre>', $ex->getMessage().$trace));
228 228
 		}
229 229
 
230 230
 		// Announce exception to process loop detection
Please login to merge, or discard this patch.