From ba0b59b15da0794c01d16423af92981d1235cc79 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 14 May 2024 01:54:37 +0200 Subject: [PATCH] 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. --- src/Forms/Form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Forms/Form.php b/src/Forms/Form.php index db0ea94f..3a55c34e 100644 --- a/src/Forms/Form.php +++ b/src/Forms/Form.php @@ -457,6 +457,7 @@ public function setSubmittedBy(?SubmitterControl $by): static /** * Returns submitted HTTP data. + * @return ($htmlName is null ? array : string|array|Nette\Http\FileUpload|null) */ public function getHttpData(?int $type = null, ?string $htmlName = null): string|array|Nette\Http\FileUpload|null {