ExistsDestNation 버그 수정

This commit is contained in:
2020-06-12 20:39:31 +09:00
parent ec30c46d7e
commit 772d37131d
+26 -26
View File
@@ -1,27 +1,27 @@
<?php
namespace sammo\Constraint;
class ExistsDestNation extends Constraint{
const REQ_VALUES = Constraint::REQ_DEST_NATION;
public function checkInputValues(bool $throwExeception=true):bool{
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
return false;
}
return true;
}
public function test():bool{
$this->checkInputValues();
$this->tested = true;
if($this->destNation['nation']){
return true;
}
$this->reason = "멸망한 국가입니다.";
return false;
}
<?php
namespace sammo\Constraint;
class ExistsDestNation extends Constraint{
const REQ_VALUES = 0;
public function checkInputValues(bool $throwExeception=true):bool{
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
return false;
}
return true;
}
public function test():bool{
$this->checkInputValues();
$this->tested = true;
if($this->destNation['nation']??0){
return true;
}
$this->reason = "멸망한 국가입니다.";
return false;
}
}