커맨드 유효성을 2개에서 3개구성으로 변경
This commit is contained in:
@@ -35,7 +35,7 @@ class che_훈련 extends Command\GeneralCommand{
|
||||
$this->setCity();
|
||||
$this->setNation();
|
||||
|
||||
$this->runnableConstraints=[
|
||||
$this->fullConditionConstraints=[
|
||||
ConstraintHelper::NotBeNeutral(),
|
||||
ConstraintHelper::NotWanderingNation(),
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
@@ -73,7 +73,7 @@ class che_훈련 extends Command\GeneralCommand{
|
||||
}
|
||||
|
||||
public function run():bool{
|
||||
if(!$this->isRunnable()){
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user