Code Duplication    Length = 6-7 lines in 2 locations

lib/GitHub/AbstractApi.php 2 locations

@@ 530-536 (lines=7) @@
527
            /** @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7 */
528
            case Request::METHOD_DELETE:
529
                /** @see http://tools.ietf.org/html/rfc5789 */
530
            case Request::METHOD_PATCH:
531
                $curl->setOption([
532
                    CURLOPT_CUSTOMREQUEST => $method,
533
                    CURLOPT_POST          => true,
534
                    CURLOPT_POSTFIELDS    => json_encode(array_filter($postFields))
535
                ]);
536
                break;
537
538
            /** @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3 */
539
            case Request::METHOD_GET:
@@ 552-557 (lines=6) @@
549
                break;
550
551
            /** @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5 */
552
            case Request::METHOD_POST:
553
                $curl->setOption([
554
                    CURLOPT_POST       => true,
555
                    CURLOPT_POSTFIELDS => json_encode(array_filter($postFields))
556
                ]);
557
                break;
558
559
            /** @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6 */
560
            case Request::METHOD_PUT: