PaginationInterface::setPageSize()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
namespace Germania\Pagination;
3
4
interface PaginationInterface
5
{
6
7
8
    /**
9
     * Checks if user picked a page.
10
     * TRUE if so, FALSE if no page number set.
11
     * 
12
     * @return boolean
13
     */
14
    public function isActive() : bool;	
15
16
17
    /**
18
     * Checks if custom page size (other than set with constructor) is used.
19
     * 
20
     * @return boolean
21
     */
22
    public function isDefaultPageSize() : bool;
23
24
    
25
    /**
26
     * Returns the current page number or NULL.
27
     * 
28
     * @return int|null
29
     */
30
    public function getCurrent();	
31
32
33
    /**
34
     * Sets the current page number.
35
     * @param int $number
36
     * @return PaginationInterface
37
     */
38
    public function setCurrent( $number );
39
40
41
    /**
42
     * Returns the previous page number or NULL
43
     * 
44
     * @return int|null
45
     */
46
    public function getPrevious();
47
48
49
    /**
50
     * Returns the next page number or NULL.
51
     * 
52
     * @return int|null
53
     */
54
    public function getNext();
55
56
57
    /**
58
     * Returns the first page number.
59
     * 
60
     * @return int
61
     */
62
    public function getFirst() : int;
63
64
65
    /**
66
     * Returns the last page number.
67
     * 
68
     * @return int
69
     */
70
    public function getLast() : int;	
71
72
73
    /**
74
     * Returns the number of items on a page
75
     * @return int|null
76
     */
77
    public function getPageSize();	
78
79
80
    /**
81
     * Sets the number of items on a page
82
     * @param int $site
0 ignored issues
show
Bug introduced by
There is no parameter named $site. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
83
     * @return  PaginationInterface
84
     */
85
	public function setPageSize( $size );
86
87
88
    /**
89
     * Returns the total number of pages
90
     * @return int
91
     */
92
    public function getPagesCount() : int;	
93
94
}