diff --git a/composer.json b/composer.json index 526de4a..36a0e4a 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,8 @@ "webchemistry/testing-helpers": "~2.0.0" }, "conflict": { - "latte/latte": "<3.0.0" + "latte/latte": "<3.0.0", + "nette/component-model": "<3.1.0" }, "autoload": { "psr-4": { diff --git a/src/Multiplier.php b/src/Multiplier.php index 20d3c38..c95d6cc 100644 --- a/src/Multiplier.php +++ b/src/Multiplier.php @@ -307,13 +307,13 @@ public function getControls(): Iterator } /** - * @return Iterator + * @return array */ - public function getContainers(): Iterator + public function getContainers(): iterable { $this->createCopies(); - /** @var Iterator $containers */ + /** @var array $containers */ $containers = $this->getComponents(false, Container::class); return $containers; @@ -393,7 +393,7 @@ protected function loadHttpData(): void protected function createNumber(): int { - $count = iterator_count($this->getComponents(false, Form::class)); + $count = count($this->getComponents(false, Form::class)); while ($this->getComponent((string) $count, false)) { $count++; } @@ -428,7 +428,7 @@ protected function createContainer(): Container */ protected function getFirstSubmit(): ?string { - $submits = iterator_to_array($this->getComponents(false, SubmitButton::class)); + $submits = $this->getComponents(false, SubmitButton::class); if ($submits) { return reset($submits)->getName(); }