argTest를 로직 순서에 맞게 변경

This commit is contained in:
2018-10-21 14:28:29 +09:00
parent c71a92302a
commit 3cc437a17f
27 changed files with 289 additions and 304 deletions
+18 -18
View File
@@ -33,6 +33,24 @@ class che_군량매매 extends Command\GeneralCommand{
'item'=>'도구',
];
protected function argTest():bool{
$buyRice = $this->arg['buyRice']??null;
if(!is_bool($buyRice)){
return false;
}
$amount = $this->arg['amount']??null;
if(!is_int($amount)){
return false;
}
$amount = Util::valueFit($amount, 100, 10000);
$this->arg = [
'buyRice'=>$buyRice,
'amount'=>$amount
];
return true;
}
protected function init(){
$general = $this->generalObj;
@@ -54,24 +72,6 @@ class che_군량매매 extends Command\GeneralCommand{
}
}
protected function argTest():bool{
$buyRice = $this->arg['buyRice']??null;
if(!is_bool($buyRice)){
return false;
}
$amount = $this->arg['amount']??null;
if(!is_int($amount)){
return false;
}
$amount = Util::valueFit($amount, 100, 10000);
$this->arg = [
'buyRice'=>$buyRice,
'amount'=>$amount
];
return true;
}
public function getCost():array{
return [0, 0];
}