Test Failed
Push — trunk ( b76cfb...dfde47 )
by SuperNova.WS
03:49
created
includes/functions/sys_maintenance.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function sys_maintenance()
4
-{
3
+function sys_maintenance() {
5 4
   global $config;
6 5
 
7 6
   $bashing_time_limit = SN_TIME_NOW - $config->fleet_bashing_scope;
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
  * TODO: 2. [<m|w|d|h|m|s>@]<time>
43 42
  */
44 43
 
45
-function sys_schedule_get_prev_run($scheduleList, $recorded_run = SN_TIME_NOW, $return_next_run = false)
46
-{
44
+function sys_schedule_get_prev_run($scheduleList, $recorded_run = SN_TIME_NOW, $return_next_run = false) {
47 45
   static $date_part_names_reverse = array('seconds', 'minutes', 'hours', 'days', 'months', 'years',);
48 46
 
49 47
   $possible_schedules = array();
Please login to merge, or discard this patch.
includes/functions/lng_language.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,14 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // ----------------------------------------------------------------------------------------------------------------
4
-function lng_try_filepath($path, $file_path_relative)
5
-{
4
+function lng_try_filepath($path, $file_path_relative) {
6 5
   $file_path = SN_ROOT_PHYSICAL . ($path && file_exists(SN_ROOT_PHYSICAL . $path . $file_path_relative) ? $path : '') . $file_path_relative;
7 6
   return file_exists($file_path) ? $file_path : false;
8 7
 }
9 8
 
10
-function lng_die_not_an_object()
11
-{
9
+function lng_die_not_an_object() {
12 10
   print('Ошибка - $lang не объект! Сообщите Администратору сервера и приложите содержимое страницы');
13 11
   $trace = debug_backtrace();
14 12
   unset($trace[0]);
@@ -17,32 +15,27 @@  discard block
 block discarded – undo
17 15
 }
18 16
 
19 17
 // ----------------------------------------------------------------------------------------------------------------
20
-function lng_include($filename, $path = '', $ext = '.mo.php')
21
-{
18
+function lng_include($filename, $path = '', $ext = '.mo.php') {
22 19
   global $lang;
23 20
   return is_object($lang) ? $lang->lng_include($filename, $path, $ext) : lng_die_not_an_object();
24 21
 }
25 22
 
26
-function lng_get_list()
27
-{
23
+function lng_get_list() {
28 24
   global $lang;
29 25
   return is_object($lang) ? $lang->lng_get_list() : lng_die_not_an_object();
30 26
 }
31 27
 
32
-function lng_get_info($entry)
33
-{
28
+function lng_get_info($entry) {
34 29
   global $lang;
35 30
   return is_object($lang) ? $lang->lng_get_info($entry) : lng_die_not_an_object();
36 31
 }
37 32
 
38
-function lng_switch($language_new)
39
-{
33
+function lng_switch($language_new) {
40 34
   global $lang;
41 35
   return is_object($lang) ? $lang->lng_switch($language_new) : lng_die_not_an_object();
42 36
 }
43 37
 
44
-function lng_load_i18n($i18n)
45
-{
38
+function lng_load_i18n($i18n) {
46 39
   global $lang;
47 40
   return is_object($lang) ? $lang->lng_load_i18n($i18n) : lng_die_not_an_object();
48 41
 }
Please login to merge, or discard this patch.
includes/includes/flt_mission_recycle.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
  * @copyright 2008 By Chlorel for XNova
8 8
  */
9 9
 
10
-function flt_mission_recycle(&$mission_data)
11
-{
10
+function flt_mission_recycle(&$mission_data) {
12 11
   $fleet_row          = &$mission_data['fleet'];
13 12
   $destination_planet = &$mission_data['dst_planet'];
14 13
 
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
       if(in_array($unit_id, sn_get_groups('flt_recyclers')))
38 37
       {
39 38
         $RecyclerCapacity += $capacity;
40
-      }
41
-      else
39
+      } else
42 40
       {
43 41
         $OtherFleetCapacity += $capacity;
44 42
       }
@@ -55,16 +53,14 @@  discard block
 block discarded – undo
55 53
   {
56 54
     $RecycledGoods["metal"]   = $destination_planet["debris_metal"];
57 55
     $RecycledGoods["crystal"] = $destination_planet["debris_crystal"];
58
-  }
59
-  else
56
+  } else
60 57
   {
61 58
     if (($destination_planet["debris_metal"]   > $RecyclerCapacity / 2) AND
62 59
       ($destination_planet["debris_crystal"] > $RecyclerCapacity / 2))
63 60
       {
64 61
       $RecycledGoods["metal"]   = $RecyclerCapacity / 2;
65 62
       $RecycledGoods["crystal"] = $RecyclerCapacity / 2;
66
-    }
67
-    else
63
+    } else
68 64
     {
69 65
       if ($destination_planet["debris_metal"] > $destination_planet["debris_crystal"])
70 66
       {
@@ -72,20 +68,17 @@  discard block
 block discarded – undo
72 68
         if ($destination_planet["debris_metal"] > ($RecyclerCapacity - $RecycledGoods["crystal"]))
73 69
         {
74 70
           $RecycledGoods["metal"] = $RecyclerCapacity - $RecycledGoods["crystal"];
75
-        }
76
-        else
71
+        } else
77 72
         {
78 73
           $RecycledGoods["metal"] = $destination_planet["debris_metal"];
79 74
         }
80
-      }
81
-      else
75
+      } else
82 76
       {
83 77
         $RecycledGoods["metal"] = $destination_planet["debris_metal"];
84 78
         if ($destination_planet["debris_crystal"] > ($RecyclerCapacity - $RecycledGoods["metal"]))
85 79
         {
86 80
           $RecycledGoods["crystal"] = $RecyclerCapacity - $RecycledGoods["metal"];
87
-        }
88
-        else
81
+        } else
89 82
         {
90 83
           $RecycledGoods["crystal"] = $destination_planet["debris_crystal"];
91 84
         }
Please login to merge, or discard this patch.
includes/includes/flt_mission_relocate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * @version 1.1
9 9
  * @copyright 2008 by Chlorel for XNova
10 10
  */
11
-function flt_mission_relocate($mission_data)
12
-{
11
+function flt_mission_relocate($mission_data) {
13 12
   $fleet_row          = &$mission_data['fleet'];
14 13
   $destination_planet = &$mission_data['dst_planet'];
15 14
 
Please login to merge, or discard this patch.
includes/includes/flt_mission_transport.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * @copyright 2008 By Chlorel for XNova
9 9
  */
10 10
 
11
-function flt_mission_transport(&$mission_data)
12
-{
11
+function flt_mission_transport(&$mission_data) {
13 12
   $fleet_row          = &$mission_data['fleet'];
14 13
   $source_planet      = &$mission_data['src_planet'];
15 14
   $destination_planet = &$mission_data['dst_planet'];
Please login to merge, or discard this patch.
includes/includes/flt_mission_colonize.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
 // ----------------------------------------------------------------------------------------------------------------
11 11
 // Mission Case 9: -> Coloniser
12 12
 //
13
-function flt_mission_colonize(&$mission_data)
14
-{
13
+function flt_mission_colonize(&$mission_data) {
15 14
   $fleet_row          = &$mission_data['fleet'];
16 15
   $src_user_row       = &$mission_data['src_user'];
17 16
 
Please login to merge, or discard this patch.
includes/pages/techtree.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@
 block discarded – undo
6 6
  * version 2.0 copyright (c) 2012 by Gorlum for http://supernova.ws
7 7
  */
8 8
 
9
-function sn_techtree_view($template = null)
10
-{
9
+function sn_techtree_view($template = null) {
11 10
   global $lang, $user, $planetrow;
12 11
 
13 12
   $tech_tree = array();
Please login to merge, or discard this patch.
admin/includes/admin_planet_edit.inc.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,8 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 function admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list){return sn_function_call('admin_planet_edit_mode', array(&$template, &$admin_planet_edit_mode_list));}
4
-function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list)
5
-{
4
+function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list) {
6 5
   global $lang;
7 6
 
8 7
   $admin_planet_edit_mode_list = array_merge(isset($admin_planet_edit_mode_list) ? $admin_planet_edit_mode_list : array(), array(
@@ -25,8 +24,7 @@  discard block
 block discarded – undo
25 24
  * @param $edit_planet_row
26 25
  * @param $mode
27 26
  */
28
-function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode)
29
-{
27
+function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode) {
30 28
   global $lang;
31 29
 
32 30
   $unit_list = sn_get_groups($mode);
@@ -48,15 +46,13 @@  discard block
 block discarded – undo
48 46
 }
49 47
 
50 48
 function admin_planet_edit_query_string($unit_id, $unit_amount, $mode){return sn_function_call('admin_planet_edit_query_string', array($unit_id, $unit_amount, $mode));}
51
-function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode)
52
-{
49
+function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode) {
53 50
   if($unit_amount && in_array($unit_id, sn_get_groups($mode)))
54 51
   {
55 52
     $unit_amount = round($unit_amount);
56 53
     $unit_name = get_unit_param($unit_id, P_NAME);
57 54
     $result = "{$unit_name} = GREATEST(0, {$unit_name} + ({$unit_amount}))";
58
-  }
59
-  else
55
+  } else
60 56
   {
61 57
     $result = '';
62 58
   }
Please login to merge, or discard this patch.
resources.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
30 30
  * @param $resource_id
31 31
  * @param ResourceCalculations $capsObj
32 32
  */
33
-function int_calc_storage_bar($resource_id, $capsObj)
34
-{
33
+function int_calc_storage_bar($resource_id, $capsObj) {
35 34
   global $lang, $template, $planetrow, $user;
36 35
 
37 36
   $totalProduction      = $capsObj->getProduction($resource_id);
Please login to merge, or discard this patch.