From 9bef930238e37d53e9ac5c459412fef6f0d7e27a Mon Sep 17 00:00:00 2001 From: romalytvynenko Date: Wed, 6 Nov 2024 13:13:17 +0200 Subject: [PATCH] added size (#618) --- .../OperationExtensions/RulesExtractor/RulesMapper.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php b/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php index ac799793..acbaa386 100644 --- a/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php +++ b/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php @@ -139,6 +139,13 @@ public function max(Type $type, $params) return $type; } + public function size(Type $type, $params) + { + $type = $this->min($type, $params); + + return $this->max($type, $params); + } + public function in(Type $type, $params) { return $type->enum(