Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions stubs/Database/Table/Selection.stub
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@
namespace Nette\Database\Table;

/**
* @phpstan-implements \Iterator<string, ActiveRow>
* @phpstan-implements \ArrayAccess<string, \Nette\Database\IRow>
* @template T of ActiveRow
* @phpstan-implements \Iterator<string, T>
* @phpstan-implements \ArrayAccess<string, T>
*/
class Selection implements \Iterator, \ArrayAccess
{
/**
* @phpstan-param positive-int|0|null $limit
* @phpstan-param positive-int|0|null $offset
* @return static
* @return static<T>
*/
public function limit(?int $limit, int $offset = null)
{
}

/**
* @phpstan-param positive-int|0 $page
* @phpstan-param positive-int|0 $itemsPerPage
* @param int $numOfPages [optional]
* @return static
* @return static<T>
*/
public function page(int $page, int $itemsPerPage, &$numOfPages = null)
{
Expand All @@ -30,12 +31,12 @@ class Selection implements \Iterator, \ArrayAccess
/**
* @param string|array<string|int,mixed> $condition
* @param mixed $params
* @return static
* @return static<T>
*/
public function where($condition, ...$params)
{
}

/**
* @param string $column
* @return positive-int|0
Expand Down