Code Duplication    Length = 4-4 lines in 4 locations

src/Client.php 4 locations

@@ 292-295 (lines=4) @@
289
		// Send the request.
290
		switch ($method)
291
		{
292
			case 'GET':
293
				$url = $this->toUrl($url, $data);
294
				$response = $this->client->get($url, array('Authorization' => $this->createHeader($oauthHeaders)));
295
				break;
296
			case 'POST':
297
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
298
				$response = $this->client->post($url, $data, $headers);
@@ 296-299 (lines=4) @@
293
				$url = $this->toUrl($url, $data);
294
				$response = $this->client->get($url, array('Authorization' => $this->createHeader($oauthHeaders)));
295
				break;
296
			case 'POST':
297
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
298
				$response = $this->client->post($url, $data, $headers);
299
				break;
300
			case 'PUT':
301
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
302
				$response = $this->client->put($url, $data, $headers);
@@ 300-303 (lines=4) @@
297
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
298
				$response = $this->client->post($url, $data, $headers);
299
				break;
300
			case 'PUT':
301
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
302
				$response = $this->client->put($url, $data, $headers);
303
				break;
304
			case 'DELETE':
305
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
306
				$response = $this->client->delete($url, $headers);
@@ 304-307 (lines=4) @@
301
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
302
				$response = $this->client->put($url, $data, $headers);
303
				break;
304
			case 'DELETE':
305
				$headers = array_merge($headers, array('Authorization' => $this->createHeader($oauthHeaders)));
306
				$response = $this->client->delete($url, $headers);
307
				break;
308
		}
309
310
		// Validate the response code.