Skip to content

Commit

Permalink
QA: improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Feb 25, 2024
1 parent fe80d25 commit 52efe9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Bridge/Nette/Form/ImageUploadControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Nette\Forms\Controls\UploadControl;
use Nette\Http\FileUpload;
use Nette\Utils\Html;
use Stringable;

final class ImageUploadControl extends UploadControl
{
Expand All @@ -31,7 +32,7 @@ final class ImageUploadControl extends UploadControl

private ?FileUpload $uploadValue = null;

public function __construct(string|object|null $label = null)
public function __construct(string|Stringable|null $label = null)
{
$this->entity = new UploadControlEntity();
$this->containerPart = Html::el('div', ['class' => 'image-upload-container']);
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Nette/Form/Remove/ImageRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function getHttpData(ImageUploadControl $input): bool
$form = $input->getForm();
assert($form !== null);

return (bool) $form->getHttpData(Form::DATA_TEXT, $input->getName() . '_remove');
return (bool) $form->getHttpData(Form::DataText, $input->getName() . '_remove');
}

public function getHtml(ImageUploadControl $input): ?Html
Expand Down

0 comments on commit 52efe9d

Please sign in to comment.