diff --git a/composer.json b/composer.json index 0c4d129..1ff99b5 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "nette/application": "~2.4|~3.0.0|~3.1.0", "nette/forms": "~2.4|~3.0.0|~3.1.0", "contributte/recaptcha": "^3.1", - "nette/di": "~2.4|~3.0.0", + "nette/di": "~2.4|^3.0.0", "nette/utils": "~2.4|~3.0.0|~3.1.0|~3.2.0", "pd/utils": "^1.0" }, diff --git a/src/RuleOptions.php b/src/RuleOptions.php index 2f79615..6e2cf19 100644 --- a/src/RuleOptions.php +++ b/src/RuleOptions.php @@ -25,7 +25,7 @@ final class RuleOptions implements \JsonSerializable self::STATUS_TIMEOUT => '_form_validation_timeout', ]; - private \Nette\Localization\ITranslator $translator; + private \Nette\Localization\Translator $translator; private bool $optional; @@ -45,7 +45,7 @@ final class RuleOptions implements \JsonSerializable public function __construct( - \Nette\Localization\ITranslator $translator, + \Nette\Localization\Translator $translator, bool $optional ) { $this->translator = $translator; diff --git a/src/RuleOptionsFactory.php b/src/RuleOptionsFactory.php index 6627698..33ceb9a 100644 --- a/src/RuleOptionsFactory.php +++ b/src/RuleOptionsFactory.php @@ -9,11 +9,11 @@ final class RuleOptionsFactory private const NETTE_RULE_ARGS = 'netteRuleArgs'; - private \Nette\Localization\ITranslator $translator; + private \Nette\Localization\Translator $translator; public function __construct( - \Nette\Localization\ITranslator $translator + \Nette\Localization\Translator $translator ) { $this->translator = $translator; } diff --git a/src/Rules.php b/src/Rules.php index a7bcb62..705b429 100644 --- a/src/Rules.php +++ b/src/Rules.php @@ -22,7 +22,7 @@ private function __construct() /** * @param \Nette\Forms\Controls\BaseControl $control */ - public static function ajax(\Nette\Forms\IControl $control, \Pd\Forms\RuleOptions $options): bool + public static function ajax(\Nette\Forms\Control $control, \Pd\Forms\RuleOptions $options): bool { if ($options->isOptional()) { return TRUE; @@ -54,13 +54,13 @@ public static function ajax(\Nette\Forms\IControl $control, \Pd\Forms\RuleOption /** * Rule is never validated on backend, used for proxying nette rules as optional only */ - public static function netteRuleProxy(\Nette\Forms\IControl $control, \Pd\Forms\RuleOptions $options): bool + public static function netteRuleProxy(\Nette\Forms\Control $control, \Pd\Forms\RuleOptions $options): bool { return TRUE; } - public static function phone(\Nette\Forms\IControl $control, ?\Pd\Forms\RuleOptions $options): bool + public static function phone(\Nette\Forms\Control $control, ?\Pd\Forms\RuleOptions $options): bool { if ($options !== NULL && $options->isOptional()) { return TRUE; @@ -70,7 +70,7 @@ public static function phone(\Nette\Forms\IControl $control, ?\Pd\Forms\RuleOpti } - public static function containsNumber(\Nette\Forms\IControl $control, ?\Pd\Forms\RuleOptions $options): bool + public static function containsNumber(\Nette\Forms\Control $control, ?\Pd\Forms\RuleOptions $options): bool { if ($options !== NULL && $options->isOptional()) { return TRUE; @@ -80,7 +80,7 @@ public static function containsNumber(\Nette\Forms\IControl $control, ?\Pd\Forms } - public static function noExternalSources(\Nette\Forms\IControl $control, ?\Pd\Forms\RuleOptions $options): bool + public static function noExternalSources(\Nette\Forms\Control $control, ?\Pd\Forms\RuleOptions $options): bool { if ($options !== NULL && ($options->isOptional() || ! $control->getValue())) { return TRUE; @@ -90,7 +90,7 @@ public static function noExternalSources(\Nette\Forms\IControl $control, ?\Pd\Fo } - public static function czechCompanyIdentifier(\Nette\Forms\IControl $control, ?\Pd\Forms\RuleOptions $options): bool + public static function czechCompanyIdentifier(\Nette\Forms\Control $control, ?\Pd\Forms\RuleOptions $options): bool { if ($options !== NULL && $options->isOptional()) { return TRUE;