ExistsDestNation 버그 수정
This commit is contained in:
@@ -1,27 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo\Constraint;
|
namespace sammo\Constraint;
|
||||||
|
|
||||||
class ExistsDestNation extends Constraint{
|
class ExistsDestNation extends Constraint{
|
||||||
const REQ_VALUES = Constraint::REQ_DEST_NATION;
|
const REQ_VALUES = 0;
|
||||||
|
|
||||||
public function checkInputValues(bool $throwExeception=true):bool{
|
public function checkInputValues(bool $throwExeception=true):bool{
|
||||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test():bool{
|
public function test():bool{
|
||||||
$this->checkInputValues();
|
$this->checkInputValues();
|
||||||
$this->tested = true;
|
$this->tested = true;
|
||||||
|
|
||||||
if($this->destNation['nation']){
|
if($this->destNation['nation']??0){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->reason = "멸망한 국가입니다.";
|
$this->reason = "멸망한 국가입니다.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user