for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Germania\Pagination;
interface PaginationInterface
{
/**
* Checks if user picked a page.
* TRUE if so, FALSE if no page number set.
*
* @return boolean
*/
public function isActive() : bool;
* Checks if custom page size (other than set with constructor) is used.
public function isDefaultPageSize() : bool;
* Returns the current page number or NULL.
* @return int|null
public function getCurrent();
* Sets the current page number.
* @param int $number
* @return PaginationInterface
public function setCurrent( $number );
* Returns the previous page number or NULL
public function getPrevious();
* Returns the next page number or NULL.
public function getNext();
* Returns the first page number.
* @return int
public function getFirst() : int;
* Returns the last page number.
public function getLast() : int;
* Returns the number of items on a page
public function getPageSize();
* Sets the number of items on a page
* @param int $site
$site
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(...).
$italy
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.
public function setPageSize( $size );
* Returns the total number of pages
public function getPagesCount() : int;
}
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 methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.