Skip to content

Commit 0fd6953

Browse files
authored
Added precise typehints for limit() and page() methods in Selection
1 parent 16a1457 commit 0fd6953

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

stubs/Database/Table/Selection.stub

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,22 @@ namespace Nette\Database\Table;
88
*/
99
class Selection implements \Iterator, \ArrayAccess
1010
{
11-
11+
/**
12+
* @phpstan-param positive-int|0|null $limit
13+
* @phpstan-param positive-int|0|null $offset
14+
* @return static
15+
*/
16+
public function limit(?int $limit, int $offset = null)
17+
{
18+
}
19+
20+
/**
21+
* @phpstan-param positive-int|0 $page
22+
* @phpstan-param positive-int|0 $itemsPerPage
23+
* @param int $numOfPages [optional]
24+
* @return static
25+
*/
26+
public function page(int $page, int $itemsPerPage, &$numOfPages = null)
27+
{
28+
}
1229
}

0 commit comments

Comments
 (0)