Code Duplication    Length = 17-17 lines in 2 locations

src/Charcoal/Cms/Service/Manager/EventManager.php 1 location

@@ 518-534 (lines=17) @@
515
     * The total amount of pages.
516
     * @return float
517
     */
518
    public function numPages()
519
    {
520
        if ($this->numPage) {
521
            $this->numPage;
522
        };
523
524
        $entries = $this->entries();
525
        $count = count($entries);
526
527
        if ($this->numPerPage()) {
528
            $this->numPage = ceil($count / $this->numPerPage());
529
        } else {
530
            $this->numPage = 1;
531
        }
532
533
        return $this->numPage;
534
    }
535
536
    /**
537
     * Is there a pager.

src/Charcoal/Cms/Service/Manager/NewsManager.php 1 location

@@ 399-415 (lines=17) @@
396
     * The total amount of pages.
397
     * @return float
398
     */
399
    public function numPages()
400
    {
401
        if ($this->numPage) {
402
            $this->numPage;
403
        };
404
405
        $entries = $this->entries();
406
        $count = count($entries);
407
408
        if ($this->numPerPage()) {
409
            $this->numPage = ceil($count / $this->numPerPage());
410
        } else {
411
            $this->numPage = 1;
412
        }
413
414
        return $this->numPage;
415
    }
416
417
    /**
418
     * Is there a pager.