Completed
Pull Request — master (#6)
by
unknown
01:24
created
Tests/ClientTest.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -134,8 +134,7 @@  discard block
 block discarded – undo
134 134
 			$this->object->setToken($token);
135 135
 			$result = $this->object->authenticate();
136 136
 			$this->assertEquals($result, $token);
137
-		}
138
-		else
137
+		} else
139 138
 		{
140 139
 			$this->object->setOption('requestTokenURL', 'https://example.com/request_token');
141 140
 			$this->object->setOption('authoriseURL', 'https://example.com/authorize');
@@ -173,8 +172,7 @@  discard block
 block discarded – undo
173 172
 			{
174 173
 				TestHelper::setValue($this->object, 'version', $version);
175 174
 				$data = array('oauth_verifier' => 'verifier', 'oauth_token' => 'token');
176
-			}
177
-			else
175
+			} else
178 176
 			{
179 177
 				TestHelper::setValue($this->object, 'version', $version);
180 178
 				$data = array('oauth_token' => 'token');
@@ -203,8 +201,7 @@  discard block
 block discarded – undo
203 201
 				if (method_exists($this, 'expectException'))
204 202
 				{
205 203
 					$this->expectException('DomainException');
206
-				}
207
-				else
204
+				} else
208 205
 				{
209 206
 					$this->setExpectedException('DomainException');
210 207
 				}
@@ -309,8 +306,7 @@  discard block
 block discarded – undo
309 306
 				$this->object->oauthRequest('www.example.com', $method, array('oauth_token' => '1235'), $data, array('Content-Type' => 'multipart/form-data')),
310 307
 				$this->equalTo($returnData)
311 308
 				);
312
-		}
313
-		else
309
+		} else
314 310
 		{
315 311
 			$this->client->expects($this->at(0))
316 312
 				->method($method)
Please login to merge, or discard this patch.
src/Client.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -102,8 +102,7 @@  discard block
 block discarded – undo
102 102
 		if (strcmp($this->version, '1.0a') === 0)
103 103
 		{
104 104
 			$verifier = $this->input->get('oauth_verifier');
105
-		}
106
-		else
105
+		} else
107 106
 		{
108 107
 			$verifier = $this->input->get('oauth_token');
109 108
 		}
@@ -161,8 +160,7 @@  discard block
 block discarded – undo
161 160
 			$parameters = array(
162 161
 				'oauth_callback' => $this->getOption('callback'),
163 162
 			);
164
-		}
165
-		else
163
+		} else
166 164
 		{
167 165
 			$parameters = array();
168 166
 		}
@@ -268,8 +266,7 @@  discard block
 block discarded – undo
268 266
 		if (isset($headers['Content-Type']) && strpos($headers['Content-Type'], 'multipart/form-data') !== false || !\is_array($data))
269 267
 		{
270 268
 			$oauthHeaders = $parameters;
271
-		}
272
-		else
269
+		} else
273 270
 		{
274 271
 			// Use all parameters for the signature.
275 272
 			$oauthHeaders = array_merge($parameters, $data);
@@ -349,8 +346,7 @@  discard block
 block discarded – undo
349 346
 			if (!strcmp($header, 'OAuth '))
350 347
 			{
351 348
 				$header .= $key . '="' . $this->safeEncode($value) . '"';
352
-			}
353
-			else
349
+			} else
354 350
 			{
355 351
 				$header .= ', ' . $key . '="' . $value . '"';
356 352
 			}
@@ -380,14 +376,12 @@  discard block
 block discarded – undo
380 376
 					if (strpos($url, '?') === false)
381 377
 					{
382 378
 						$url .= '?' . $key . '=' . $v;
383
-					}
384
-					else
379
+					} else
385 380
 					{
386 381
 						$url .= '&' . $key . '=' . $v;
387 382
 					}
388 383
 				}
389
-			}
390
-			else
384
+			} else
391 385
 			{
392 386
 				if (strpos($value, ' ') !== false)
393 387
 				{
@@ -397,8 +391,7 @@  discard block
 block discarded – undo
397 391
 				if (strpos($url, '?') === false)
398 392
 				{
399 393
 					$url .= '?' . $key . '=' . $value;
400
-				}
401
-				else
394
+				} else
402 395
 				{
403 396
 					$url .= '&' . $key . '=' . $value;
404 397
 				}
@@ -461,8 +454,7 @@  discard block
 block discarded – undo
461 454
 					$v    = $this->safeEncode($v);
462 455
 					$kv[] = "{$key}={$v}";
463 456
 				}
464
-			}
465
-			else
457
+			} else
466 458
 			{
467 459
 				$value = $this->safeEncode($value);
468 460
 				$kv[]  = "{$key}={$value}";
Please login to merge, or discard this patch.