Test Failed
Branch trunk (d809b8)
by SuperNova.WS
05:48
created
search.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
         'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'),
62 62
         'ALLY_TAG' => htmlentities($row['ally_tag'], ENT_COMPAT, 'UTF-8'),
63 63
       ));
64
-    }
65
-    elseif($type=='ally')
64
+    } elseif($type=='ally')
66 65
     {
67 66
       $template->assign_block_vars('search_result', array(
68 67
         'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'),
Please login to merge, or discard this patch.
alliance.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
25 25
   if($user_request['id_user'])
26 26
   {
27 27
     require('includes/alliance/ali_external_request.inc');
28
-  }
29
-  else
28
+  } else
30 29
   {
31 30
     switch($mode)
32 31
     {
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.
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.
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.
classes/Pimple/Container.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
  *
32 32
  * @author  Fabien Potencier
33 33
  */
34
-class Container implements \ArrayAccess
35
-{
34
+class Container implements \ArrayAccess {
36 35
     private $values = array();
37 36
     private $factories;
38 37
     private $protected;
@@ -47,8 +46,7 @@  discard block
 block discarded – undo
47 46
      *
48 47
      * @param array $values The parameters or objects.
49 48
      */
50
-    public function __construct(array $values = array())
51
-    {
49
+    public function __construct(array $values = array()) {
52 50
         $this->factories = new \SplObjectStorage();
53 51
         $this->protected = new \SplObjectStorage();
54 52
 
@@ -71,8 +69,7 @@  discard block
 block discarded – undo
71 69
      *
72 70
      * @throws \RuntimeException Prevent override of a frozen service
73 71
      */
74
-    public function offsetSet($id, $value)
75
-    {
72
+    public function offsetSet($id, $value) {
76 73
         if (isset($this->frozen[$id])) {
77 74
             throw new \RuntimeException(sprintf('Cannot override frozen service "%s".', $id));
78 75
         }
@@ -90,8 +87,7 @@  discard block
 block discarded – undo
90 87
      *
91 88
      * @throws \InvalidArgumentException if the identifier is not defined
92 89
      */
93
-    public function offsetGet($id)
94
-    {
90
+    public function offsetGet($id) {
95 91
         if (!isset($this->keys[$id])) {
96 92
             throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
97 93
         }
@@ -125,8 +121,7 @@  discard block
 block discarded – undo
125 121
      *
126 122
      * @return bool
127 123
      */
128
-    public function offsetExists($id)
129
-    {
124
+    public function offsetExists($id) {
130 125
         return isset($this->keys[$id]);
131 126
     }
132 127
 
@@ -135,8 +130,7 @@  discard block
 block discarded – undo
135 130
      *
136 131
      * @param string $id The unique identifier for the parameter or object
137 132
      */
138
-    public function offsetUnset($id)
139
-    {
133
+    public function offsetUnset($id) {
140 134
         if (isset($this->keys[$id])) {
141 135
             if (is_object($this->values[$id])) {
142 136
                 unset($this->factories[$this->values[$id]], $this->protected[$this->values[$id]]);
@@ -155,8 +149,7 @@  discard block
 block discarded – undo
155 149
      *
156 150
      * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object
157 151
      */
158
-    public function factory($callable)
159
-    {
152
+    public function factory($callable) {
160 153
         if (!method_exists($callable, '__invoke')) {
161 154
             throw new \InvalidArgumentException('Service definition is not a Closure or invokable object.');
162 155
         }
@@ -177,8 +170,7 @@  discard block
 block discarded – undo
177 170
      *
178 171
      * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object
179 172
      */
180
-    public function protect($callable)
181
-    {
173
+    public function protect($callable) {
182 174
         if (!method_exists($callable, '__invoke')) {
183 175
             throw new \InvalidArgumentException('Callable is not a Closure or invokable object.');
184 176
         }
@@ -197,8 +189,7 @@  discard block
 block discarded – undo
197 189
      *
198 190
      * @throws \InvalidArgumentException if the identifier is not defined
199 191
      */
200
-    public function raw($id)
201
-    {
192
+    public function raw($id) {
202 193
         if (!isset($this->keys[$id])) {
203 194
             throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
204 195
         }
@@ -223,8 +214,7 @@  discard block
 block discarded – undo
223 214
      *
224 215
      * @throws \InvalidArgumentException if the identifier is not defined or not a service definition
225 216
      */
226
-    public function extend($id, $callable)
227
-    {
217
+    public function extend($id, $callable) {
228 218
         if (!isset($this->keys[$id])) {
229 219
             throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
230 220
         }
@@ -256,8 +246,7 @@  discard block
 block discarded – undo
256 246
      *
257 247
      * @return array An array of value names
258 248
      */
259
-    public function keys()
260
-    {
249
+    public function keys() {
261 250
         return array_keys($this->values);
262 251
     }
263 252
 
@@ -269,8 +258,7 @@  discard block
 block discarded – undo
269 258
      *
270 259
      * @return static
271 260
      */
272
-    public function register(ServiceProviderInterface $provider, array $values = array())
273
-    {
261
+    public function register(ServiceProviderInterface $provider, array $values = array()) {
274 262
         $provider->register($this);
275 263
 
276 264
         foreach ($values as $key => $value) {
Please login to merge, or discard this patch.
language/en/menu.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 
32 34
 $a_lang_array = (array(
Please login to merge, or discard this patch.
language/en/buildings.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 
32 34
 $a_lang_array = (array(
Please login to merge, or discard this patch.