Skip to content

Commit

Permalink
fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 14, 2024
1 parent ff99779 commit 9b82572
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Forms/Controls/ChoiceControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getValue(): mixed
/**
* Returns selected key (not checked).
*/
public function getRawValue(): string|int
public function getRawValue(): string|int|null
{
return $this->value;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static function sanitize(int $type, $value)
{
if ($type === Form::DataText) {
return is_scalar($value)
? Strings::normalizeNewLines($value)
? Strings::normalizeNewLines((string) $value)
: null;

} elseif ($type === Form::DataLine) {
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Rendering/DefaultFormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class DefaultFormRenderer implements Nette\Forms\FormRenderer
];

protected Nette\Forms\Form $form;
protected int $counter;
protected int $counter = 0;


/**
Expand Down

0 comments on commit 9b82572

Please sign in to comment.