Code Duplication    Length = 12-14 lines in 3 locations

src/POData/BaseService.php 3 locations

@@ 533-546 (lines=14) @@
530
                    array(MimeTypes::MIME_APPLICATION_XML)
531
                );
532
533
            case TargetKind::SERVICE_DIRECTORY():
534
                return HttpProcessUtility::selectMimeType(
535
                    $requestAcceptText,
536
                    array(
537
                        MimeTypes::MIME_APPLICATION_XML,
538
                        MimeTypes::MIME_APPLICATION_ATOMSERVICE,
539
                        MimeTypes::MIME_APPLICATION_JSON,
540
                        MimeTypes::MIME_APPLICATION_JSON_FULL_META,
541
                        MimeTypes::MIME_APPLICATION_JSON_NO_META,
542
                        MimeTypes::MIME_APPLICATION_JSON_MINIMAL_META,
543
                        MimeTypes::MIME_APPLICATION_JSON_VERBOSE,
544
545
                    )
546
                );
547
548
            case TargetKind::PRIMITIVE_VALUE():
549
                $supportedResponseMimeTypes = array(MimeTypes::MIME_TEXTPLAIN);
@@ 575-587 (lines=13) @@
572
            case TargetKind::PRIMITIVE():
573
            case TargetKind::COMPLEX_OBJECT():
574
            case TargetKind::BAG():
575
            case TargetKind::LINK():
576
                return HttpProcessUtility::selectMimeType(
577
                    $requestAcceptText,
578
                    array(
579
                        MimeTypes::MIME_APPLICATION_XML,
580
                        MimeTypes::MIME_TEXTXML,
581
                        MimeTypes::MIME_APPLICATION_JSON,
582
                        MimeTypes::MIME_APPLICATION_JSON_FULL_META,
583
                        MimeTypes::MIME_APPLICATION_JSON_NO_META,
584
                        MimeTypes::MIME_APPLICATION_JSON_MINIMAL_META,
585
                        MimeTypes::MIME_APPLICATION_JSON_VERBOSE,
586
                    )
587
                );
588
589
            case TargetKind::RESOURCE():
590
                return HttpProcessUtility::selectMimeType(
@@ 589-600 (lines=12) @@
586
                    )
587
                );
588
589
            case TargetKind::RESOURCE():
590
                return HttpProcessUtility::selectMimeType(
591
                    $requestAcceptText,
592
                    array(
593
                        MimeTypes::MIME_APPLICATION_ATOM,
594
                        MimeTypes::MIME_APPLICATION_JSON,
595
                        MimeTypes::MIME_APPLICATION_JSON_FULL_META,
596
                        MimeTypes::MIME_APPLICATION_JSON_NO_META,
597
                        MimeTypes::MIME_APPLICATION_JSON_MINIMAL_META,
598
                        MimeTypes::MIME_APPLICATION_JSON_VERBOSE,
599
                    )
600
                );
601
602
            case TargetKind::MEDIA_RESOURCE():
603
                if (!$request->isNamedStream() && !$request->getTargetResourceType()->isMediaLinkEntry()) {