Code Duplication    Length = 7-7 lines in 2 locations

src/POData/UriProcessor/UriProcessorNew.php 2 locations

@@ 568-574 (lines=7) @@
565
        }
566
        // Note $inlinecount=allpages means include the total count regardless of paging..so we set the counts first
567
        // regardless if POData does the paging or not.
568
        if ($this->getRequest()->queryType == QueryType::ENTITIES_WITH_COUNT()) {
569
            if ($this->getProviders()->handlesOrderedPaging()) {
570
                $this->getRequest()->setCountValue($result->count);
571
            } else {
572
                $this->getRequest()->setCountValue(count($result->results));
573
            }
574
        }
575
        //Have POData perform paging if necessary
576
        if (!$this->getProviders()->handlesOrderedPaging() && !empty($result->results)) {
577
            $result->results = $this->performPaging($result->results);
@@ 581-587 (lines=7) @@
578
        }
579
        //a bit surprising, but $skip and $top affects $count so update it here, not above
580
        //IE  data.svc/Collection/$count?$top=10 returns 10 even if Collection has 11+ entries
581
        if ($this->getRequest()->queryType == QueryType::COUNT()) {
582
            if ($this->getProviders()->handlesOrderedPaging()) {
583
                $this->getRequest()->setCountValue($result->count);
584
            } else {
585
                $this->getRequest()->setCountValue(count($result->results));
586
            }
587
        }
588
        $segment->setResult($result);
589
    }
590