Code Duplication    Length = 15-15 lines in 3 locations

src/Httprequest.php 3 locations

@@ 733-747 (lines=15) @@
730
731
                break;
732
            
733
            case 'PUT':
734
735
                curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, "PUT"); 
736
737
                if ( !empty($data) ) {
738
739
                    curl_setopt($this->ch, CURLOPT_POSTFIELDS, (is_array($data) OR is_object($data)) ? http_build_query($data) : $data);
740
741
                    $this->setHeader('Content-Type', $this->contentType);
742
743
                }
744
745
                curl_setopt($this->ch, CURLOPT_URL, $this->address);
746
747
                break;
748
            
749
            case 'POST':
750
@@ 749-763 (lines=15) @@
746
747
                break;
748
            
749
            case 'POST':
750
751
                curl_setopt($this->ch, CURLOPT_POST, true);
752
753
                if ( !empty($data) ) {
754
755
                    curl_setopt($this->ch, CURLOPT_POSTFIELDS, (is_array($data) OR is_object($data)) ? http_build_query($data) : $data);
756
757
                    $this->setHeader('Content-Type', $this->contentType);
758
759
                }
760
761
                curl_setopt($this->ch, CURLOPT_URL, $this->address);
762
763
                break;
764
            
765
            case 'DELETE':
766
@@ 765-779 (lines=15) @@
762
763
                break;
764
            
765
            case 'DELETE':
766
767
                curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, "DELETE");
768
769
                if ( !empty($data) ) {
770
771
                    curl_setopt($this->ch, CURLOPT_POSTFIELDS, (is_array($data) OR is_object($data)) ? http_build_query($data) : $data);
772
773
                    $this->setHeader('Content-Type', $this->contentType);
774
775
                }
776
                
777
                curl_setopt($this->ch, CURLOPT_URL, $this->address);
778
779
                break;
780
781
        }
782