@@ -18,6 +18,7 @@ |
||
18 | 18 | protected $unitBySnId; |
19 | 19 | |
20 | 20 | /** |
21 | + * @param integer $locationType |
|
21 | 22 | */ |
22 | 23 | public function load($locationType, $locationId) { |
23 | 24 |
@@ -21,15 +21,15 @@ |
||
21 | 21 | */ |
22 | 22 | public function load($locationType, $locationId) { |
23 | 23 | |
24 | - if(!($unitRows = DBStaticUnit::db_get_unit_list_by_location(0, $locationType, $locationId))) { |
|
24 | + if (!($unitRows = DBStaticUnit::db_get_unit_list_by_location(0, $locationType, $locationId))) { |
|
25 | 25 | return null; |
26 | 26 | } |
27 | 27 | |
28 | 28 | $model = \classSupernova::$gc->unitModel; |
29 | - foreach($unitRows as $dbId => $unitRow) { |
|
29 | + foreach ($unitRows as $dbId => $unitRow) { |
|
30 | 30 | $unit = $model->fromArray($unitRow); |
31 | 31 | $this->attach($unit); |
32 | - if($unit->snId) { |
|
32 | + if ($unit->snId) { |
|
33 | 33 | $this->unitBySnId[$unit->snId] = $unit; |
34 | 34 | } |
35 | 35 | } |
@@ -83,19 +83,19 @@ |
||
83 | 83 | public function importVector(V2FleetContainer $that, array &$row, $propertyName, $fieldName) { |
84 | 84 | $prefix = $propertyName == 'vectorDeparture' ? 'fleet_start_' : 'fleet_end_'; |
85 | 85 | $that->$propertyName = new Vector( |
86 | - $row[$prefix . 'galaxy'], |
|
87 | - $row[$prefix . 'system'], |
|
88 | - $row[$prefix . 'planet'], |
|
89 | - $row[$prefix . 'type'] |
|
86 | + $row[$prefix.'galaxy'], |
|
87 | + $row[$prefix.'system'], |
|
88 | + $row[$prefix.'planet'], |
|
89 | + $row[$prefix.'type'] |
|
90 | 90 | ); |
91 | 91 | } |
92 | 92 | |
93 | 93 | public function exportVector(V2FleetContainer $that, array &$row, $propertyName, $fieldName) { |
94 | 94 | $prefix = $propertyName == 'vectorDeparture' ? 'fleet_start_' : 'fleet_end_'; |
95 | - $row[$prefix . 'galaxy'] = $that->$propertyName->galaxy; |
|
96 | - $row[$prefix . 'system'] = $that->$propertyName->system; |
|
97 | - $row[$prefix . 'planet'] = $that->$propertyName->planet; |
|
98 | - $row[$prefix . 'type'] = $that->$propertyName->type; |
|
95 | + $row[$prefix.'galaxy'] = $that->$propertyName->galaxy; |
|
96 | + $row[$prefix.'system'] = $that->$propertyName->system; |
|
97 | + $row[$prefix.'planet'] = $that->$propertyName->planet; |
|
98 | + $row[$prefix.'type'] = $that->$propertyName->type; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | // Checking if index free. NULL index is always free |
43 | 43 | if (isset($this->index[$data])) { |
44 | - throw new \Exception('Duplicate index [' . $data . '] in ' . __CLASS__); |
|
44 | + throw new \Exception('Duplicate index ['.$data.'] in '.__CLASS__); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if ($data !== null) { |