Code Duplication    Length = 7-7 lines in 2 locations

src/POData/UriProcessor/UriProcessor.php 2 locations

@@ 455-461 (lines=7) @@
452
453
        // Note $inlinecount=allpages means include the total count regardless of paging..so we set the counts first
454
        // regardless if POData does the paging or not.
455
        if ($this->request->queryType == QueryType::ENTITIES_WITH_COUNT()) {
456
            if ($this->providers->handlesOrderedPaging()) {
457
                $this->request->setCountValue($result->count);
458
            } else {
459
                $this->request->setCountValue(count($result->results));
460
            }
461
        }
462
463
        //Have POData perform paging if necessary
464
        if (!$this->providers->handlesOrderedPaging() && !empty($result->results)) {
@@ 470-476 (lines=7) @@
467
468
        //a bit surprising, but $skip and $top affects $count so update it here, not above
469
        //IE  data.svc/Collection/$count?$top=10 returns 10 even if Collection has 11+ entries
470
        if ($this->request->queryType == QueryType::COUNT()) {
471
            if ($this->providers->handlesOrderedPaging()) {
472
                $this->request->setCountValue($result->count);
473
            } else {
474
                $this->request->setCountValue(count($result->results));
475
            }
476
        }
477
478
        $segment->setResult($result->results);
479
    }