Passed
Branch master (f497d2)
by Mike
03:18
created
lib/utils/utils.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@  discard block
 block discarded – undo
33 33
 		if ($pos === false) {
34 34
 			$user = $domainuser;
35 35
 			$domain = '';
36
-		}
37
-		else {
36
+		} else {
38 37
 			$domain = substr($domainuser, 0, $pos);
39 38
 			$user = substr($domainuser, $pos + 1);
40 39
 		}
@@ -105,12 +104,10 @@  discard block
 block discarded – undo
105 104
 				if (strlen($names) > 0) {
106 105
 					$lastfirst .= ", {$names}";
107 106
 					$firstlast = "{$names} {$lastname}";
108
-				}
109
-				else {
107
+				} else {
110 108
 					$firstlast = $lastname;
111 109
 				}
112
-			}
113
-			elseif (strlen($names) > 0) {
110
+			} elseif (strlen($names) > 0) {
114 111
 				$lastfirst = $firstlast = $names;
115 112
 			}
116 113
 
@@ -122,8 +119,7 @@  discard block
 block discarded – undo
122 119
 				case SYNC_FILEAS_COMPANYONLY:
123 120
 					if (strlen($company) > 0) {
124 121
 						$fileas = $company;
125
-					}
126
-					elseif (strlen($firstlast) > 0) {
122
+					} elseif (strlen($firstlast) > 0) {
127 123
 						$fileas = $lastfirst;
128 124
 					}
129 125
 					break;
@@ -134,8 +130,7 @@  discard block
 block discarded – undo
134 130
 						if (strlen($lastfirst) > 0) {
135 131
 							$fileas .= "({$lastfirst})";
136 132
 						}
137
-					}
138
-					elseif (strlen($lastfirst) > 0) {
133
+					} elseif (strlen($lastfirst) > 0) {
139 134
 						$fileas = $lastfirst;
140 135
 					}
141 136
 					break;
@@ -146,8 +141,7 @@  discard block
 block discarded – undo
146 141
 						if (strlen($firstlast) > 0) {
147 142
 							$fileas .= " ({$firstlast})";
148 143
 						}
149
-					}
150
-					elseif (strlen($firstlast) > 0) {
144
+					} elseif (strlen($firstlast) > 0) {
151 145
 						$fileas = $firstlast;
152 146
 					}
153 147
 					break;
@@ -158,8 +152,7 @@  discard block
 block discarded – undo
158 152
 						if (strlen($company) > 0) {
159 153
 							$fileas .= " ({$company})";
160 154
 						}
161
-					}
162
-					elseif (strlen($company) > 0) {
155
+					} elseif (strlen($company) > 0) {
163 156
 						$fileas = $company;
164 157
 					}
165 158
 					break;
@@ -170,8 +163,7 @@  discard block
 block discarded – undo
170 163
 						if (strlen($company) > 0) {
171 164
 							$fileas .= " ({$company})";
172 165
 						}
173
-					}
174
-					elseif (strlen($company) > 0) {
166
+					} elseif (strlen($company) > 0) {
175 167
 						$fileas = $company;
176 168
 					}
177 169
 					break;
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -150,15 +150,13 @@  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());
158 157
 			header(GSync::GetSupportedCommands());
159 158
 			SLog::Write(LOGLEVEL_INFO, $nopostex->getMessage());
160
-		}
161
-		elseif ($nopostex->getCode() == NoPostRequestException::GET_REQUEST) {
159
+		} elseif ($nopostex->getCode() == NoPostRequestException::GET_REQUEST) {
162 160
 			if (Request::GetUserAgent()) {
163 161
 				SLog::Write(LOGLEVEL_INFO, sprintf("User-agent: '%s'", Request::GetUserAgent()));
164 162
 			}
@@ -166,8 +164,7 @@  discard block
 block discarded – undo
166 164
 				GSync::PrintGrommunioSyncLegal('GET not supported', $nopostex->getMessage());
167 165
 			}
168 166
 		}
169
-	}
170
-	catch (Exception $ex) {
167
+	} catch (Exception $ex) {
171 168
 		// Extract any previous exception message for logging purpose.
172 169
 		$exclass = get_class($ex);
173 170
 		$exception_message = $ex->getMessage();
Please login to merge, or discard this patch.