Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"nette/di": "^3.1.0",
"latte/latte": "^3.0.0",
"contributte/qa": "^0.3",
"contributte/phpstan": "^0.1",
"contributte/phpstan": "^0.2",
"webchemistry/testing-helpers": "^4.0.0"
},
"conflict": {
Expand Down
8 changes: 8 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ parameters:
paths:
- src
- .docs

ignoreErrors:
# https://github.com/phpstan/phpstan-nette/issues/141
-
message: '#^Parameter \#1 \$array of function array_filter expects array, Iterator\<int\|string, Nette\\ComponentModel\\IComponent\> given\.$#'
identifier: argument.type
count: 3
path: src/Multiplier.php
5 changes: 4 additions & 1 deletion src/Multiplier.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public static function register(string $name = 'addMultiplier'): void
});
}

/**
* @return ($throw is true ? Form : ?Form)
*/
public function getForm(bool $throw = true): ?Form
{
if ($this->form) {
Expand Down Expand Up @@ -378,7 +381,7 @@ protected function isValidMaxCopies(): bool

protected function isFormSubmitted(): bool
{
return $this->getForm() !== null && $this->getForm()->isAnchored() && $this->getForm()->isSubmitted();
return $this->getForm(false) !== null && $this->getForm()->isAnchored() && $this->getForm()->isSubmitted();
}

protected function loadHttpData(): void
Expand Down
Loading