Skip to content

Commit ba0b59b

Browse files
committed
Form::getHttpData: Clarify return type
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.
1 parent 4419263 commit ba0b59b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Forms/Form.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ public function setSubmittedBy(?SubmitterControl $by): static
457457

458458
/**
459459
* Returns submitted HTTP data.
460+
* @return ($htmlName is null ? array<mixed> : string|array<mixed>|Nette\Http\FileUpload|null)
460461
*/
461462
public function getHttpData(?int $type = null, ?string $htmlName = null): string|array|Nette\Http\FileUpload|null
462463
{

0 commit comments

Comments
 (0)