Test Failed
Branch trunk (d809b8)
by SuperNova.WS
05:48
created
includes/includes/flt_mission_transport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
   $source_planet      = &$mission_data['src_planet'];
15 15
   $destination_planet = &$mission_data['dst_planet'];
16 16
 
17
-  if(!isset($destination_planet['id']) || !$destination_planet['id_owner'])
17
+  if (!isset($destination_planet['id']) || !$destination_planet['id_owner'])
18 18
   {
19 19
     // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;");
20 20
     fleet_send_back($fleet_row);
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
     $destination_planet['name'], uni_render_coordinates_href($fleet_row, 'fleet_end_', 3, ''),
28 28
     $fleet_row['fleet_resource_metal'], $lang['Metal'],
29 29
     $fleet_row['fleet_resource_crystal'], $lang['Crystal'],
30
-    $fleet_row['fleet_resource_deuterium'], $lang['Deuterium'] );
30
+    $fleet_row['fleet_resource_deuterium'], $lang['Deuterium']);
31 31
   msg_send_simple_message($fleet_row['fleet_target_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
32 32
 
33
-  if($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner'])
33
+  if ($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner'])
34 34
   {
35 35
     msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
36 36
   }
Please login to merge, or discard this patch.
flotenajax.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
   'planet' => $target_planet = sys_get_param_int('planet'),
30 30
 );
31 31
 
32
-if(!uni_coordinates_valid($target_coord))
32
+if (!uni_coordinates_valid($target_coord))
33 33
 {
34 34
   die($lang['gs_c02']);
35 35
 }
36 36
 
37 37
 $target_mission = sys_get_param_int('mission');
38 38
 $sn_group_missions = sn_get_groups('missions');
39
-if(!isset($sn_group_missions[$target_mission]['AJAX']) || !$sn_group_missions[$target_mission]['AJAX'])
39
+if (!isset($sn_group_missions[$target_mission]['AJAX']) || !$sn_group_missions[$target_mission]['AJAX'])
40 40
 {
41 41
   die($lang['gs_c00']);
42 42
 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 $target_coord['planet_type'] = $target_planet_check;
53 53
 $target_row = DBStaticPlanet::db_planet_by_vector($target_coord);
54 54
 
55
-if(empty($target_row))
55
+if (empty($target_row))
56 56
 {
57 57
   $target_row = array(
58 58
     'galaxy' => $target_coord['galaxy'],
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 }
65 65
 
66 66
 $fleet_array = array();
67
-switch($target_mission)
67
+switch ($target_mission)
68 68
 {
69 69
   case MT_SPY:
70 70
     // $fleet_array[SHIP_SPY] = min(mrc_get_level($user, $planetrow, SHIP_SPY), abs($user['spio_anz']));
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
   break;
74 74
 
75 75
   case MT_RECYCLE:
76
-    foreach(sn_get_groups('flt_recyclers') as $unit_id)
76
+    foreach (sn_get_groups('flt_recyclers') as $unit_id)
77 77
     {
78
-      if($unit_count = mrc_get_level($user, $planetrow, $unit_id))
78
+      if ($unit_count = mrc_get_level($user, $planetrow, $unit_id))
79 79
       {
80 80
         $fleet_array[$unit_id] = $unit_count;
81 81
       }
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
 $cant_attack = flt_can_attack($planetrow, $target_row, $fleet_array, $target_mission, $options);
97 97
 
98 98
 
99
-if($cant_attack != ATTACK_ALLOWED)
99
+if ($cant_attack != ATTACK_ALLOWED)
100 100
 {
101 101
   die($lang['fl_attack_error'][$cant_attack]);
102 102
 }
103 103
 
104
-$FleetDBArray   = array();
104
+$FleetDBArray = array();
105 105
 $db_changeset = array();
106
-foreach($fleet_array as $unit_id => $unit_count)
106
+foreach ($fleet_array as $unit_id => $unit_count)
107 107
 {
108 108
   $FleetDBArray[] = "{$unit_id},{$unit_count}";
109 109
   $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($unit_id, -$unit_count, $user, $planetrow);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 $fleet_ship_count = array_sum($fleet_array);
114 114
 
115
-if($target_mission == MT_MISSILE)
115
+if ($target_mission == MT_MISSILE)
116 116
 {
117 117
   $distance = abs($target_coord['system'] - $planetrow['system']);
118 118
   $duration = round((30 + (60 * $distance)) / flt_server_flight_speed_multiplier());
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 {
131 131
   $travel_data = flt_travel_data($user, $planetrow, $target_coord, $fleet_array, 10);
132 132
 
133
-  if($planetrow['deuterium'] < $travel_data['consumption'])
133
+  if ($planetrow['deuterium'] < $travel_data['consumption'])
134 134
   {
135 135
     die($lang['gs_c13']);
136 136
   }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 $ships_sent = array();
190 190
 //$ships_sent_js = array();
191 191
 $ships_sent_js = 0;
192
-foreach($fleet_array as $unit_id => $unit_count)
192
+foreach ($fleet_array as $unit_id => $unit_count)
193 193
 {
194 194
   $ships_sent[] = "{$unit_count} {$lang['tech'][$unit_id]}";
195 195
   $ships_sent_js += mrc_get_level($user, $planetrow, $unit_id, false, true);
@@ -198,6 +198,6 @@  discard block
 block discarded – undo
198 198
 //$ships_sent_js = implode(',', $ships_sent_js);
199 199
 $ships_sent_js = "{$unit_group}={$ships_sent_js}";
200 200
 
201
-$ResultMessage  = "{$lang['gs_sending']} {$ships_sent} {$lang['gs_to']} {$target_coord['galaxy']}:{$target_coord['system']}:{$target_coord['planet']}|{$ships_sent_js}";
201
+$ResultMessage = "{$lang['gs_sending']} {$ships_sent} {$lang['gs_to']} {$target_coord['galaxy']}:{$target_coord['system']}:{$target_coord['planet']}|{$ships_sent_js}";
202 202
 
203 203
 die($ResultMessage);
Please login to merge, or discard this patch.
buddy.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -18,39 +18,39 @@  discard block
 block discarded – undo
18 18
 {
19 19
   sn_db_transaction_start();
20 20
 
21
-  if($buddy_id = sys_get_param_id('buddy_id'))
21
+  if ($buddy_id = sys_get_param_id('buddy_id'))
22 22
   {
23 23
     $buddy_row = doquery("SELECT BUDDY_SENDER_ID, BUDDY_OWNER_ID, BUDDY_STATUS FROM {{buddy}} WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1 FOR UPDATE;", true);
24
-    if(!is_array($buddy_row))
24
+    if (!is_array($buddy_row))
25 25
     {
26 26
       throw new exception('buddy_err_not_exist', ERR_ERROR);
27 27
     }
28 28
 
29
-    switch($mode = sys_get_param_str('mode'))
29
+    switch ($mode = sys_get_param_str('mode'))
30 30
     {
31 31
       case 'accept':
32
-        if($buddy_row['BUDDY_SENDER_ID'] == $user['id'])
32
+        if ($buddy_row['BUDDY_SENDER_ID'] == $user['id'])
33 33
         {
34 34
           throw new exception('buddy_err_accept_own', ERR_ERROR);
35 35
         }
36 36
 
37
-        if($buddy_row['BUDDY_OWNER_ID'] != $user['id'])
37
+        if ($buddy_row['BUDDY_OWNER_ID'] != $user['id'])
38 38
         {
39 39
           throw new exception('buddy_err_accept_alien', ERR_ERROR);
40 40
         }
41 41
 
42
-        if($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE)
42
+        if ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE)
43 43
         {
44 44
           throw new exception('buddy_err_accept_already', ERR_WARNING);
45 45
         }
46 46
 
47
-        if($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_DENIED)
47
+        if ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_DENIED)
48 48
         {
49 49
           throw new exception('buddy_err_accept_denied', ERR_ERROR);
50 50
         }
51 51
 
52 52
         doquery("UPDATE {{buddy}} SET `BUDDY_STATUS` = " . BUDDY_REQUEST_ACTIVE . " WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
53
-        if(classSupernova::$db->db_affected_rows())
53
+        if (classSupernova::$db->db_affected_rows())
54 54
         {
55 55
           msg_send_simple_message($buddy_row['BUDDY_SENDER_ID'], $user['id'], SN_TIME_NOW, MSG_TYPE_PLAYER, $user['username'], $lang['buddy_msg_accept_title'],
56 56
             sprintf($lang['buddy_msg_accept_text'], $user['username']));
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
       break;
65 65
 
66 66
       case 'delete':
67
-        if($buddy_row['BUDDY_SENDER_ID'] != $user['id'] && $buddy_row['BUDDY_OWNER_ID'] != $user['id'])
67
+        if ($buddy_row['BUDDY_SENDER_ID'] != $user['id'] && $buddy_row['BUDDY_OWNER_ID'] != $user['id'])
68 68
         {
69 69
           throw new exception('buddy_err_delete_alien', ERR_ERROR);
70 70
         }
71 71
 
72
-        if($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE) // Existing friendship
72
+        if ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE) // Existing friendship
73 73
         {
74 74
           $ex_friend_id = $buddy_row['BUDDY_SENDER_ID'] == $user['id'] ? $buddy_row['BUDDY_OWNER_ID'] : $buddy_row['BUDDY_SENDER_ID'];
75 75
 
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
           sn_db_transaction_commit();
81 81
           throw new exception('buddy_err_unfriend_none', ERR_NONE);
82 82
         }
83
-        elseif($buddy_row['BUDDY_SENDER_ID'] == $user['id']) // Player's outcoming request - either denied or waiting
83
+        elseif ($buddy_row['BUDDY_SENDER_ID'] == $user['id']) // Player's outcoming request - either denied or waiting
84 84
         {
85 85
           doquery("DELETE FROM {{buddy}} WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
86 86
           sn_db_transaction_commit();
87 87
           throw new exception('buddy_err_delete_own', ERR_NONE);
88 88
         }
89
-        elseif($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_WAITING) // Deny incoming request
89
+        elseif ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_WAITING) // Deny incoming request
90 90
         {
91 91
           msg_send_simple_message($buddy_row['BUDDY_SENDER_ID'], $user['id'], SN_TIME_NOW, MSG_TYPE_PLAYER, $user['username'], $lang['buddy_msg_deny_title'],
92 92
             sprintf($lang['buddy_msg_deny_text'], $user['username']));
@@ -101,24 +101,24 @@  discard block
 block discarded – undo
101 101
 
102 102
   // New request?
103 103
   // Checking for user ID - in case if it was request from outside buddy system
104
-  if($new_friend_id = sys_get_param_id('request_user_id'))
104
+  if ($new_friend_id = sys_get_param_id('request_user_id'))
105 105
   {
106 106
     $new_friend_row = db_user_by_id($new_friend_id, true, '`id`, `username`');
107 107
   }
108
-  elseif($new_friend_name = sys_get_param_str_unsafe('request_user_name'))
108
+  elseif ($new_friend_name = sys_get_param_str_unsafe('request_user_name'))
109 109
   {
110 110
     $new_friend_row = db_user_by_username($new_friend_name, true, '`id`, `username`');
111 111
     $new_friend_name = db_escape($new_friend_name);
112 112
   }
113 113
 
114
-  if($new_friend_row['id'] == $user['id'])
114
+  if ($new_friend_row['id'] == $user['id'])
115 115
   {
116 116
     unset($new_friend_row);
117 117
     throw new exception('buddy_err_adding_self', ERR_ERROR);
118 118
   }
119 119
 
120 120
   // Checking for user name & request text - in case if it was request to adding new request
121
-  if(isset($new_friend_row['id']) && ($new_request_text = sys_get_param_str('request_text')))
121
+  if (isset($new_friend_row['id']) && ($new_request_text = sys_get_param_str('request_text')))
122 122
   {
123 123
     $check_relation = doquery("SELECT `BUDDY_ID` FROM {{buddy}} WHERE
124 124
       (`BUDDY_SENDER_ID` = {$user['id']} AND `BUDDY_OWNER_ID` = {$new_friend_row['id']})
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
       (`BUDDY_SENDER_ID` = {$new_friend_row['id']} AND `BUDDY_OWNER_ID` = {$user['id']})
127 127
       LIMIT 1 FOR UPDATE;"
128 128
     , true);
129
-    if(isset($check_relation['BUDDY_ID']))
129
+    if (isset($check_relation['BUDDY_ID']))
130 130
     {
131 131
       throw new exception('buddy_err_adding_exists', ERR_WARNING);
132 132
     }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     throw new exception('buddy_err_adding_none', ERR_NONE);
140 140
   }
141 141
 }
142
-catch(exception $e)
142
+catch (exception $e)
143 143
 {
144 144
   $result[] = array(
145 145
     'STATUS'  => in_array($e->getCode(), array(ERR_NONE, ERR_WARNING, ERR_ERROR)) ? $e->getCode() : ERR_ERROR,
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 sn_db_transaction_rollback();
151 151
 
152 152
 $query = db_buddy_list_by_user($user['id']);
153
-while($row = db_fetch($query))
153
+while ($row = db_fetch($query))
154 154
 {
155 155
   $row['BUDDY_REQUEST'] = HelperString::nl2br($row['BUDDY_REQUEST']);
156 156
 
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
  */
6 6
 global $template;
7 7
 
8
-if(isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) {
8
+if (isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) {
9 9
   require_once('common.' . substr(strrchr(__FILE__, '.'), 1));
10
-  if($sn_page_name) {
10
+  if ($sn_page_name) {
11 11
     // Loading page-specific language files
12 12
 
13 13
     !empty($sn_mvc['model'][$sn_page_name]) and execute_hooks($sn_mvc['model'][$sn_page_name], $template, 'model', $sn_page_name);
14 14
     !empty($sn_mvc['view'][$sn_page_name]) and execute_hooks($sn_mvc['view'][$sn_page_name], $template, 'view', $sn_page_name);
15
-    if(!empty($template_result) && is_object($template)) {
15
+    if (!empty($template_result) && is_object($template)) {
16 16
       $template->assign_recursive($template_result);
17 17
     }
18 18
 
Please login to merge, or discard this patch.
classes/sn_module.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
     // Trying to load configuration from file
105 105
     $config_exists = false;
106 106
     // Конфигурация может лежать в config_path в манифеста или в корне модуля
107
-    if(isset($this->manifest['config_path']) && file_exists($config_filename = $this->manifest['config_path'] . '/config.php')) {
107
+    if (isset($this->manifest['config_path']) && file_exists($config_filename = $this->manifest['config_path'] . '/config.php')) {
108 108
       $config_exists = true;
109
-    } elseif(file_exists($config_filename = dirname($filename) . '/config.php')) {
109
+    } elseif (file_exists($config_filename = dirname($filename) . '/config.php')) {
110 110
       $config_exists = true;
111 111
     }
112 112
 
113
-    if($config_exists) {
113
+    if ($config_exists) {
114 114
       include($config_filename);
115 115
       $module_config_array = $class_module_name . '_config';
116 116
       $this->config = $$module_config_array;
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
   }
122 122
 
123 123
   protected function __patch_menu(&$sn_menu_extra, &$menu_patch) {
124
-    if(isset($menu_patch) && is_array($menu_patch) && !empty($menu_patch)) {
125
-      foreach($menu_patch as $menu_item_name => $menu_item_data) {
124
+    if (isset($menu_patch) && is_array($menu_patch) && !empty($menu_patch)) {
125
+      foreach ($menu_patch as $menu_item_name => $menu_item_data) {
126 126
         $sn_menu_extra[$menu_item_name] = $menu_item_data;
127 127
       }
128 128
     }
@@ -132,13 +132,13 @@  discard block
 block discarded – undo
132 132
   public function initialize() {
133 133
     // Checking module status - is it installed and active
134 134
     $this->check_status();
135
-    if(!$this->manifest['active']) {
135
+    if (!$this->manifest['active']) {
136 136
       return;
137 137
     }
138 138
 
139 139
     // Setting constants - if any
140
-    if(isset($this->manifest['constants']) && is_array($this->manifest['constants']) && !empty($this->manifest['constants'])) {
141
-      foreach($this->manifest['constants'] as $constant_name => $constant_value) {
140
+    if (isset($this->manifest['constants']) && is_array($this->manifest['constants']) && !empty($this->manifest['constants'])) {
141
+      foreach ($this->manifest['constants'] as $constant_name => $constant_value) {
142 142
         defined($constant_name) or define($constant_name, $constant_value);
143 143
       }
144 144
     }
@@ -149,34 +149,34 @@  discard block
 block discarded – undo
149 149
     // New values from module variables will overwrite previous values (for root variables) and array elements with corresponding indexes (for arrays)
150 150
     // Constants as array indexes are honored - it's make valid such declarations as 'sn_data[ques][QUE_STRUCTURES]'
151 151
     $this->manifest['vars'] = $this->__assign_vars();
152
-    if(!empty($this->manifest['vars'])) {
152
+    if (!empty($this->manifest['vars'])) {
153 153
       $vars_assigned = array();
154
-      foreach($this->manifest['vars'] as $var_name => $var_value) {
154
+      foreach ($this->manifest['vars'] as $var_name => $var_value) {
155 155
         $sub_vars = explode('[', str_replace(']', '', $var_name));
156 156
         $var_name = $sub_vars[0];
157 157
 
158
-        if(!isset($vars_assigned[$var_name])) {
158
+        if (!isset($vars_assigned[$var_name])) {
159 159
           $vars_assigned[$var_name] = true;
160 160
           global $$var_name;
161 161
         }
162 162
 
163 163
         $pointer = &$$var_name;
164
-        if(($n = count($sub_vars)) > 1) {
165
-          for($i = 1; $i < $n; $i++) {
166
-            if(defined($sub_vars[$i])) {
164
+        if (($n = count($sub_vars)) > 1) {
165
+          for ($i = 1; $i < $n; $i++) {
166
+            if (defined($sub_vars[$i])) {
167 167
               $sub_vars[$i] = constant($sub_vars[$i]);
168 168
             }
169 169
 
170
-            if(!isset($pointer[$sub_vars[$i]]) && $i != $n) {
170
+            if (!isset($pointer[$sub_vars[$i]]) && $i != $n) {
171 171
               $pointer[$sub_vars[$i]] = array();
172 172
             }
173 173
             $pointer = &$pointer[$sub_vars[$i]];
174 174
           }
175 175
         }
176 176
 
177
-        if(!isset($pointer) || !is_array($pointer)) {
177
+        if (!isset($pointer) || !is_array($pointer)) {
178 178
           $pointer = $var_value;
179
-        } elseif(is_array($$var_name)) {
179
+        } elseif (is_array($$var_name)) {
180 180
           $pointer = array_merge_recursive_numeric($pointer, $var_value);
181 181
         }
182 182
       }
@@ -192,50 +192,50 @@  discard block
 block discarded – undo
192 192
     isset($this->manifest['menu_admin']) and $this->__patch_menu($sn_menu_admin_extra, $this->manifest['menu_admin']);
193 193
 
194 194
     global $sn_mvc;
195
-    foreach($sn_mvc as $handler_type => &$handler_data) {
195
+    foreach ($sn_mvc as $handler_type => &$handler_data) {
196 196
       sn_sys_handler_add($handler_data, $this->manifest['mvc'][$handler_type], $this, $handler_type);
197 197
     }
198 198
 
199
-    if(isset($this->manifest['i18n']) && is_array($this->manifest['i18n']) && !empty($this->manifest['i18n'])) {
200
-      foreach($this->manifest['i18n'] as $i18n_page_name => &$i18n_file_list) {
201
-        foreach($i18n_file_list as &$i18n_file_data) {
202
-          if(is_array($i18n_file_data) && !$i18n_file_data['path']) {
199
+    if (isset($this->manifest['i18n']) && is_array($this->manifest['i18n']) && !empty($this->manifest['i18n'])) {
200
+      foreach ($this->manifest['i18n'] as $i18n_page_name => &$i18n_file_list) {
201
+        foreach ($i18n_file_list as &$i18n_file_data) {
202
+          if (is_array($i18n_file_data) && !$i18n_file_data['path']) {
203 203
             $i18n_file_data['path'] = $this->manifest['root_relative'];
204 204
           }
205 205
         }
206
-        if(!isset($sn_mvc['i18n'][$i18n_page_name])) {
206
+        if (!isset($sn_mvc['i18n'][$i18n_page_name])) {
207 207
           $sn_mvc['i18n'][$i18n_page_name] = array();
208 208
         }
209 209
         $sn_mvc['i18n'][$i18n_page_name] += $i18n_file_list;
210 210
       }
211 211
     }
212 212
 
213
-    if(!empty($this->manifest['javascript']) && is_array($this->manifest['javascript'])) {
214
-      foreach($this->manifest['javascript'] as $javascript_page_name => &$javascript_list) {
213
+    if (!empty($this->manifest['javascript']) && is_array($this->manifest['javascript'])) {
214
+      foreach ($this->manifest['javascript'] as $javascript_page_name => &$javascript_list) {
215 215
         !isset($sn_mvc['javascript'][$javascript_page_name]) ? $sn_mvc['javascript'][$javascript_page_name] = array() : false;
216
-        foreach($javascript_list as $script_name => &$script_content) {
216
+        foreach ($javascript_list as $script_name => &$script_content) {
217 217
           $sn_mvc['javascript'][$javascript_page_name][$script_name] = $script_content;
218 218
         }
219 219
       }
220 220
     }
221 221
 
222
-    if(!empty($this->manifest['css']) && is_array($this->manifest['css'])) {
223
-      foreach($this->manifest['css'] as $javascript_page_name => &$javascript_list) {
222
+    if (!empty($this->manifest['css']) && is_array($this->manifest['css'])) {
223
+      foreach ($this->manifest['css'] as $javascript_page_name => &$javascript_list) {
224 224
         !isset($sn_mvc['css'][$javascript_page_name]) ? $sn_mvc['css'][$javascript_page_name] = array() : false;
225
-        foreach($javascript_list as $script_name => &$script_content) {
225
+        foreach ($javascript_list as $script_name => &$script_content) {
226 226
           $sn_mvc['css'][$javascript_page_name][$script_name] = $script_content;
227 227
         }
228 228
       }
229 229
     }
230 230
 
231
-    if(!empty($this->manifest['navbar_prefix_button']) && is_array($this->manifest['navbar_prefix_button'])) {
232
-      foreach($this->manifest['navbar_prefix_button'] as $button_image => $button_url_relative) {
231
+    if (!empty($this->manifest['navbar_prefix_button']) && is_array($this->manifest['navbar_prefix_button'])) {
232
+      foreach ($this->manifest['navbar_prefix_button'] as $button_image => $button_url_relative) {
233 233
         $sn_mvc['navbar_prefix_button'][$button_image] = $button_url_relative;
234 234
       }
235 235
     }
236 236
 
237
-    if(!empty($this->manifest['navbar_main_button']) && is_array($this->manifest['navbar_main_button'])) {
238
-      foreach($this->manifest['navbar_main_button'] as $button_image => $button_url_relative) {
237
+    if (!empty($this->manifest['navbar_main_button']) && is_array($this->manifest['navbar_main_button'])) {
238
+      foreach ($this->manifest['navbar_main_button'] as $button_image => $button_url_relative) {
239 239
         $sn_mvc['navbar_main_button'][$button_image] = $button_url_relative;
240 240
       }
241 241
     }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
    */
252 252
   protected function __mvcRegisterPagesOld($pages) {
253 253
     !is_array($this->manifest['mvc']['pages']) ? $this->manifest['mvc']['pages'] = array() : false;
254
-    if(is_array($pages) && !empty($pages)) {
254
+    if (is_array($pages) && !empty($pages)) {
255 255
       $this->manifest['mvc']['pages'] = array_merge($this->manifest['mvc']['pages'], $pages);
256 256
     }
257 257
   }
Please login to merge, or discard this patch.
classes/AjaxController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     define('IN_AJAX', true);
23 23
 
24
-    if(!is_object($template)) {
24
+    if (!is_object($template)) {
25 25
       $template = gettemplate('_ajax', true);
26 26
     }
27 27
 
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 
38 38
     $mode = sys_get_param_str('mode');
39 39
 
40
-    if(class_exists($className = 'Pages\\Page' . ucfirst($mode))) {
40
+    if (class_exists($className = 'Pages\\Page' . ucfirst($mode))) {
41 41
       /**
42 42
        * @var \Pages\IPage $page
43 43
        */
44 44
       $page = new $className();
45
-      if(method_exists($page, 'loadParams')) {
45
+      if (method_exists($page, 'loadParams')) {
46 46
         $page->loadParams();
47 47
       }
48 48
 
49
-      if(method_exists($page, $action = sys_get_param('action')) && $page->checkAction($action)) {
49
+      if (method_exists($page, $action = sys_get_param('action')) && $page->checkAction($action)) {
50 50
         $result = $page->$action();
51 51
         is_array($result) ? HelperArray::merge($template_result['AJAX'], $result) : false;
52 52
       }
Please login to merge, or discard this patch.
classes/PTLTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     $this->raw = $stringTag;
50 50
 
51 51
     // Separating params - so there are will be no false-positives for template's variable names
52
-    if(strpos($this->raw, '|') !== false) {
52
+    if (strpos($this->raw, '|') !== false) {
53 53
       $this->params = explode('|', $this->raw);
54 54
       $this->resolved = $this->params[0];
55 55
       unset($this->params[0]);
Please login to merge, or discard this patch.
classes/Pages/PageQuest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
       QUEST_STATUS_COMPLETE => '',
32 32
     );
33 33
 
34
-    if(!isset($statuses[$this->filterQuestStatus])) {
34
+    if (!isset($statuses[$this->filterQuestStatus])) {
35 35
       $this->filterQuestStatus = QUEST_STATUS_ALL;
36 36
     }
37 37
   }
Please login to merge, or discard this patch.
classes/TextModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
       }
102 102
     }
103 103
 
104
-    if(!isset($next)) {
104
+    if (!isset($next)) {
105 105
       $next = new TextEntity();
106 106
     }
107 107
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
       $prev = $this->getById($currentText->prev);
120 120
     }
121 121
 
122
-    if(!isset($prev)) {
122
+    if (!isset($prev)) {
123 123
       $prev = new TextEntity();
124 124
     }
125 125
 
Please login to merge, or discard this patch.