Conditions | 5 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
47 | private function import(object $source) : array |
||
48 | { |
||
49 | $page = $size = null; |
||
50 | |||
51 | if (method_exists($source, 'getPage')) { |
||
52 | $page = (int)$source->getPage(); |
||
53 | } |
||
54 | |||
55 | if (method_exists($source, 'getSize')) { |
||
56 | $size = (int)$source->getSize(); |
||
57 | } |
||
58 | |||
59 | return [$page ?: 1, $size ?: $this->pSize]; |
||
60 | } |
||
62 |