Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/4352' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Apr 29, 2013
152 parents 8abfa60 + e4204b5 + d05ccf2 + e604cfb + ca97c01 + 287eb63 + 51a49db + a59e5dc + 548a07d + 8505b4c + 2716d1a + 37045c3 + 6903d5f + cdad453 + 9db7df2 + 9bb9d9a + 41b2dc0 + 5295cf8 + 27f9b6d + b273434 + 5b111b1 + ee4a022 + 5130ae3 + aff706f + f73a53d + d4a913a + b29f072 + 651a727 + 430d154 + 1839a34 + 0d5d64e + 5cde84e + dc8ee4d + 85d900a + 887c312 + 9c949ae + 0fc5669 + e29d393 + e25c698 + ca5bdbb + 18e54b8 + 73cc878 + a514416 + 778823f + fff1957 + 35beb1b + ecb2a1a + 67a31fa + c0ee14a + 7273469 + 62e104e + 293b0d0 + c59092f + b3e8431 + 615f1cb + 198a3b9 + 1630584 + 7627438 + 84a5bf6 + ad86c9d + a84a8ca + 4198a62 + e822871 + 431867b + 200dbe0 + 7277f0b + 2408da8 + 2413f67 + 4731ffc + d177c96 + b27c24b + ec13154 + 8e7b30c + 6c4437a + 2a2ed86 + 366d656 + 5f3d390 + 666d47b + dd0e03b + 1a5602a + c01cd9c + 6849552 + 8b79ca2 + e84f0d1 + 9f1b34e + c453b3e + 3d74be7 + 999502e + a46d96f + fba87c0 + ce665da + ef2dd94 + a66c89a + b997097 + da0e97d + 1302f0b + a1bbaa9 + 6bfa503 + b4b9ece + 9b1ac2d + 30880b8 + e308f6d + 8da89be + 199755f + 2310cd0 + 4e7316f + 1d6c476 + c2593db + c6ff37b + 5344902 + a35c230 + 39052a9 + 8152f2f + e0f8777 + d1f068b + 006fb88 + 6261074 + 8bf6181 + 33e79d4 + a778f16 + 57199ed + 3653e0c + 5b5a61e + 082fd49 + d56f4bf + d4ad9b4 + c2442b4 + a56d05b + 7400cfb + 8794fff + 0877be7 + 9c75f77 + 261c157 + 94f1dd4 + ae538e5 + bf68265 + c222657 + 56e71f6 + b95fff7 + 7736317 + 8a3b848 + e18ea15 + ae1a095 + a18a97f + c3ef55c + 09f0424 + 6369f0d + bbce3db + e7612d4 + af38e3f + cd3f4d4 + 5bb229a commit 43cba4d
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions src/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ interface AdapterInterface extends Countable
/**
* Returns an collection of items for a page.
*
* @param integer $offset Page offset
* @param integer $itemCountPerPage Number of items per page
* @param int $offset Page offset
* @param int $itemCountPerPage Number of items per page
* @return array
*/
public function getItems($offset, $itemCountPerPage);
Expand Down
8 changes: 4 additions & 4 deletions src/Adapter/ArrayAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ArrayAdapter implements AdapterInterface
/**
* Item count
*
* @var integer
* @var int
*/
protected $count = null;

Expand All @@ -39,8 +39,8 @@ public function __construct(array $array = array())
/**
* Returns an array of items for a page.
*
* @param integer $offset Page offset
* @param integer $itemCountPerPage Number of items per page
* @param int $offset Page offset
* @param int $itemCountPerPage Number of items per page
* @return array
*/
public function getItems($offset, $itemCountPerPage)
Expand All @@ -51,7 +51,7 @@ public function getItems($offset, $itemCountPerPage)
/**
* Returns the total number of rows in the array.
*
* @return integer
* @return int
*/
public function count()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Adapter/DbSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class DbSelect implements AdapterInterface
/**
* Total item count
*
* @var integer
* @var int
*/
protected $rowCount = null;

Expand Down Expand Up @@ -72,8 +72,8 @@ public function __construct(Select $select, $adapterOrSqlObject, ResultSetInterf
/**
* Returns an array of items for a page.
*
* @param integer $offset Page offset
* @param integer $itemCountPerPage Number of items per page
* @param int $offset Page offset
* @param int $itemCountPerPage Number of items per page
* @return array
*/
public function getItems($offset, $itemCountPerPage)
Expand All @@ -94,7 +94,7 @@ public function getItems($offset, $itemCountPerPage)
/**
* Returns the total number of rows in the result set.
*
* @return integer
* @return int
*/
public function count()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Adapter/Iterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Iterator implements AdapterInterface
/**
* Item count
*
* @var integer
* @var int
*/
protected $count = null;

Expand All @@ -46,8 +46,8 @@ public function __construct(\Iterator $iterator)
/**
* Returns an iterator of items for a page, or an empty array.
*
* @param integer $offset Page offset
* @param integer $itemCountPerPage Number of items per page
* @param int $offset Page offset
* @param int $itemCountPerPage Number of items per page
* @return array|\Zend\Paginator\SerializableLimitIterator
*/
public function getItems($offset, $itemCountPerPage)
Expand All @@ -61,7 +61,7 @@ public function getItems($offset, $itemCountPerPage)
/**
* Returns the total number of rows in the collection.
*
* @return integer
* @return int
*/
public function count()
{
Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/Null.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class Null implements AdapterInterface
/**
* Item count
*
* @var integer
* @var int
*/
protected $count = null;

/**
* Constructor.
*
* @param integer $count Total item count (Optional)
* @param int $count Total item count (Optional)
*/
public function __construct($count = 0)
{
Expand All @@ -31,8 +31,8 @@ public function __construct($count = 0)
/**
* Returns an array of items for a page.
*
* @param integer $offset Page offset
* @param integer $itemCountPerPage Number of items per page
* @param int $offset Page offset
* @param int $itemCountPerPage Number of items per page
* @return array
*/
public function getItems($offset, $itemCountPerPage)
Expand All @@ -50,7 +50,7 @@ public function getItems($offset, $itemCountPerPage)
/**
* Returns the total number of rows in the array.
*
* @return integer
* @return int
*/
public function count()
{
Expand Down
68 changes: 34 additions & 34 deletions src/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Paginator implements Countable, IteratorAggregate
/**
* Number of items in the current page
*
* @var integer
* @var int
*/
protected $currentItemCount = null;

Expand All @@ -105,7 +105,7 @@ class Paginator implements Countable, IteratorAggregate
/**
* Current page number (starting from 1)
*
* @var integer
* @var int
*/
protected $currentPageNumber = 1;

Expand All @@ -119,22 +119,22 @@ class Paginator implements Countable, IteratorAggregate
/**
* Number of items per page
*
* @var integer
* @var int
*/
protected $itemCountPerPage = null;

/**
* Number of pages
*
* @var integer
* @var int
*/
protected $pageCount = null;

/**
* Number of local pages (i.e., the number of discrete page numbers
* that will be displayed, including the current page number)
*
* @var integer
* @var int
*/
protected $pageRange = 10;

Expand Down Expand Up @@ -335,7 +335,7 @@ public function setCacheEnabled($enable)
/**
* Returns the number of pages.
*
* @return integer
* @return int
*/
public function count()
{
Expand All @@ -349,7 +349,7 @@ public function count()
/**
* Returns the total number of items available.
*
* @return integer
* @return int
*/
public function getTotalItemCount()
{
Expand Down Expand Up @@ -390,9 +390,9 @@ public function clearPageItemCache($pageNumber = null)
/**
* Returns the absolute item number for the specified item.
*
* @param integer $relativeItemNumber Relative item number
* @param integer $pageNumber Page number
* @return integer
* @param int $relativeItemNumber Relative item number
* @param int $pageNumber Page number
* @return int
*/
public function getAbsoluteItemNumber($relativeItemNumber, $pageNumber = null)
{
Expand Down Expand Up @@ -420,7 +420,7 @@ public function getAdapter()
/**
* Returns the number of items for the current page.
*
* @return integer
* @return int
*/
public function getCurrentItemCount()
{
Expand Down Expand Up @@ -448,7 +448,7 @@ public function getCurrentItems()
/**
* Returns the current page number.
*
* @return integer
* @return int
*/
public function getCurrentPageNumber()
{
Expand All @@ -458,12 +458,12 @@ public function getCurrentPageNumber()
/**
* Sets the current page number.
*
* @param integer $pageNumber Page number
* @param int $pageNumber Page number
* @return Paginator $this
*/
public function setCurrentPageNumber($pageNumber)
{
$this->currentPageNumber = (integer) $pageNumber;
$this->currentPageNumber = (int) $pageNumber;
$this->currentItems = null;
$this->currentItemCount = null;

Expand Down Expand Up @@ -497,8 +497,8 @@ public function setFilter(FilterInterface $filter)
* Returns an item from a page. The current page is used if there's no
* page specified.
*
* @param integer $itemNumber Item number (1 to itemCountPerPage)
* @param integer $pageNumber
* @param int $itemNumber Item number (1 to itemCountPerPage)
* @param int $pageNumber
* @throws Exception\InvalidArgumentException
* @return mixed
*/
Expand Down Expand Up @@ -534,7 +534,7 @@ public function getItem($itemNumber, $pageNumber = null)
/**
* Returns the number of items per page.
*
* @return integer
* @return int
*/
public function getItemCountPerPage()
{
Expand All @@ -548,12 +548,12 @@ public function getItemCountPerPage()
/**
* Sets the number of items per page.
*
* @param integer $itemCountPerPage
* @param int $itemCountPerPage
* @return Paginator $this
*/
public function setItemCountPerPage($itemCountPerPage = -1)
{
$this->itemCountPerPage = (integer) $itemCountPerPage;
$this->itemCountPerPage = (int) $itemCountPerPage;
if ($this->itemCountPerPage < 1) {
$this->itemCountPerPage = $this->getTotalItemCount();
}
Expand All @@ -568,7 +568,7 @@ public function setItemCountPerPage($itemCountPerPage = -1)
* Returns the number of items in a collection.
*
* @param mixed $items Items
* @return integer
* @return int
*/
public function getItemCount($items)
{
Expand All @@ -586,7 +586,7 @@ public function getItemCount($items)
/**
* Returns the items for a given page.
*
* @param integer $pageNumber
* @param int $pageNumber
* @return mixed
*/
public function getItemsByPage($pageNumber)
Expand Down Expand Up @@ -641,7 +641,7 @@ public function getIterator()
/**
* Returns the page range (see property declaration above).
*
* @return integer
* @return int
*/
public function getPageRange()
{
Expand All @@ -651,12 +651,12 @@ public function getPageRange()
/**
* Sets the page range (see property declaration above).
*
* @param integer $pageRange
* @param int $pageRange
* @return Paginator $this
*/
public function setPageRange($pageRange)
{
$this->pageRange = (integer) $pageRange;
$this->pageRange = (int) $pageRange;

return $this;
}
Expand All @@ -679,8 +679,8 @@ public function getPages($scrollingStyle = null)
/**
* Returns a subset of pages within a given range.
*
* @param integer $lowerBound Lower bound of the range
* @param integer $upperBound Upper bound of the range
* @param int $lowerBound Lower bound of the range
* @param int $upperBound Upper bound of the range
* @return array
*/
public function getPagesInRange($lowerBound, $upperBound)
Expand Down Expand Up @@ -753,12 +753,12 @@ public function setView(View\Renderer\RendererInterface $view = null)
/**
* Brings the item number in range of the page.
*
* @param integer $itemNumber
* @return integer
* @param int $itemNumber
* @return int
*/
public function normalizeItemNumber($itemNumber)
{
$itemNumber = (integer) $itemNumber;
$itemNumber = (int) $itemNumber;

if ($itemNumber < 1) {
$itemNumber = 1;
Expand All @@ -774,12 +774,12 @@ public function normalizeItemNumber($itemNumber)
/**
* Brings the page number in range of the paginator.
*
* @param integer $pageNumber
* @return integer
* @param int $pageNumber
* @return int
*/
public function normalizePageNumber($pageNumber)
{
$pageNumber = (integer) $pageNumber;
$pageNumber = (int) $pageNumber;

if ($pageNumber < 1) {
$pageNumber = 1;
Expand Down Expand Up @@ -874,11 +874,11 @@ protected function _getCacheInternalId()
/**
* Calculates the page count.
*
* @return integer
* @return int
*/
protected function _calculatePageCount()
{
return (integer) ceil($this->getAdapter()->count() / $this->getItemCountPerPage());
return (int) ceil($this->getAdapter()->count() / $this->getItemCountPerPage());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ScrollingStyle/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class All implements ScrollingStyleInterface
* Returns an array of all pages given a page number and range.
*
* @param Paginator $paginator
* @param integer $pageRange Unused
* @param int $pageRange Unused
* @return array
*/
public function getPages(Paginator $paginator, $pageRange = null)
Expand Down
2 changes: 1 addition & 1 deletion src/ScrollingStyle/Elastic.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Elastic extends Sliding
* Returns an array of "local" pages given a page number and range.
*
* @param Paginator $paginator
* @param integer $pageRange Unused
* @param int $pageRange Unused
* @return array
*/
public function getPages(Paginator $paginator, $pageRange = null)
Expand Down
Loading

0 comments on commit 43cba4d

Please sign in to comment.