Core   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 13
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOffset() 0 4 1
A getPageCount() 0 4 1
1
<?php
2
3
namespace ReenExeCubeTime\LightPaginator;
4
5
class Core
6
{
7
    public function getOffset($currentPage, $limit)
8
    {
9
        return ($currentPage - 1) * $limit;
10
    }
11
12
    public function getPageCount($count, $limit)
13
    {
14
        return (int)ceil($count / $limit);
15
    }
16
17
}
18