From b1e6ae1f391ce0098a2c95f3a0f67aca5ef70e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mirtes?= Date: Wed, 25 Jan 2023 23:05:11 +0100 Subject: [PATCH] Revert "Stub for Nette\Forms\Container:: getControls() return" This reverts commit 230abfd4f6a8ffefa9b9a82b245b6a95e477260a. --- extension.neon | 1 - stubs/Database/Table/Selection.stub | 66 ++++++++++++++--------------- stubs/Forms/Container.stub | 8 ---- stubs/Forms/Control.stub | 8 ---- 4 files changed, 33 insertions(+), 50 deletions(-) delete mode 100644 stubs/Forms/Control.stub diff --git a/extension.neon b/extension.neon index 78a1291..8feea27 100644 --- a/extension.neon +++ b/extension.neon @@ -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 diff --git a/stubs/Database/Table/Selection.stub b/stubs/Database/Table/Selection.stub index 070f33e..e749061 100644 --- a/stubs/Database/Table/Selection.stub +++ b/stubs/Database/Table/Selection.stub @@ -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 $condition - * @param mixed $params - * @return static - */ - public function where($condition, ...$params) - { - } + /** + * @param string|array $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) + { + } } diff --git a/stubs/Forms/Container.stub b/stubs/Forms/Container.stub index d4b7a03..f925023 100644 --- a/stubs/Forms/Container.stub +++ b/stubs/Forms/Container.stub @@ -16,12 +16,4 @@ class Container implements \ArrayAccess /** @var array */ public $onValidate; - /** - * @phpstan-return \Iterator - */ - public function getControls(): \Iterator - { - // nothing - } - } diff --git a/stubs/Forms/Control.stub b/stubs/Forms/Control.stub deleted file mode 100644 index 8b5513b..0000000 --- a/stubs/Forms/Control.stub +++ /dev/null @@ -1,8 +0,0 @@ -