Skip to content

Commit

Permalink
Revert "Stub for Nette\Forms\Container:: getControls() return"
Browse files Browse the repository at this point in the history
This reverts commit 230abfd.
  • Loading branch information
ondrejmirtes committed Jan 25, 2023
1 parent 230abfd commit b1e6ae1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 50 deletions.
1 change: 0 additions & 1 deletion extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ parameters:
- stubs/Database/Table/ActiveRow.stub
- stubs/Database/Table/Selection.stub
- stubs/Forms/Container.stub
- stubs/Forms/Control.stub
- stubs/Forms/Form.stub
- stubs/Forms/Rules.stub
- stubs/Http/SessionSection.stub
Expand Down
66 changes: 33 additions & 33 deletions stubs/Database/Table/Selection.stub
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ namespace Nette\Database\Table;
*/
class Selection implements \Iterator, \ArrayAccess
{
/**
* @phpstan-param positive-int|0|null $limit
* @phpstan-param positive-int|0|null $offset
* @return static
*/
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
*/
public function page(int $page, int $itemsPerPage, &$numOfPages = null)
{
}
/**
* @phpstan-param positive-int|0|null $limit
* @phpstan-param positive-int|0|null $offset
* @return static
*/
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
*/
public function page(int $page, int $itemsPerPage, &$numOfPages = null)
{
}

/**
* @param string|array<string|int,mixed> $condition
* @param mixed $params
* @return static
*/
public function where($condition, ...$params)
{
}
/**
* @param string|array<string|int,mixed> $condition
* @param mixed $params
* @return static
*/
public function where($condition, ...$params)
{
}

/**
* @param string $column
* @return positive-int|0
*/
public function count($column = null)
{
}
/**
* @param string $column
* @return positive-int|0
*/
public function count($column = null)
{
}
}
8 changes: 0 additions & 8 deletions stubs/Forms/Container.stub
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,4 @@ class Container implements \ArrayAccess
/** @var array<callable(static, mixed): void> */
public $onValidate;

/**
* @phpstan-return \Iterator<int|string, \Nette\Forms\Control>
*/
public function getControls(): \Iterator
{
// nothing
}

}
8 changes: 0 additions & 8 deletions stubs/Forms/Control.stub

This file was deleted.

0 comments on commit b1e6ae1

Please sign in to comment.