general)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException("require penalty in general"); } if(!($this->arg instanceof PenaltyKey)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException("require penalty key"); } return true; } public function test():bool{ $this->checkInputValues(); $this->tested = true; /** @var PenaltyKey */ $checkKey = $this->arg; $penaltyList = JSON::decode($this->general['penalty']); if(!key_exists($checkKey->value, $penaltyList)){ return true; } $this->reason = "징계 사유: {$penaltyList[$checkKey->value]}"; return false; } }