Test Failed
Push — trunk ( b76cfb...dfde47 )
by SuperNova.WS
03:49
created
includes/functions/_deprecated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * @return mixed
14 14
  * @deprecated
15 15
  */
16
-function RestoreFleetToPlanet(&$fleet_row, $start = true, $only_resources = false, $safe_fleet = false){return sn_function_call('RestoreFleetToPlanet', array(&$fleet_row, $start, $only_resources, $safe_fleet, &$result));}
16
+function RestoreFleetToPlanet(&$fleet_row, $start = true, $only_resources = false, $safe_fleet = false) {return sn_function_call('RestoreFleetToPlanet', array(&$fleet_row, $start, $only_resources, $safe_fleet, &$result)); }
17 17
 /**
18 18
  * @param array $fleet_row
19 19
  * @param bool  $start
Please login to merge, or discard this patch.
classes/Core/Repository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
   public function get($entityClass, $id) {
88 88
     $entityIndex = get_class($entityClass) . '\\' . $id;
89
-    if(!isset($this->_repository[$entityIndex])) {
89
+    if (!isset($this->_repository[$entityIndex])) {
90 90
 
91 91
     }
92 92
 
Please login to merge, or discard this patch.
classes/Core/SnBootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 class SnBootstrap {
12 12
 
13 13
   public static function install_benchmark() {
14
-    register_shutdown_function(function () {
14
+    register_shutdown_function(function() {
15 15
       if (defined('IN_AJAX')) {
16 16
         return;
17 17
       }
Please login to merge, or discard this patch.
scheduler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
 
23 23
 define('IN_AJAX', true);
24 24
 
25
-if(($result = StatUpdateLauncher::scheduler_process()) && !defined('IN_ADMIN')) {
25
+if (($result = StatUpdateLauncher::scheduler_process()) && !defined('IN_ADMIN')) {
26 26
   $result = htmlspecialchars($result, ENT_QUOTES, 'UTF-8');
27 27
   print(json_encode($result));
28 28
 }
29 29
 
30
-if(!defined('IN_ADMIN')) {
30
+if (!defined('IN_ADMIN')) {
31 31
   die();
32 32
 }
Please login to merge, or discard this patch.
classes/Meta/Economic/EconomicHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,11 +75,11 @@
 block discarded – undo
75 75
    * @return float[] - [int resourceId] -> [float ratesNormalizedToResourceCost]
76 76
    */
77 77
   public function getResourceExchangeIn($resourceId) {
78
-    if(empty($this->resourceExchangeRates[$resourceId])) {
78
+    if (empty($this->resourceExchangeRates[$resourceId])) {
79 79
       $defaultRates = $this->getResourcesExchange();
80 80
 
81 81
       $this->resourceExchangeRates[$resourceId] = [];
82
-      foreach($defaultRates as $defaultResourceId => $defaultRate) {
82
+      foreach ($defaultRates as $defaultResourceId => $defaultRate) {
83 83
         $this->resourceExchangeRates[$resourceId][$defaultResourceId] = $defaultRate / $defaultRates[$resourceId];
84 84
       }
85 85
     }
Please login to merge, or discard this patch.
admin/includes/admin_planet_edit.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
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));}
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 4
 function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list)
5 5
 {
6 6
   global $lang;
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
   return $mode;
20 20
 }
21 21
 
22
-function admin_planet_edit_template(&$template, $edit_planet_row, $mode){return sn_function_call('admin_planet_edit_template', array(&$template, $edit_planet_row, $mode));}
22
+function admin_planet_edit_template(&$template, $edit_planet_row, $mode) {return sn_function_call('admin_planet_edit_template', array(&$template, $edit_planet_row, $mode)); }
23 23
 /**
24 24
  * @param template $template
25 25
  * @param $edit_planet_row
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
   global $lang;
31 31
 
32 32
   $unit_list = sn_get_groups($mode);
33
-  if(empty($unit_list))
33
+  if (empty($unit_list))
34 34
   {
35 35
     return;
36 36
   }
37 37
   $name_list = $lang['tech'];
38 38
 
39
-  foreach($unit_list as $unit_id)
39
+  foreach ($unit_list as $unit_id)
40 40
   {
41 41
     $template->assign_block_vars('unit', array(
42 42
       'ID'    => $unit_id,
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
   }
48 48
 }
49 49
 
50
-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));}
50
+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 51
 function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode)
52 52
 {
53
-  if($unit_amount && in_array($unit_id, sn_get_groups($mode)))
53
+  if ($unit_amount && in_array($unit_id, sn_get_groups($mode)))
54 54
   {
55 55
     $unit_amount = round($unit_amount);
56 56
     $unit_name = get_unit_param($unit_id, P_NAME);
Please login to merge, or discard this patch.
classes/classCache.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
   public function unset_by_prefix($prefix_unset = '') {
152 152
     static $array_clear;
153
-    !$array_clear ? $array_clear = function (&$v, $k, $p) {
153
+    !$array_clear ? $array_clear = function(&$v, $k, $p) {
154 154
       strpos($k, $p) === 0 ? $v = null : false;
155 155
     } : false;
156 156
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     if ($this->$name[0] === null) {
206 206
       for ($i = count($name) - 1; $i > 0; $i--) {
207 207
         $cName = "{$name[$i]}_COUNT";
208
-        $cName1 = "{$name[$i-1]}_COUNT";
208
+        $cName1 = "{$name[$i - 1]}_COUNT";
209 209
         if ($this->$cName1 == null || $i == 1) {
210 210
           $this->$cName++;
211 211
         }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     $count = count($name);
252 252
     for ($i = 1; $i < $count; $i++) {
253 253
       $cName = "{$name[$i]}_COUNT";
254
-      $cName1 = "{$name[$i-1]}_COUNT";
254
+      $cName1 = "{$name[$i - 1]}_COUNT";
255 255
 
256 256
       if ($i == 1 || $this->$cName1 === null) {
257 257
         $this->$cName--;
Please login to merge, or discard this patch.
classes/Fleet/MissionEspionage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
       $this->target_message = "{$lang['sys_mess_spy_enemy_fleet']} {$this->src_planet['name']} " . uni_render_coordinates_href($this->src_planet, '', 3);
32 32
       $this->target_message .= " {$lang['sys_mess_spy_seen_at']} {$this->dst_planet['name']} " . uni_render_coordinates($this->dst_planet);
33
-      if($this->missionReport->isSpyDetected()) {
33
+      if ($this->missionReport->isSpyDetected()) {
34 34
         $this->target_message .= "<br />{$lang['sys_mess_spy_destroyed_enemy']}";
35 35
       }
36 36
 
Please login to merge, or discard this patch.
classes/Pm/DecodeEspionage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
       $groups[get_unit_param($unitId, P_UNIT_TYPE)][$unitId] = $unitAmount;
26 26
     }
27 27
 
28
-    foreach(static::ALLOWED_UNITS as $groupId) {
29
-      if(empty($groups[$groupId])) {
28
+    foreach (static::ALLOWED_UNITS as $groupId) {
29
+      if (empty($groups[$groupId])) {
30 30
         continue;
31 31
       }
32 32
 
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
         'NAME' => $lang['tech'][$groupId],
36 36
       ]);
37 37
 
38
-      foreach($general->getGroupsById($groupId) as $unitId) {
39
-        if((!isset($groups[$groupId][$unitId]) || floor($groups[$groupId][$unitId]) < 1) && $unitId != RES_ENERGY) {
38
+      foreach ($general->getGroupsById($groupId) as $unitId) {
39
+        if ((!isset($groups[$groupId][$unitId]) || floor($groups[$groupId][$unitId]) < 1) && $unitId != RES_ENERGY) {
40 40
           continue;
41 41
         }
42 42
 
Please login to merge, or discard this patch.