Completed
Branch work-fleets (1ceb9c)
by SuperNova.WS
04:37
created
includes/classes/Bonus.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
    * @param $unit_level
29 29
    */
30 30
   public function add_unit_by_snid($unit_id, $unit_level) {
31
-    if(!$unit_level) {
31
+    if (!$unit_level) {
32 32
       return;
33 33
     }
34 34
 
35
-    foreach(static::$_bonus_group as $param_name => $unit_list) {
36
-      if(!empty($unit_list[$unit_id])) {
35
+    foreach (static::$_bonus_group as $param_name => $unit_list) {
36
+      if (!empty($unit_list[$unit_id])) {
37 37
         // Простейший вариант - мультипликатор по базе
38 38
         // Общий мультипликатор добавляется в конец
39 39
         $this->grants[$param_name][$unit_id] = $unit_level;
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
 //    $this->grants[$param_name][$unit_id] = $unit_level * get_unit_param($unit_id, P_BONUS_VALUE) / 100;;
83 83
     $value_add = floatval($base_value);
84 84
     $cumulative = 1.0; // Для случая BONUS_PERCENT
85
-    if(!empty($this->grants[$param]) && is_array($this->grants[$param])) {
86
-      foreach($this->grants[$param] as $unit_id => $unit_level) {
85
+    if (!empty($this->grants[$param]) && is_array($this->grants[$param])) {
86
+      foreach ($this->grants[$param] as $unit_id => $unit_level) {
87 87
         $unit_bonus = 0;
88
-        if($unit_id < 0) {
88
+        if ($unit_id < 0) {
89 89
           // Meta-unit - leave as is
90 90
         } else {
91 91
           // TODO - Подумать, что будет при смешивании разных бонусов и как этого избежать
92 92
           $bonus_value = get_unit_param($unit_id, P_BONUS_VALUE);
93 93
           $bonus_type = get_unit_param($unit_id, P_BONUS_TYPE);
94
-          switch($bonus_type) {
94
+          switch ($bonus_type) {
95 95
             case BONUS_PERCENT:
96 96
               $unit_bonus = $unit_level * $bonus_value / 100;
97 97
               $cumulative += $unit_bonus;
Please login to merge, or discard this patch.
includes/classes/FleetList.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
       (!empty($where_safe) ? " WHERE {$where_safe}" : '') .
38 38
       " FOR UPDATE;"
39 39
     );
40
-    while($row = db_fetch($query)) {
40
+    while ($row = db_fetch($query)) {
41 41
       /**
42 42
        * @var Fleet $fleet
43 43
        */
44 44
       $fleet = $this->_createElement();
45 45
       $fleet->dbRowParse($row);
46 46
 
47
-      if(isset($this[$fleet->dbId])) {
47
+      if (isset($this[$fleet->dbId])) {
48 48
         // Нужно ли ????
49 49
         classSupernova::$debug->error('Fleet list already set');
50 50
       }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
    * @return static
171 171
    */
172 172
   public static function dbGetFleetListAndMissileByCoordinates($coordinates, $for_phalanx = false) {
173
-    if(empty($coordinates) || !is_array($coordinates)) {
173
+    if (empty($coordinates) || !is_array($coordinates)) {
174 174
       return array();
175 175
     }
176 176
 
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
      * @var Fleet[] $array_of_Fleet
200 200
      */
201 201
     $array_of_Fleet = array();
202
-    if(!empty($fleet_db_list) && $fleet_db_list->count()) {
203
-      foreach($fleet_db_list->_container as $fleet_id => $objFleet) {
202
+    if (!empty($fleet_db_list) && $fleet_db_list->count()) {
203
+      foreach ($fleet_db_list->_container as $fleet_id => $objFleet) {
204 204
         $array_of_Fleet[$fleet_id] = $objFleet;
205 205
       }
206 206
       $planet_fleets = flt_get_fleets_to_planet_by_array_of_Fleet($array_of_Fleet);
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
       "SELECT * FROM `{{iraks}}`" .
250 250
       (!empty($where) ? " WHERE {$where}" : '') .
251 251
       " FOR UPDATE;");
252
-    while($missile_db_row = db_fetch($query)) {
252
+    while ($missile_db_row = db_fetch($query)) {
253 253
       /**
254 254
        * @var Fleet $objFleet
255 255
        */
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
    */
272 272
   public static function dbGetFleetListAndMissileINCOMING($owner_id) {
273 273
     $owner_id_safe = idval($owner_id);
274
-    if(empty($owner_id_safe)) {
274
+    if (empty($owner_id_safe)) {
275 275
       return array();
276 276
     }
277 277
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
    */
306 306
   public static function fleet_count_flying($player_id, $mission_id = 0) {
307 307
     $player_id_safe = idval($player_id);
308
-    if(!empty($player_id_safe)) {
308
+    if (!empty($player_id_safe)) {
309 309
       $mission_id_safe = intval($mission_id);
310 310
       $result = static::db_fleet_count(
311 311
         "`fleet_owner` = {$player_id_safe}" .
Please login to merge, or discard this patch.
includes/classes/UnitResourceLoot.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
   public static function _init($group_name = '') {
27 27
     parent::_init($group_name);
28 28
 
29
-    foreach(static::$_group_unit_id_list as $resource_id) {
29
+    foreach (static::$_group_unit_id_list as $resource_id) {
30 30
       static::$_group_pnames[$resource_id] = pname_resource_name($resource_id);
31 31
     }
32 32
 
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 
49 49
     !is_array($resource_array) ? $resource_array = array() : false;
50 50
 
51
-    foreach($resource_array as $resource_id => $resource_actual_delta) {
52
-      if(!$resource_actual_delta) {
51
+    foreach ($resource_array as $resource_id => $resource_actual_delta) {
52
+      if (!$resource_actual_delta) {
53 53
         // No delta - no changes
54 54
         continue;
55 55
       }
Please login to merge, or discard this patch.
includes/classes/Player.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -229,8 +229,8 @@
 block discarded – undo
229 229
   public function calcColonyMaxCount($astrotech = -1) {
230 230
     global $config;
231 231
 
232
-    if($astrotech == -1) {
233
-      if(!isset($this->db_row[UNIT_PLAYER_COLONIES_MAX])) {
232
+    if ($astrotech == -1) {
233
+      if (!isset($this->db_row[UNIT_PLAYER_COLONIES_MAX])) {
234 234
 
235 235
         $expeditions = get_player_max_expeditons($this->db_row);
236 236
         $astrotech = mrc_get_level($this->db_row, false, TECH_ASTROTECH);
Please login to merge, or discard this patch.
includes/classes/PlayerList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
    * @version 41a6.16
24 24
    */
25 25
   protected function db_load_player_by_id($player_id) {
26
-    if(isset($this[$player_id])) {
26
+    if (isset($this[$player_id])) {
27 27
       return;
28 28
     }
29 29
 
Please login to merge, or discard this patch.
includes/classes/Unit.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -154,15 +154,15 @@  discard block
 block discarded – undo
154 154
    * @param string $group_name
155 155
    */
156 156
   public static function _init($group_name = '') {
157
-    if(static::$_is_static_init) {
157
+    if (static::$_is_static_init) {
158 158
       return;
159 159
     }
160 160
 
161
-    if($group_name) {
161
+    if ($group_name) {
162 162
       static::$_sn_group_name = $group_name;
163 163
     }
164 164
 
165
-    if(static::$_sn_group_name) {
165
+    if (static::$_sn_group_name) {
166 166
       static::$_group_unit_id_list = sn_get_groups(static::$_sn_group_name);
167 167
       empty(static::$_group_unit_id_list) ? static::$_group_unit_id_list = array() : false;
168 168
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     // TODO - Reset combat stats??
188 188
     $this->_unitId = $unitId;
189 189
 
190
-    if($this->_unitId) {
190
+    if ($this->_unitId) {
191 191
       $this->info = get_unit_param($this->_unitId);
192 192
       $this->_type = $this->info[P_UNIT_TYPE];
193 193
     } else {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
   protected function setCount($value) {
200 200
     // TODO - Reset combat stats??
201
-    if($value < 0) {
201
+    if ($value < 0) {
202 202
       classSupernova::$debug->error('Can not set Unit::$count to negative value');
203 203
     }
204 204
     $this->_count = $value;
Please login to merge, or discard this patch.
includes/classes/DBRow.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 
132 132
     // If method is not getter or setter OR property name not exists in $_properties - raising exception
133 133
     // Descendants can catch this Exception to make own __call magic
134
-    if(($left3 != 'get' && $left3 != 'set') || empty(static::$_properties[$propertyName])) {
134
+    if (($left3 != 'get' && $left3 != 'set') || empty(static::$_properties[$propertyName])) {
135 135
       throw new ExceptionPropertyNotExists('Property ' . $propertyName . ' not exists when calling getter/setter ' . get_called_class() . '::' . $name, ERR_ERROR);
136 136
     }
137 137
 
138 138
     // TODO check for read-only
139 139
 
140
-    if($left3 == 'set') {
141
-      if(!empty($this->propertiesAdjusted[$propertyName])) {
140
+    if ($left3 == 'set') {
141
+      if (!empty($this->propertiesAdjusted[$propertyName])) {
142 142
         throw new PropertyAccessException('Property ' . $propertyName . ' already was adjusted so no SET is possible until dbSave in ' . get_called_class() . '::' . $name, ERR_ERROR);
143 143
       }
144 144
       $this->propertiesChanged[$propertyName] = 1;
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
     // Now deciding - will we call a protected setter or will we work with protected property
148 148
 
149 149
     // If method exists - just calling it
150
-    if(method_exists($this, $name)) {
150
+    if (method_exists($this, $name)) {
151 151
       return call_user_func_array(array($this, $name), $arguments);
152 152
     }
153 153
     // No getter/setter exists - works directly with protected property
154 154
 
155 155
     // Is it getter?
156
-    if($left3 === 'get') {
156
+    if ($left3 === 'get') {
157 157
       return $this->{'_' . $propertyName};
158 158
     }
159 159
 
@@ -174,14 +174,14 @@  discard block
 block discarded – undo
174 174
 //    $this->_reset();
175 175
 
176 176
     $dbId = idval($dbId);
177
-    if($dbId <= 0) {
177
+    if ($dbId <= 0) {
178 178
       classSupernova::$debug->error(get_called_class() . '::dbLoad $dbId not positive = ' . $dbId);
179 179
 
180 180
       return;
181 181
     }
182 182
 
183 183
     $db_row = doquery("SELECT * FROM `{{" . static::$_table . "}}` WHERE `" . static::$_dbIdFieldName . "` = " . $dbId . " LIMIT 1 FOR UPDATE;", true);
184
-    if(empty($db_row)) {
184
+    if (empty($db_row)) {
185 185
       return;
186 186
     }
187 187
 
@@ -197,26 +197,26 @@  discard block
 block discarded – undo
197 197
    */
198 198
   // TODO - perform operations only if properties was changed
199 199
   public function dbSave() {
200
-    if($this->isNew()) {
200
+    if ($this->isNew()) {
201 201
       // No DB_ID - new unit
202
-      if($this->isEmpty()) {
202
+      if ($this->isEmpty()) {
203 203
         classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - object is empty on ' . get_called_class() . '::dbSave');
204 204
       }
205 205
       $this->dbInsert();
206 206
     } else {
207 207
       // DB_ID is present
208
-      if($this->isEmpty()) {
208
+      if ($this->isEmpty()) {
209 209
         $this->dbDelete();
210 210
       } else {
211
-        if(!sn_db_transaction_check(false)) {
211
+        if (!sn_db_transaction_check(false)) {
212 212
           classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - transaction should always be started on ' . get_called_class() . '::dbUpdate');
213 213
         }
214 214
         $this->dbUpdate();
215 215
       }
216 216
     }
217 217
 
218
-    if(!empty($this->triggerDbOperationOn)) {
219
-      foreach($this->triggerDbOperationOn as $item) {
218
+    if (!empty($this->triggerDbOperationOn)) {
219
+      foreach ($this->triggerDbOperationOn as $item) {
220 220
         $item->dbSave();
221 221
       }
222 222
     }
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
    * @return int|string
236 236
    */
237 237
   public function dbInsert() {
238
-    if(!$this->isNew()) {
238
+    if (!$this->isNew()) {
239 239
       classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - record db_id is not empty on ' . get_called_class() . '::dbInsert');
240 240
     }
241 241
     $this->_dbId = $this->db_field_set_create($this->dbMakeFieldSet());
242 242
 
243
-    if(empty($this->_dbId)) {
243
+    if (empty($this->_dbId)) {
244 244
       classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - error saving record ' . get_called_class() . '::dbInsert');
245 245
     }
246 246
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
    */
253 253
   public function dbUpdate() {
254 254
     // TODO - Update
255
-    if($this->isNew()) {
255
+    if ($this->isNew()) {
256 256
       classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - unit db_id is empty on dbUpdate');
257 257
     }
258 258
     $this->db_field_update($this->dbMakeFieldSet(true));
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
    * Deletes record from DB
263 263
    */
264 264
   public function dbDelete() {
265
-    if($this->isNew()) {
265
+    if ($this->isNew()) {
266 266
       classSupernova::$debug->error(__FILE__ . ':' . __LINE__ . ' - unit db_id is empty on dbDelete');
267 267
     }
268 268
     doquery("DELETE FROM {{" . static::$_table . "}} WHERE `" . static::$_dbIdFieldName . "` = " . $this->_dbId);
@@ -304,18 +304,18 @@  discard block
 block discarded – undo
304 304
    * @param array $db_row
305 305
    */
306 306
   public function dbRowParse(array $db_row) {
307
-    foreach(static::$_properties as $property_name => &$property_data) {
307
+    foreach (static::$_properties as $property_name => &$property_data) {
308 308
       // Advanced values extraction procedure. Should be used when at least one of following rules is matched:
309 309
       // - one field should translate to several properties;
310 310
       // - one property should be filled according to several fields;
311 311
       // - property filling requires some lookup in object values;
312
-      if(!empty($property_data[P_METHOD_EXTRACT]) && is_callable(array($this, $property_data[P_METHOD_EXTRACT]))) {
312
+      if (!empty($property_data[P_METHOD_EXTRACT]) && is_callable(array($this, $property_data[P_METHOD_EXTRACT]))) {
313 313
         call_user_func_array(array($this, $property_data[P_METHOD_EXTRACT]), array(&$db_row));
314 314
         continue;
315 315
       }
316 316
 
317 317
       // If property is read-only - doing nothing
318
-      if(!empty($property_data[P_READ_ONLY])) {
318
+      if (!empty($property_data[P_READ_ONLY])) {
319 319
         continue;
320 320
       }
321 321
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
       !empty($property_data[P_FUNC_INPUT]) && is_callable($property_data[P_FUNC_INPUT]) ? $value = call_user_func($property_data[P_FUNC_INPUT], $value) : false;
327 327
 
328 328
       // If there is setter for this field - using it. Setters is always a methods of $THIS
329
-      if(!empty($property_data[P_METHOD_SET]) && is_callable(array($this, $property_data[P_METHOD_SET]))) {
329
+      if (!empty($property_data[P_METHOD_SET]) && is_callable(array($this, $property_data[P_METHOD_SET]))) {
330 330
         call_user_func(array($this, $property_data[P_METHOD_SET]), $value);
331 331
       } else {
332 332
         $this->{$property_name} = $value;
@@ -342,21 +342,21 @@  discard block
 block discarded – undo
342 342
   protected function dbMakeFieldSet($isUpdate = false) {
343 343
     $array = array();
344 344
 
345
-    foreach(static::$_properties as $property_name => &$property_data) {
345
+    foreach (static::$_properties as $property_name => &$property_data) {
346 346
       // TODO - on isUpdate add only changed/adjusted properties
347 347
 
348
-      if(!empty($property_data[P_METHOD_INJECT]) && is_callable(array($this, $property_data[P_METHOD_INJECT]))) {
348
+      if (!empty($property_data[P_METHOD_INJECT]) && is_callable(array($this, $property_data[P_METHOD_INJECT]))) {
349 349
         call_user_func_array(array($this, $property_data[P_METHOD_INJECT]), array(&$array));
350 350
         continue;
351 351
       }
352 352
 
353 353
       // Skipping properties which have no corresponding field in DB
354
-      if(empty($property_data[P_DB_FIELD])) {
354
+      if (empty($property_data[P_DB_FIELD])) {
355 355
         continue;
356 356
       }
357 357
 
358 358
       // Checking - is property was adjusted or changed
359
-      if($isUpdate && array_key_exists($property_name, $this->propertiesAdjusted)) {
359
+      if ($isUpdate && array_key_exists($property_name, $this->propertiesAdjusted)) {
360 360
         // For adjusted property - take value from propertiesAdjusted array
361 361
         // TODO - differ how treated conversion to string for changed and adjusted properties
362 362
         $value = $this->propertiesAdjusted[$property_name];
@@ -386,17 +386,17 @@  discard block
 block discarded – undo
386 386
    */
387 387
   protected function isFieldChanged($fieldName) {
388 388
     $isFieldChanged = false;
389
-    foreach($this->propertiesChanged as $propertyName => $cork) {
389
+    foreach ($this->propertiesChanged as $propertyName => $cork) {
390 390
       $propertyScheme = static::$_properties[$propertyName];
391
-      if(!empty($propertyScheme[P_DB_FIELDS_LINKED])) {
392
-        foreach($propertyScheme[P_DB_FIELDS_LINKED] as $linkedFieldName) {
393
-          if($linkedFieldName == $fieldName) {
391
+      if (!empty($propertyScheme[P_DB_FIELDS_LINKED])) {
392
+        foreach ($propertyScheme[P_DB_FIELDS_LINKED] as $linkedFieldName) {
393
+          if ($linkedFieldName == $fieldName) {
394 394
             $isFieldChanged = $propertyName;
395 395
             break 2;
396 396
           }
397 397
         }
398 398
       }
399
-      if(!empty($propertyScheme[P_DB_FIELD]) && $propertyScheme[P_DB_FIELD] == $fieldName) {
399
+      if (!empty($propertyScheme[P_DB_FIELD]) && $propertyScheme[P_DB_FIELD] == $fieldName) {
400 400
         $isFieldChanged = $propertyName;
401 401
         break;
402 402
       }
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
     $fields = implode(',', array_keys($field_set));
419 419
 
420 420
     $result = 0;
421
-    if(classSupernova::db_query("INSERT INTO `{{" . static::$_table . "}}` ({$fields}) VALUES ({$values});")) {
421
+    if (classSupernova::db_query("INSERT INTO `{{" . static::$_table . "}}` ({$fields}) VALUES ({$values});")) {
422 422
       $result = db_insert_id();
423 423
     }
424 424
 
@@ -436,13 +436,13 @@  discard block
 block discarded – undo
436 436
     sn_db_field_set_safe_flag_clear($field_set);
437 437
 
438 438
     $set = array();
439
-    foreach($field_set as $fieldName => $value) {
440
-      if(!($changedProperty = $this->isFieldChanged($fieldName))) {
439
+    foreach ($field_set as $fieldName => $value) {
440
+      if (!($changedProperty = $this->isFieldChanged($fieldName))) {
441 441
         continue;
442 442
       }
443 443
 
444 444
       // TODO - separate sets from adjusts
445
-      if(array_key_exists($changedProperty, $this->propertiesAdjusted)) {
445
+      if (array_key_exists($changedProperty, $this->propertiesAdjusted)) {
446 446
         $value = "`{$fieldName}` + ($value)"; // braces for negative values
447 447
       }
448 448
 
Please login to merge, or discard this patch.
includes/includes/flt_mission_colonize.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
   $TargetAddress = sprintf($lang['sys_adress_planet'], $fleet_end_coordinates['galaxy'], $fleet_end_coordinates['system'], $fleet_end_coordinates['planet']);
21 21
 
22 22
   $TheMessage = $lang['sys_colo_no_colonizer'];
23
-  if($objFleet->shipsGetTotalById(SHIP_COLONIZER) >= 1) {
23
+  if ($objFleet->shipsGetTotalById(SHIP_COLONIZER) >= 1) {
24 24
     $TheMessage = $lang['sys_colo_notfree'];
25
-    if(empty($mission_data->dst_planet)) {
25
+    if (empty($mission_data->dst_planet)) {
26 26
       $iPlanetCount = get_player_current_colonies($src_user_row);
27 27
 
28 28
       // Can we colonize more planets?
29 29
       $TheMessage = $lang['sys_colo_maxcolo'];
30
-      if($iPlanetCount < get_player_max_colonies($src_user_row)) {
30
+      if ($iPlanetCount < get_player_max_colonies($src_user_row)) {
31 31
         // Yes, we can colonize
32 32
         $TheMessage = $lang['sys_colo_badpos'];
33 33
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
           $fleet_end_coordinates['galaxy'], $fleet_end_coordinates['system'], $fleet_end_coordinates['planet'],
36 36
           $objFleet->playerOwnerId, "{$lang['sys_colo_defaultname']} {$iPlanetCount}", false,
37 37
           array('user_row' => $src_user_row));
38
-        if($NewOwnerPlanet) {
38
+        if ($NewOwnerPlanet) {
39 39
           $TheMessage = $lang['sys_colo_arrival'] . $TargetAddress . $lang['sys_colo_allisok'];
40 40
           msg_send_simple_message($objFleet->playerOwnerId, '', $objFleet->time_arrive_to_target, MSG_TYPE_SPY, $lang['sys_colo_mess_from'], $lang['sys_colo_mess_report'], $TheMessage);
41 41
 
Please login to merge, or discard this patch.
includes/includes/flt_mission_attack.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@
 block discarded – undo
17 17
 function flt_mission_attack($objMission) {
18 18
   $objFleet = $objMission->fleet;
19 19
 
20
-  if($objFleet->shipsGetTotal() <= 0) {
20
+  if ($objFleet->shipsGetTotal() <= 0) {
21 21
     return null;
22 22
   }
23 23
 
24 24
   $destination_user = $objMission->dst_user;
25 25
   $destination_planet = $objMission->dst_planet;
26 26
 
27
-  if(
27
+  if (
28 28
     // Нет данных о планете назначения или её владельце
29 29
     empty($destination_user) || empty($destination_planet) || !is_array($destination_user) || !is_array($destination_planet)
30 30
     ||
Please login to merge, or discard this patch.