정적 분석기 결과 반영. 주로 배열 초기화. 변수 이름 실수 수정.

This commit is contained in:
2018-04-06 20:06:28 +09:00
parent 2bce82c73e
commit ffc0fc0c6f
20 changed files with 109 additions and 94 deletions
+5 -4
View File
@@ -1,7 +1,6 @@
<?php
namespace sammo\Scenario;
use \sammo\DB;
use \sammo\Util;
class Nation{
private $id;
@@ -14,7 +13,7 @@ class Nation{
private $type;
private $nationLevel;
private $capital;
private $capital = null;
private $cities = [];
@@ -42,8 +41,10 @@ class Nation{
$this->type = $type;
$this->nationLevel = $nationLevel;
$this->cities = $cities;
$this->capital = count($cities)>0?$cities[0]:null;
if(count($cities)){
$this->capital = $this->cities[0];
}
}
public function setID(int $id){