Code Duplication    Length = 7-7 lines in 2 locations

src/POData/UriProcessor/UriProcessorNew.php 2 locations

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