Skip to content

Commit 70e7ec5

Browse files
fifalondrejmirtes
authored andcommitted
Added missing @template to Selection stub
1 parent 0a39c9c commit 70e7ec5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

stubs/Database/Table/Selection.stub

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@
33
namespace Nette\Database\Table;
44

55
/**
6-
* @phpstan-implements \Iterator<string, ActiveRow>
7-
* @phpstan-implements \ArrayAccess<string, \Nette\Database\IRow>
6+
* @template T of ActiveRow
7+
* @phpstan-implements \Iterator<string, T>
8+
* @phpstan-implements \ArrayAccess<string, T>
89
*/
910
class Selection implements \Iterator, \ArrayAccess
1011
{
1112
/**
1213
* @phpstan-param positive-int|0|null $limit
1314
* @phpstan-param positive-int|0|null $offset
14-
* @return static
15+
* @return static<T>
1516
*/
1617
public function limit(?int $limit, int $offset = null)
1718
{
1819
}
19-
20+
2021
/**
2122
* @phpstan-param positive-int|0 $page
2223
* @phpstan-param positive-int|0 $itemsPerPage
2324
* @param int $numOfPages [optional]
24-
* @return static
25+
* @return static<T>
2526
*/
2627
public function page(int $page, int $itemsPerPage, &$numOfPages = null)
2728
{
@@ -30,12 +31,12 @@ class Selection implements \Iterator, \ArrayAccess
3031
/**
3132
* @param string|array<string|int,mixed> $condition
3233
* @param mixed $params
33-
* @return static
34+
* @return static<T>
3435
*/
3536
public function where($condition, ...$params)
3637
{
3738
}
38-
39+
3940
/**
4041
* @param string $column
4142
* @return positive-int|0

0 commit comments

Comments
 (0)