Code Duplication    Length = 6-7 lines in 2 locations

src/jofner/SDK/TwitchTV/TwitchRequest.php 2 locations

@@ 137-143 (lines=7) @@
134
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
135
                }
136
                break;
137
            case 'PUT':
138
                curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'PUT');
139
                curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields)));
140
                if ($postfields !== null) {
141
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
142
                }
143
                break;
144
            case 'DELETE':
145
                curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE');
146
                curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields)));
@@ 144-149 (lines=6) @@
141
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
142
                }
143
                break;
144
            case 'DELETE':
145
                curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE');
146
                curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields)));
147
                if ($postfields !== null) {
148
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
149
                }
150
        }
151
152
        curl_setopt($crl, CURLOPT_URL, $uri);