Code Duplication    Length = 13-13 lines in 2 locations

src/CurlHTTPClient.php 2 locations

@@ 84-96 (lines=13) @@
81
				);
82
			break;
83
84
			case 'DELETE':
85
				if ($payload = http_build_query($request->payload)) {
86
					$payload = '?' . $payload;
87
				} else {
88
					$payload = '';
89
				}
90
				$this->curl->setopt_array(
91
					array(
92
						CURLOPT_CUSTOMREQUEST => 'DELETE',
93
						CURLOPT_URL => $request->url . $payload
94
					)
95
				);
96
			break;
97
98
			default:
99
			case 'GET':
@@ 99-111 (lines=13) @@
96
			break;
97
98
			default:
99
			case 'GET':
100
				if ($payload = http_build_query($request->payload)) {
101
					$payload = '?' . $payload;
102
				} else {
103
					$payload = '';
104
				}
105
				$this->curl->setopt_array(
106
					array(
107
						CURLOPT_HTTPGET => true,
108
						CURLOPT_URL => $request->url . $payload
109
					)
110
				);
111
			break;
112
		}
113
		
114
		$raw_response = $this->curl->exec();