@@ -24,7 +24,7 @@ trait Base
2424 /** @var ?\Closure(mixed): mixed */
2525 private ?\Closure $ before = null ;
2626
27- /** @var array <\Closure(mixed, Context): mixed> */
27+ /** @var list <\Closure(mixed, Context): mixed> */
2828 private array $ transforms = [];
2929 private ?string $ deprecated = null ;
3030
@@ -43,6 +43,7 @@ public function required(bool $state = true): self
4343 }
4444
4545
46+ /** @param callable(mixed): mixed $handler */
4647 public function before (callable $ handler ): self
4748 {
4849 $ this ->before = $ handler (...);
@@ -56,13 +57,15 @@ public function castTo(string $type): self
5657 }
5758
5859
60+ /** @param callable(mixed, Context): mixed $handler */
5961 public function transform (callable $ handler ): self
6062 {
6163 $ this ->transforms [] = $ handler (...);
6264 return $ this ;
6365 }
6466
6567
68+ /** @param callable(mixed): bool $handler */
6669 public function assert (callable $ handler , ?string $ description = null ): self
6770 {
6871 $ expected = $ description ?: (is_string ($ handler ) ? "$ handler() " : '# ' . count ($ this ->transforms ));
@@ -144,7 +147,10 @@ private function doValidate(mixed $value, string $expected, Context $context): b
144147 }
145148
146149
147- /** @deprecated use Nette\Schema\Validators::validateRange() */
150+ /**
151+ * @deprecated use Nette\Schema\Validators::validateRange()
152+ * @param array{?float, ?float} $range
153+ */
148154 private static function doValidateRange (mixed $ value , array $ range , Context $ context , string $ types = '' ): bool
149155 {
150156 $ isOk = $ context ->createChecker ();
0 commit comments