Skip to content

Commit

Permalink
Add missing typehints to closure
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Feb 2, 2024
1 parent 49b6178 commit 4ace34d
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -6,6 +6,7 @@
use Nepada\EmailAddressInput\EmailAddressInput;
use Nette;
use Nette\Forms\Container;
use Nette\Utils\Html;

class ExtensionMethodRegistrator
{
Expand All @@ -16,9 +17,9 @@ public static function register(): void
{
Container::extensionMethod(
'addEmailAddress',
function (Container $container, $name, $label = null, bool $caseSensitive = false): EmailAddressInput {
function (Container $container, string|int $name, string|Html|null $label = null, bool $caseSensitive = false): EmailAddressInput {
$control = new EmailAddressInput($label, null, $caseSensitive);
$container[$name] = $control;
$container[(string) $name] = $control;
return $control;
},
);
Expand Down

0 comments on commit 4ace34d

Please sign in to comment.