Code Duplication    Length = 6-7 lines in 2 locations

src/ritero/SDK/TwitchTV/TwitchSDK.php 2 locations

@@ 812-818 (lines=7) @@
809
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
810
                }
811
                break;
812
            case 'PUT':
813
                curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'PUT');
814
                curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields)));
815
                if (!is_null($postfields)) {
816
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
817
                }
818
                break;
819
            case 'DELETE':
820
                curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE');
821
                curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields)));
@@ 819-824 (lines=6) @@
816
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
817
                }
818
                break;
819
            case 'DELETE':
820
                curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'DELETE');
821
                curl_setopt($crl, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($postfields)));
822
                if (!is_null($postfields)) {
823
                    curl_setopt($crl, CURLOPT_POSTFIELDS, ltrim($postfields, '?'));
824
                }
825
        }
826
827
        curl_setopt($crl, CURLOPT_URL, $uri);