From 6667d856234187b63d83dc420637bb0a0d414a98 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 24 Apr 2020 01:32:58 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Constraint/ReqGeneralValue.php | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/hwe/sammo/Constraint/ReqGeneralValue.php b/hwe/sammo/Constraint/ReqGeneralValue.php index c74119eb..8ed7453e 100644 --- a/hwe/sammo/Constraint/ReqGeneralValue.php +++ b/hwe/sammo/Constraint/ReqGeneralValue.php @@ -45,23 +45,6 @@ class ReqGeneralValue extends Constraint{ throw new \InvalidArgumentException("require {$this->key} in general"); } - if(is_numeric($this->reqVal)){ - $this->isPercent = false; - } - else if(is_string($this->reqVal)){ - $this->reqVal = Util::convPercentStrToFloat($this->reqVal); - if($this->reqVal === null){ - if(!$throwExeception){return false; } - throw new \InvalidArgumentException("require valid reqVal(percentStr|numeric) format"); - } - - if(!key_exists($this->maxKey, $this->general)){ - if(!$throwExeception){return false; } - throw new \InvalidArgumentException("require {$this->maxKey} in general"); - } - $this->isPercent = true; - } - if($this->errMsg!==null && !is_string($this->errMsg)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException("{$this->errMsg} must be string or null"); @@ -75,12 +58,7 @@ class ReqGeneralValue extends Constraint{ $this->tested = true; $keyNick = $this->keyNick; - if ($this->isPercent) { - $reqVal = $this->general[$this->maxKey] * $this->reqVal; - } - else{ - $reqVal = $this->reqVal; - } + $reqVal = $this->reqVal; $compList = [ '<'=>function($target, $src){