Completed
Push — 123 ( d13f38 )
by Vasily
05:11
created
lib/DNSClient.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -294,11 +294,9 @@
 block discarded – undo
294 294
 				} else {
295 295
 					$record['ip'] = inet_ntop($data);
296 296
 				}
297
-			}
298
-			elseif ($type === 'NS') {
297
+			} elseif ($type === 'NS') {
299 298
 				$record['ns'] = Binary::parseLabels($data);
300
-			}
301
-			elseif ($type === 'CNAME') {
299
+			} elseif ($type === 'CNAME') {
302 300
 				$record['cname'] = Binary::parseLabels($data, $orig);
303 301
 			}
304 302
 
Please login to merge, or discard this patch.
lib/BoundUNIXSocket.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
 			$user = $e[0];
20 20
 			$group = $e[1];
21 21
 			$path = $e[2];
22
-		}
23
-		elseif (sizeof($e) == 2) {
22
+		} elseif (sizeof($e) == 2) {
24 23
 			$user = $e[0];
25 24
 			$group = FALSE;
26 25
 			$path = $e[1];
Please login to merge, or discard this patch.
app-servers/MongoNode.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -127,11 +127,9 @@  discard block
 block discarded – undo
127 127
 				    
128 128
 					if ($item['op'] == 'i') {
129 129
 						$node->cacheObject($item['o']);
130
-					}
131
-					elseif ($item['op'] == 'd') {
130
+					} elseif ($item['op'] == 'd') {
132 131
 						$node->deleteObject($item['o']);
133
-					}
134
-					elseif ($item['op'] == 'u') {
132
+					} elseif ($item['op'] == 'u') {
135 133
 						if (
136 134
 							isset($item['b']) 
137 135
 							&& ($item['b'] === FALSE)
@@ -202,8 +200,7 @@  discard block
 block discarded – undo
202 200
 					}
203 201
 				);
204 202
 			}
205
-		}
206
-		elseif (!$this->appInstance->cursor->session->busy) {
203
+		} elseif (!$this->appInstance->cursor->session->busy) {
207 204
 			if ($this->appInstance->cursor->lastOpId !== NULL) {
208 205
 				$this->appInstance->cache->set('_rp', $this->appInstance->cursor->lastOpId);
209 206
 				$this->appInstance->cursor->lastOpId = NULL;
Please login to merge, or discard this patch.
old-code-for-refactoring/AsteriskDriver.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -258,11 +258,9 @@  discard block
 block discarded – undo
258 258
 			$this->cstate = AsteriskDriver::CONN_STATE_GOT_INITIAL_PACKET;
259 259
 			$this->appInstance->amiVersions[$this->addr] = trim($this->buf);
260 260
 			$this->auth();
261
-		}
262
-		elseif (strlen($this->buf) < 4) {
261
+		} elseif (strlen($this->buf) < 4) {
263 262
 			return; // Not enough data buffered yet
264
-		}
265
-		elseif (strpos($this->buf, "\r\n\r\n") !== false) {
263
+		} elseif (strpos($this->buf, "\r\n\r\n") !== false) {
266 264
 			while(($line = $this->gets()) !== false) {
267 265
 				if ($line == "\r\n") {
268 266
 					$this->instate = AsteriskDriver::INPUT_STATE_END_OF_PACKET;
@@ -303,8 +301,7 @@  discard block
 block discarded – undo
303 301
 						}
304 302
 						$this->packets = array();
305 303
 					}
306
-				}
307
-				elseif ($this->cstate === AsteriskDriver::CONN_STATE_HANDSHAKED_OK) {
304
+				} elseif ($this->cstate === AsteriskDriver::CONN_STATE_HANDSHAKED_OK) {
308 305
 					if ($this->instate == AsteriskDriver::INPUT_STATE_END_OF_PACKET) {
309 306
 						// Event
310 307
 						if (
@@ -361,8 +358,7 @@  discard block
 block discarded – undo
361 358
 			&& is_callable($this->onConnected)
362 359
 		) {
363 360
 			call_user_func($this->onConnected, $this, false);
364
-		}
365
-		elseif (
361
+		} elseif (
366 362
 			$this->cstate === AsteriskDriver::CONN_STATE_HANDSHAKED_OK
367 363
 			&& is_callable($this->onConnected)
368 364
 		) {
Please login to merge, or discard this patch.
app-web/WebSocketOverCOMET.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -262,14 +262,12 @@  discard block
 block discarded – undo
262 262
 			$id = self::getString($_REQUEST['_id']);
263 263
 			if (strpos($id, '.') === false) {
264 264
 					$ret['error'] = 'Bad cookie.';
265
-			}
266
-			elseif (
265
+			} elseif (
267 266
 				!isset($_REQUEST['data']) 
268 267
 				|| !is_string($_REQUEST['data'])
269 268
 			) {
270 269
 				$ret['error'] = 'No data.';
271
-			}
272
-			else {
270
+			} else {
273 271
 				list ($workerId, $this->reqIdAuthKey) = explode('.', $id, 2);
274 272
 				$workerId = (int) $workerId;
275 273
 				$this->appInstance->directCall($workerId, 'c2s', array($this->reqIdAuthKey,	$data));
@@ -331,8 +329,7 @@  discard block
 block discarded – undo
331 329
 			$id = self::getString($_REQUEST['_id']);
332 330
 			if (strpos($id, '.') === false) {
333 331
 				$ret['error'] = 'Bad cookie.';
334
-			}
335
-			else {
332
+			} else {
336 333
 				list ($workerId, $this->reqIdAuthKey) = explode('.', $id, 2);
337 334
 				$workerId = (int) $workerId;
338 335
 				$this->appInstance->directCall($workerId, 'poll', array(
Please login to merge, or discard this patch.
app-web/CGI.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
79 79
 		if (isset($this->attrs->server['BINPATH'])) {
80 80
 			if (isset($this->appInstance->binAliases[$this->attrs->server['BINPATH']])) {
81 81
 				$this->proc->binPath = $this->appInstance->binAliases[$this->attrs->server['BINPATH']];
82
-			}
83
-			elseif ($this->appInstance->config->allowoverridebinpath->value) {
82
+			} elseif ($this->appInstance->config->allowoverridebinpath->value) {
84 83
 				$this->proc->binPath = $this->attrs->server['BINPATH'];
85 84
 			}
86 85
 		}
@@ -111,8 +110,7 @@  discard block
 block discarded – undo
111 110
 			&& $this->appInstance->config->allowoverridecwd->value
112 111
 		) {
113 112
 			$this->proc->cwd = $this->attrs->server['CWD'];
114
-		}
115
-		elseif ($this->appInstance->config->cwd->value !== NULL) {
113
+		} elseif ($this->appInstance->config->cwd->value !== NULL) {
116 114
 			$this->proc->cwd = $this->appInstance->config->cwd->value;
117 115
 		} else {
118 116
 			$this->proc->cwd = dirname($this->attrs->server['SCRIPT_FILENAME']);
Please login to merge, or discard this patch.
app-web/FileReader.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,10 +76,11 @@
 block discarded – undo
76 76
 				if ($stat['type'] === 'd') {
77 77
 					if (!FS::$supported) {
78 78
 						$req->file(rtrim($path,'/') . '/index.html');
79
-					}
80
-					else $job('readdir', function ($name, $job) use ($path, $req) {
79
+					} else {
80
+						$job('readdir', function ($name, $job) use ($path, $req) {
81 81
 						FS::readdir(rtrim($path,'/'), function ($path, $dir) use ($job, $req) {
82 82
 							$found = false;
83
+					}
83 84
 							if (is_array($dir)) {
84 85
 								foreach ($dir['dents'] as $file) {
85 86
 									if ($file['type'] === EIO_DT_REG) { // is file
Please login to merge, or discard this patch.