Code Duplication    Length = 7-7 lines in 2 locations

src/POData/UriProcessor/UriProcessorNew.php 2 locations

@@ 530-536 (lines=7) @@
527
        }
528
        // Note $inlinecount=allpages means include the total count regardless of paging..so we set the counts first
529
        // regardless if POData does the paging or not.
530
        if ($this->getRequest()->queryType == QueryType::ENTITIES_WITH_COUNT()) {
531
            if ($this->getProviders()->handlesOrderedPaging()) {
532
                $this->getRequest()->setCountValue($result->count);
533
            } else {
534
                $this->getRequest()->setCountValue(count($result->results));
535
            }
536
        }
537
        //Have POData perform paging if necessary
538
        if (!$this->getProviders()->handlesOrderedPaging() && !empty($result->results)) {
539
            $result->results = $this->performPaging($result->results);
@@ 543-549 (lines=7) @@
540
        }
541
        //a bit surprising, but $skip and $top affects $count so update it here, not above
542
        //IE  data.svc/Collection/$count?$top=10 returns 10 even if Collection has 11+ entries
543
        if ($this->getRequest()->queryType == QueryType::COUNT()) {
544
            if ($this->getProviders()->handlesOrderedPaging()) {
545
                $this->getRequest()->setCountValue($result->count);
546
            } else {
547
                $this->getRequest()->setCountValue(count($result->results));
548
            }
549
        }
550
        $segment->setResult($result);
551
    }
552