Completed
Push — work-fleets ( 094cef...4ec5b3 )
by SuperNova.WS
06:12
created
includes/classes/V2Unit/V2UnitList.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -18,6 +18,7 @@
 block discarded – undo
18 18
   protected $unitBySnId;
19 19
 
20 20
   /**
21
+   * @param integer $locationType
21 22
    */
22 23
   public function load($locationType, $locationId) {
23 24
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
includes/classes/V2Fleet/V2FleetModel.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -83,19 +83,19 @@
 block discarded – undo
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
   /**
Please login to merge, or discard this patch.
includes/classes/Common/IndexedObjectStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.