Skip to content

Commit

Permalink
Form::getHttpData: Clarify return type
Browse files Browse the repository at this point in the history
The method will always return an array when `htmlName` is not specified.
This will allow us to remove some PHPStan casts/checks in consuming projects.
  • Loading branch information
jtojnar committed May 14, 2024
1 parent 4419263 commit ba0b59b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ public function setSubmittedBy(?SubmitterControl $by): static

/**
* Returns submitted HTTP data.
* @return ($htmlName is null ? array<mixed> : string|array<mixed>|Nette\Http\FileUpload|null)
*/
public function getHttpData(?int $type = null, ?string $htmlName = null): string|array|Nette\Http\FileUpload|null
{
Expand Down

0 comments on commit ba0b59b

Please sign in to comment.