Completed
Push — master ( 297e32...dbe386 )
by Reen
02:28
created

Core   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 13
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