Code Duplication    Length = 7-7 lines in 2 locations

src/POData/UriProcessor/UriProcessor.php 2 locations

@@ 447-453 (lines=7) @@
444
445
        // Note $inlinecount=allpages means include the total count regardless of paging..so we set the counts first
446
        // regardless if POData does the paging or not.
447
        if ($this->getRequest()->queryType == QueryType::ENTITIES_WITH_COUNT()) {
448
            if ($this->getProviders()->handlesOrderedPaging()) {
449
                $this->getRequest()->setCountValue($result->count);
450
            } else {
451
                $this->getRequest()->setCountValue(count($result->results));
452
            }
453
        }
454
455
        //Have POData perform paging if necessary
456
        if (!$this->getProviders()->handlesOrderedPaging() && !empty($result->results)) {
@@ 462-468 (lines=7) @@
459
460
        //a bit surprising, but $skip and $top affects $count so update it here, not above
461
        //IE  data.svc/Collection/$count?$top=10 returns 10 even if Collection has 11+ entries
462
        if ($this->getRequest()->queryType == QueryType::COUNT()) {
463
            if ($this->getProviders()->handlesOrderedPaging()) {
464
                $this->getRequest()->setCountValue($result->count);
465
            } else {
466
                $this->getRequest()->setCountValue(count($result->results));
467
            }
468
        }
469
470
        $segment->setResult($result);
471
    }