Completed
Branch trunk (230097)
by SuperNova.WS
32:07
created
ajax_version_check.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,12 +41,10 @@
 block discarded – undo
41 41
 if(!$check_result)
42 42
 {
43 43
   $version_check = SNC_VER_ERROR_CONNECT;
44
-}
45
-elseif(($version_check = intval($check_result)) && $version_check == $check_result)
44
+} elseif(($version_check = intval($check_result)) && $version_check == $check_result)
46 45
 {
47 46
   $version_check = $check_result;
48
-}
49
-else
47
+} else
50 48
 {
51 49
   // JSON decode if string
52 50
   $check_result = json_decode($check_result, true);
Please login to merge, or discard this patch.
jumpgate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,8 +115,7 @@
 block discarded – undo
115 115
     ));
116 116
 
117 117
     display($template, $lang['tech'][STRUC_MOON_GATE]);
118
-  }
119
-  else
118
+  } else
120 119
   {
121 120
     message($lang['gate_no_src_ga'], $lang['tech'][STRUC_MOON_GATE], "overview.php", 10);
122 121
   }
Please login to merge, or discard this patch.
buddy.php 1 patch
Braces   +12 added lines, -11 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
             sprintf($lang['buddy_msg_accept_text'], $user['username']));
57 57
           sn_db_transaction_commit();
58 58
           throw new exception('buddy_err_accept_none', ERR_NONE);
59
-        }
60
-        else
59
+        } else
61 60
         {
62 61
           throw new exception('buddy_err_accept_internal', ERR_ERROR);
63 62
         }
@@ -69,9 +68,11 @@  discard block
 block discarded – undo
69 68
           throw new exception('buddy_err_delete_alien', ERR_ERROR);
70 69
         }
71 70
 
72
-        if($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE) // Existing friendship
71
+        if($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE) {
72
+          // 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 76
 
76 77
           msg_send_simple_message($ex_friend_id, $user['id'], SN_TIME_NOW, MSG_TYPE_PLAYER, $user['username'], $lang['buddy_msg_unfriend_title'],
77 78
             sprintf($lang['buddy_msg_unfriend_text'], $user['username']));
@@ -79,17 +80,19 @@  discard block
 block discarded – undo
79 80
           doquery("DELETE FROM {{buddy}} WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
80 81
           sn_db_transaction_commit();
81 82
           throw new exception('buddy_err_unfriend_none', ERR_NONE);
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']) {
84
+          // Player's outcoming request - either denied or waiting
84 85
         {
85 86
           doquery("DELETE FROM {{buddy}} WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
87
+        }
86 88
           sn_db_transaction_commit();
87 89
           throw new exception('buddy_err_delete_own', ERR_NONE);
88
-        }
89
-        elseif($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_WAITING) // Deny incoming request
90
+        } elseif($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_WAITING) {
91
+          // Deny incoming request
90 92
         {
91 93
           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 94
             sprintf($lang['buddy_msg_deny_text'], $user['username']));
95
+        }
93 96
 
94 97
           doquery("UPDATE {{buddy}} SET `BUDDY_STATUS` = " . BUDDY_REQUEST_DENIED . " WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
95 98
           sn_db_transaction_commit();
@@ -104,8 +107,7 @@  discard block
 block discarded – undo
104 107
   if($new_friend_id = sys_get_param_id('request_user_id'))
105 108
   {
106 109
     $new_friend_row = db_user_by_id($new_friend_id, true, '`id`, `username`');
107
-  }
108
-  elseif($new_friend_name = sys_get_param_str_unsafe('request_user_name'))
110
+  } elseif($new_friend_name = sys_get_param_str_unsafe('request_user_name'))
109 111
   {
110 112
     $new_friend_row = db_user_by_username($new_friend_name, true, '`id`, `username`');
111 113
     $new_friend_name = db_escape($new_friend_name);
@@ -138,8 +140,7 @@  discard block
 block discarded – undo
138 140
     sn_db_transaction_commit();
139 141
     throw new exception('buddy_err_adding_none', ERR_NONE);
140 142
   }
141
-}
142
-catch(exception $e)
143
+} catch(exception $e)
143 144
 {
144 145
   $result[] = array(
145 146
     'STATUS'  => in_array($e->getCode(), array(ERR_NONE, ERR_WARNING, ERR_ERROR)) ? $e->getCode() : ERR_ERROR,
Please login to merge, or discard this patch.
simulator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
   $sym_defender = $unpacked['D'];
23 23
   $sym_attacker = $unpacked['A'];
24
-}
25
-else
24
+} else
26 25
 {
27 26
   $sym_defender = array(0 => $sym_defender);
28 27
   $sym_attacker = array(1 => $sym_attacker);
@@ -56,8 +55,7 @@  discard block
 block discarded – undo
56 55
   $template = gettemplate('ube_combat_report', true);
57 56
   $template->assign_recursive($template_result);
58 57
   display($template, '', false, '', false, false, true);
59
-}
60
-else
58
+} else
61 59
 {
62 60
   $template = gettemplate('simulator', true);
63 61
   $techs_and_officers = array(TECH_WEAPON, TECH_SHIELD, TECH_ARMOR, MRC_ADMIRAL);
Please login to merge, or discard this patch.
annonce.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
     {
58 58
       doquery("INSERT INTO {{annonce}} SET `user` ='{$users['username']}', `galaxie` ='{$users['galaxy']}', `systeme` ='{$users['system']}', `metala` ='{$metalvendre}', `cristala` ='{$cristalvendre}', `deuta` ='{$deutvendre}', `metals` ='{$metalsouhait}', `cristals` ='{$cristalsouhait}', `deuts` ='{$deutsouhait}'");
59 59
       message ($lang['Your_announce_was_recorded'], $lang['announce_status'],"annonce.php");
60
-    }
61
-    else
60
+    } else
62 61
     {
63 62
       message ($lang['Your_announce_not_recorded'], $lang['announce_status'],"annonce.php?action=1");
64 63
     }
Please login to merge, or discard this patch.
metamatter.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,9 @@
 block discarded – undo
140 140
 global $template_result;
141 141
 // Доступные платежные методы
142 142
 foreach($payment_methods_available as $payment_type_id => $payment_methods) {
143
-  if(empty($payment_methods)) continue;
143
+  if(empty($payment_methods)) {
144
+    continue;
145
+  }
144 146
 
145 147
   $template_result['.']['payment'][$payment_type_id] =array(
146 148
     'ID' => $payment_type_id,
Please login to merge, or discard this patch.
docs/txt2html.php 1 patch
Braces   +26 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,8 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function dump($value,$varname = "",$level=0,$dumper = "")
4
-{
5
-  if ($varname) $varname .= " = ";
3
+function dump($value,$varname = "",$level=0,$dumper = "") {
4
+  if ($varname) {
5
+    $varname .= " = ";
6
+  }
6 7
 
7 8
   if ($level==-1)
8 9
   {
@@ -13,7 +14,9 @@  discard block
 block discarded – undo
13 14
     $trans["\0"]='&oplus;';
14 15
     return strtr(htmlspecialchars($value),$trans);
15 16
   }
16
-  if ($level==0) $dumper = '<pre>' . $varname;
17
+  if ($level==0) {
18
+    $dumper = '<pre>' . $varname;
19
+  }
17 20
 
18 21
   $type = gettype($value);
19 22
   $dumper .= $type;
@@ -22,9 +25,9 @@  discard block
 block discarded – undo
22 25
   {
23 26
     $dumper .= '('.strlen($value).')';
24 27
     $value = dump($value,"",-1);
25
-  }
26
-  elseif ($type=='boolean') $value= ($value?'true':'false');
27
-  elseif ($type=='object')
28
+  } elseif ($type=='boolean') {
29
+    $value= ($value?'true':'false');
30
+  } elseif ($type=='object')
28 31
   {
29 32
     $props= get_class_vars(get_class($value));
30 33
     $dumper .= '('.count($props).') <u>'.get_class($value).'</u>';
@@ -34,8 +37,7 @@  discard block
 block discarded – undo
34 37
       $dumper .= dump($value->$key,"",$level+1);
35 38
     }
36 39
     $value= '';
37
-  }
38
-  elseif ($type=='array')
40
+  } elseif ($type=='array')
39 41
   {
40 42
     $dumper .= '('.count($value).')';
41 43
     foreach($value as $key=>$val)
@@ -46,22 +48,21 @@  discard block
 block discarded – undo
46 48
     $value= '';
47 49
   }
48 50
   $dumper .= " <b>$value</b>";
49
-  if ($level==0) $dumper .= '</pre>';
51
+  if ($level==0) {
52
+    $dumper .= '</pre>';
53
+  }
50 54
   return $dumper;
51 55
 }
52 56
 
53
-function pdump($value, $varname = '')
54
-{
57
+function pdump($value, $varname = '') {
55 58
   print('<span style="text-align: left">' . dump($value, $varname) . '</span>');
56 59
 }
57 60
 
58
-function debug($value, $varname = '')
59
-{
61
+function debug($value, $varname = '') {
60 62
   return pdump($value, $varname);
61 63
 }
62 64
 
63
-function buf_print($string)
64
-{
65
+function buf_print($string) {
65 66
   global $output_buffer;
66 67
 
67 68
   $output_buffer .= $string;
@@ -70,8 +71,7 @@  discard block
 block discarded – undo
70 71
 if(substr(getcwd(), -4) != 'docs')
71 72
 {
72 73
   $path_prefix = 'docs/';
73
-}
74
-else
74
+} else
75 75
 {
76 76
   $path_prefix = '';
77 77
 }
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
       $buffer['name'] = $chapter[0];
120 120
     }
121 121
     $prev_chapter_is_header = true;
122
-  }
123
-  else
122
+  } else
124 123
   {
125 124
     $prev_chapter_is_header = false;
126 125
     foreach($chapter as &$note)
@@ -150,8 +149,7 @@  discard block
 block discarded – undo
150 149
           if(!isset($note_out['name']))
151 150
           {
152 151
             $note_out['name'] = $buf_str;
153
-          }
154
-          else
152
+          } else
155 153
           {
156 154
             $note_out['lines'][] = $buf_str;
157 155
           }
@@ -228,36 +226,31 @@  discard block
 block discarded – undo
228 226
             if($matches[2])
229 227
             {
230 228
               buf_print("<ol>\r\n");
231
-            }
232
-            else
229
+            } else
233 230
             {
234 231
               buf_print("<ul>\r\n");
235 232
             }
236 233
             buf_print('<li>');
237 234
             $last_spaces = $matches[1];
238 235
             $depth[] = $matches[2];
239
-          }
240
-          elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth))
236
+          } elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth))
241 237
           {
242 238
             if(array_pop($depth))
243 239
             {
244 240
               buf_print("</ol>\r\n");
245
-            }
246
-            else
241
+            } else
247 242
             {
248 243
               buf_print("</ul>\r\n");
249 244
             }
250 245
             $last_spaces = $matches[1];
251 246
             buf_print('<li>');
252
-          }
253
-          elseif(strlen($last_spaces) == strlen($matches[1]))
247
+          } elseif(strlen($last_spaces) == strlen($matches[1]))
254 248
           {
255 249
             if($matches[2] == '' && $depth[count($depth) - 1] != '')
256 250
             {
257 251
               buf_print("</ol>\r\n");
258 252
               buf_print("<ul>\r\n");
259
-            }
260
-            elseif($matches[2] != '' && $depth[count($depth) - 1] == '')
253
+            } elseif($matches[2] != '' && $depth[count($depth) - 1] == '')
261 254
             {
262 255
               buf_print("</ul>\r\n");
263 256
               buf_print("<ol>\r\n");
@@ -274,8 +267,7 @@  discard block
 block discarded – undo
274 267
         if(array_pop($depth))
275 268
         {
276 269
           buf_print("</ol>\r\n");
277
-        }
278
-        else
270
+        } else
279 271
         {
280 272
           buf_print("</ul>\r\n");
281 273
         }
Please login to merge, or discard this patch.
includes/functions/sys_bbcode.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,7 +131,6 @@
 block discarded – undo
131 131
 //  return cht_message_parse($text, $escaped, $author_auth);
132 132
 }
133 133
 
134
-function sys_bbcodeUnParse($text, $escaped = false, $author_auth = 0)
135
-{
134
+function sys_bbcodeUnParse($text, $escaped = false, $author_auth = 0) {
136 135
   return str_replace('<br />', $escaped ? '\r\n' : "\r\n", $text);
137 136
 }
Please login to merge, or discard this patch.
classes/Pimple/ServiceProviderInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
  * @author  Fabien Potencier
33 33
  * @author  Dominik Zogg
34 34
  */
35
-interface ServiceProviderInterface
36
-{
35
+interface ServiceProviderInterface {
37 36
     /**
38 37
      * Registers services on the given container.
39 38
      *
Please login to merge, or discard this patch.