Passed
Branch trunk (7dc288)
by SuperNova.WS
06:07
created
search.php 2 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 include('common.' . substr(strrchr(__FILE__, '.'), 1));
14 14
 
15
-if(classSupernova::$config->game_mode == GAME_BLITZ) {
15
+if (classSupernova::$config->game_mode == GAME_BLITZ) {
16 16
   messageBox($lang['sys_blitz_page_disabled'], $lang['sys_error'], 'overview.php', 10);
17 17
   die();
18 18
 }
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 $template = gettemplate('search', true);
27 27
 
28
-if($searchtext && $type)
28
+if ($searchtext && $type)
29 29
 {
30
-  switch($type)
30
+  switch ($type)
31 31
   {
32 32
     case "planetname":
33 33
       // $search = db_planet_list_search($searchtext);
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
     break;
44 44
   }
45 45
 
46
-  while($row = db_fetch($search))
46
+  while ($row = db_fetch($search))
47 47
   {
48
-    if($type=='playername' || $type=='planetname')
48
+    if ($type == 'playername' || $type == 'planetname')
49 49
     {
50 50
       $template->assign_block_vars('search_result', array(
51 51
         'PLAYER_ID' => $row['uid'],
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         'ALLY_TAG' => htmlentities($row['ally_tag'], ENT_COMPAT, 'UTF-8'),
63 63
       ));
64 64
     }
65
-    elseif($type=='ally')
65
+    elseif ($type == 'ally')
66 66
     {
67 67
       $template->assign_block_vars('search_result', array(
68 68
         'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
   'ally' => 'sys_alliance',
82 82
 );
83 83
 
84
-foreach($search_type as $type_id => $type_lang)
84
+foreach ($search_type as $type_id => $type_lang)
85 85
 {
86 86
   $template->assign_block_vars('type', array(
87 87
     'ID' => $type_id,
Please login to merge, or discard this patch.
quest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-define('INSIDE'  , true);
11
-define('INSTALL' , false);
10
+define('INSIDE', true);
11
+define('INSTALL', false);
12 12
 
13 13
 require('common.' . substr(strrchr(__FILE__, '.'), 1));
14 14
 
Please login to merge, or discard this patch.
simulator.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 include('common.' . substr(strrchr(__FILE__, '.'), 1));
4 4
 
5
-if(sys_get_param_int('BE_DEBUG') && !defined('BE_DEBUG'))
5
+if (sys_get_param_int('BE_DEBUG') && !defined('BE_DEBUG'))
6 6
 {
7 7
   define('BE_DEBUG', true);
8 8
 }
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 $sym_defender = $_POST['defender'] ? $_POST['defender'] : array();
16 16
 $sym_attacker = $_POST['attacker'] ? $_POST['attacker'] : array();
17 17
 
18
-if($replay)
18
+if ($replay)
19 19
 {
20 20
   $unpacked = sn_ube_simulator_decode_replay($replay);
21 21
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   $sym_attacker = array(1 => $sym_attacker);
29 29
 }
30 30
 
31
-if($_POST['submit'] || $execute)
31
+if ($_POST['submit'] || $execute)
32 32
 {
33 33
   $replay = sn_ube_simulator_encode_replay($sym_defender, 'D');
34 34
   $replay .= sn_ube_simulator_encode_replay($sym_attacker, 'A');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 //    sn_ube_report_save($combat_data);
43 43
 //  }
44 44
 
45
-  if(sys_get_param_str('reload'))
45
+  if (sys_get_param_str('reload'))
46 46
   {
47 47
     $combat_data = sn_ube_report_load($combat_data[UBE_REPORT_CYPHER]);
48 48
   }
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
   $template = gettemplate('simulator', true);
63 63
   $techs_and_officers = array(TECH_WEAPON, TECH_SHIELD, TECH_ARMOR, MRC_ADMIRAL);
64 64
 
65
-  foreach($techs_and_officers as $tech_id)
65
+  foreach ($techs_and_officers as $tech_id)
66 66
   {
67
-    if(!$sym_attacker[1][$tech_id])
67
+    if (!$sym_attacker[1][$tech_id])
68 68
     {
69 69
       $sym_attacker[1][$tech_id] = mrc_get_level($user, false, $tech_id);
70 70
     }
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
     UNIT_GOVERNORS => array(MRC_FORTIFIER),
79 79
     UNIT_DEFENCE => sn_get_groups('defense_active'),
80 80
   );
81
-  foreach($show_groups as $unit_group_id => $unit_group)
81
+  foreach ($show_groups as $unit_group_id => $unit_group)
82 82
   {
83 83
     $template->assign_block_vars('simulator', array(
84 84
       'GROUP' => $unit_group_id,
85 85
       'NAME' => $lang['tech'][$unit_group_id],
86 86
     ));
87 87
 
88
-    foreach($unit_group as $unit_id)
88
+    foreach ($unit_group as $unit_id)
89 89
     {
90 90
       $tab++;
91 91
 
Please login to merge, or discard this 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);
@@ -62,8 +61,7 @@  discard block
 block discarded – undo
62 61
   ));
63 62
 
64 63
   display($template);
65
-}
66
-else
64
+} else
67 65
 {
68 66
   $template = gettemplate('simulator', true);
69 67
   $techs_and_officers = array(TECH_WEAPON, TECH_SHIELD, TECH_ARMOR, MRC_ADMIRAL);
Please login to merge, or discard this patch.
login.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 include('includes/init.' . substr(strrchr(__FILE__, '.'), 1));
17 17
 // die();
18
-if($template_result[F_USER_IS_AUTHORIZED]) {
18
+if ($template_result[F_USER_IS_AUTHORIZED]) {
19 19
   sys_redirect('index' . DOT_PHP_EX);
20 20
 }
21 21
 lng_include('login');
Please login to merge, or discard this patch.
market.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 $newstock = $stock;
27 27
 $intError = MARKET_DEAL;
28 28
 
29
-switch($mode)
29
+switch ($mode)
30 30
 {
31 31
   case MARKET_RESOURCES: // Resource trader
32 32
     require('includes/includes/market_trader.inc');
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
 }
83 83
 
84 84
 $message_id = sys_get_param_int('message');
85
-if($message_id != MARKET_NOTHING)
85
+if ($message_id != MARKET_NOTHING)
86 86
 {
87 87
   $template->assign_block_vars('result', array('MESSAGE' => $lang['eco_mrk_errors'][$message_id]));
88 88
 }
89 89
 
90
-if($message)
90
+if ($message)
91 91
 {
92 92
   $template->assign_block_vars('result', array('MESSAGE' => $message));
93 93
 }
Please login to merge, or discard this patch.
metamatter.php 2 patches
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.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 include_once('common.' . substr(strrchr(__FILE__, '.'), 1));
10 10
 
11
-if(!sn_module::sn_module_get_active_count('payment')) {
11
+if (!sn_module::sn_module_get_active_count('payment')) {
12 12
   sys_redirect('dark_matter.php');
13 13
   die();
14 14
 }
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // $player_currency_default = player_load_option($user, PLAYER_OPTION_CURRENCY_DEFAULT);
24 24
 $player_currency_default = classSupernova::$user_options[PLAYER_OPTION_CURRENCY_DEFAULT];
25 25
 $player_currency = sys_get_param_str('player_currency', $player_currency_default);
26
-empty(classSupernova::$lang['pay_currency_list'][$player_currency]) ? ($player_currency =  $player_currency_default ? $player_currency_default : classSupernova::$config->payment_currency_default) : false;
26
+empty(classSupernova::$lang['pay_currency_list'][$player_currency]) ? ($player_currency = $player_currency_default ? $player_currency_default : classSupernova::$config->payment_currency_default) : false;
27 27
 // $player_currency_default != $player_currency ? player_save_option($user, PLAYER_OPTION_CURRENCY_DEFAULT, $player_currency) : false;
28 28
 $player_currency_default != $player_currency ? classSupernova::$user_options[PLAYER_OPTION_CURRENCY_DEFAULT] = $player_currency : false;
29 29
 
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
 // Таблица скидок
67 67
 $prev_discount = 0;
68
-if(isset(sn_module_payment::$bonus_table) && is_array(sn_module_payment::$bonus_table)) {
69
-  foreach(sn_module_payment::$bonus_table as $sum => $discount) {
70
-    if($discount && $discount != $prev_discount) {
68
+if (isset(sn_module_payment::$bonus_table) && is_array(sn_module_payment::$bonus_table)) {
69
+  foreach (sn_module_payment::$bonus_table as $sum => $discount) {
70
+    if ($discount && $discount != $prev_discount) {
71 71
       $template->assign_block_vars('discount', array(
72 72
         'SUM' => $sum,
73 73
         'DISCOUNT' => $discount * 100,
@@ -80,19 +80,19 @@  discard block
 block discarded – undo
80 80
 }
81 81
 
82 82
 // Результат платежа
83
-if($payment_id = sys_get_param_id('payment_id')) {
83
+if ($payment_id = sys_get_param_id('payment_id')) {
84 84
   $payment = doquery("SELECT * FROM {{payment}} WHERE `payment_id` = {$payment_id} LIMIT 1;", true);
85
-  if($payment && $payment['payment_user_id'] == $user['id']) {
86
-    if($payment['payment_status'] == PAYMENT_STATUS_COMPLETE) {
85
+  if ($payment && $payment['payment_user_id'] == $user['id']) {
86
+    if ($payment['payment_status'] == PAYMENT_STATUS_COMPLETE) {
87 87
       $template->assign_block_vars('result', array('MESSAGE' => sprintf(classSupernova::$lang['pay_msg_mm_purchase_complete'], $payment['payment_dark_matter_paid'], $payment['payment_module_name'], $payment['payment_dark_matter_gained'])));
88 88
     }
89
-    if($payment['payment_status'] == PAYMENT_STATUS_NONE) {
89
+    if ($payment['payment_status'] == PAYMENT_STATUS_NONE) {
90 90
       $template->assign_block_vars('result', array(
91 91
         'MESSAGE' => sprintf(classSupernova::$lang['pay_msg_mm_purchase_incomplete'], $payment['payment_dark_matter_paid'], $payment['payment_module_name']),
92 92
         'STATUS' => 1,
93 93
       ));
94 94
     }
95
-    if($payment['payment_test']) {
95
+    if ($payment['payment_test']) {
96 96
       $template->assign_block_vars('result', array(
97 97
         'MESSAGE' => sprintf(classSupernova::$lang['pay_msg_mm_purchase_test']),
98 98
         'STATUS' => -1,
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
   'metamatter' => sys_get_param_float('metamatter'),
108 108
 );
109 109
 
110
-if(!$request['metamatter']) {
110
+if (!$request['metamatter']) {
111 111
   unset($_POST);
112 112
 }
113 113
 
@@ -118,16 +118,16 @@  discard block
 block discarded – undo
118 118
 
119 119
 $payment_module_valid = false;
120 120
 $payment_module = sys_get_param_str('payment_module');
121
-foreach($sn_module_list['payment'] as $module_name => $module) {
122
-  if(!is_object($module) || !$module->manifest['active']) {
121
+foreach ($sn_module_list['payment'] as $module_name => $module) {
122
+  if (!is_object($module) || !$module->manifest['active']) {
123 123
     continue;
124 124
   }
125 125
 
126 126
   lng_include($module_name, $module->manifest['root_relative']);
127 127
 
128
-  foreach(sn_module_payment::$payment_methods as $payment_type_id => $available_methods) {
129
-    foreach($available_methods as $payment_method => $payment_currency) {
130
-      if(isset($module->manifest['payment_method'][$payment_method])) {
128
+  foreach (sn_module_payment::$payment_methods as $payment_type_id => $available_methods) {
129
+    foreach ($available_methods as $payment_method => $payment_currency) {
130
+      if (isset($module->manifest['payment_method'][$payment_method])) {
131 131
         $payment_methods_available[$payment_type_id][$payment_method][$module_name] = $module->manifest['payment_method'][$payment_method];
132 132
       }
133 133
     }
@@ -138,15 +138,15 @@  discard block
 block discarded – undo
138 138
 
139 139
 global $template_result;
140 140
 // Доступные платежные методы
141
-foreach($payment_methods_available as $payment_type_id => $payment_methods) {
142
-  if(empty($payment_methods)) continue;
141
+foreach ($payment_methods_available as $payment_type_id => $payment_methods) {
142
+  if (empty($payment_methods)) continue;
143 143
 
144
-  $template_result['.']['payment'][$payment_type_id] =array(
144
+  $template_result['.']['payment'][$payment_type_id] = array(
145 145
     'ID' => $payment_type_id,
146 146
     'NAME' => classSupernova::$lang['pay_methods'][$payment_type_id],
147 147
   );
148
-  foreach($payment_methods as $payment_method_id => $module_list) {
149
-    if(empty($module_list)) {
148
+  foreach ($payment_methods as $payment_method_id => $module_list) {
149
+    if (empty($module_list)) {
150 150
       continue;
151 151
     }
152 152
     $template_result['.']['payment'][$payment_type_id]['.']['method'][$payment_method_id] = array(
@@ -157,14 +157,14 @@  discard block
 block discarded – undo
157 157
       'NAME_FORCE' => isset(sn_module_payment::$payment_methods[$payment_type_id][$payment_method_id]['name']),
158 158
       'BUTTON'     => isset(sn_module_payment::$payment_methods[$payment_type_id][$payment_method_id]['button']),
159 159
     );
160
-    foreach($module_list as $payment_module_name => $payment_module_method_details) {
160
+    foreach ($module_list as $payment_module_name => $payment_module_method_details) {
161 161
       $template_result['.']['payment'][$payment_type_id]['.']['method'][$payment_method_id]['.']['module'][] = array(
162 162
         'MODULE' => $payment_module_name,
163 163
       );
164 164
     }
165 165
   }
166 166
 
167
-  if(empty($template_result['.']['payment'][$payment_type_id]['.'])) {
167
+  if (empty($template_result['.']['payment'][$payment_type_id]['.'])) {
168 168
     unset($template_result['.']['payment'][$payment_type_id]);
169 169
   }
170 170
 }
@@ -177,19 +177,19 @@  discard block
 block discarded – undo
177 177
 $payment_module_valid = $payment_module_valid && (!$payment_method_selected || isset($payment_methods_available[$payment_type_selected][$payment_method_selected][$module_name]));
178 178
 
179 179
 // If payment_module invalid - making it empty OR if there is only one payment_module - selecting it
180
-if($payment_module_valid) {
180
+if ($payment_module_valid) {
181 181
   // $payment_module = $payment_module; // Really - do nothing
182
-} elseif($payment_type_selected && count($payment_methods_available[$payment_type_selected][$payment_method_selected]) == 1) {
182
+} elseif ($payment_type_selected && count($payment_methods_available[$payment_type_selected][$payment_method_selected]) == 1) {
183 183
   reset($payment_methods_available[$payment_type_selected][$payment_method_selected]);
184 184
   $payment_module = key($payment_methods_available[$payment_type_selected][$payment_method_selected]);
185
-} elseif(count($sn_module_list['payment']) == 1) {
185
+} elseif (count($sn_module_list['payment']) == 1) {
186 186
   $payment_module = $module_name;
187 187
 } else {
188 188
   $payment_module = '';
189 189
 }
190 190
 
191
-if($payment_type_selected && $payment_method_selected) {
192
-  foreach($payment_methods_available[$payment_type_selected][$payment_method_selected] as $module_name => $temp) {
191
+if ($payment_type_selected && $payment_method_selected) {
192
+  foreach ($payment_methods_available[$payment_type_selected][$payment_method_selected] as $module_name => $temp) {
193 193
     $template->assign_block_vars('payment_module', array(
194 194
       'ID' => $module_name,
195 195
       'NAME' => classSupernova::$lang["module_{$module_name}_name"],
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
   }
199 199
 }
200 200
 
201
-foreach(classSupernova::$lang['pay_currency_list'] as $key => $value) {
201
+foreach (classSupernova::$lang['pay_currency_list'] as $key => $value) {
202 202
   $course = get_exchange_rate($key);
203
-  if(!$course) {
203
+  if (!$course) {
204 204
     continue;
205 205
   }
206 206
   $template->assign_block_vars('exchange', array(
@@ -214,17 +214,17 @@  discard block
 block discarded – undo
214 214
   ));
215 215
 }
216 216
 
217
-if($request['metamatter'] && $payment_module) {
217
+if ($request['metamatter'] && $payment_module) {
218 218
   try {
219 219
     // Any possible errors about generating paylink should be raised in module!
220 220
     $pay_link = $sn_module[$payment_module]->compile_request($request);
221 221
 
222 222
     // Поддержка дополнительной информации
223
-    if(is_array($pay_link['RENDER'])) {
224
-      foreach($pay_link['RENDER'] as $html_data) {
223
+    if (is_array($pay_link['RENDER'])) {
224
+      foreach ($pay_link['RENDER'] as $html_data) {
225 225
         $template->assign_block_vars('render', $html_data);
226
-        if(isset($html_data['VALUE']) && is_array($html_data['VALUE'])) {
227
-          foreach($html_data['VALUE'] as $value_id => $value_value) {
226
+        if (isset($html_data['VALUE']) && is_array($html_data['VALUE'])) {
227
+          foreach ($html_data['VALUE'] as $value_id => $value_value) {
228 228
             $template->assign_block_vars('render.value', array(
229 229
               'FIELD' => $value_id,
230 230
               'VALUE' => $value_value,
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
     }
236 236
 
237 237
     // Поддержка передачи данных для многошаговых платежных систем
238
-    if(is_array($pay_link['DATA'])) {
239
-      foreach($pay_link['DATA'] as $key => $value) {
238
+    if (is_array($pay_link['DATA'])) {
239
+      foreach ($pay_link['DATA'] as $key => $value) {
240 240
         $template->assign_block_vars('pay_link_data', array(
241 241
           'FIELD' => $key,
242 242
           'VALUE' => $value,
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
       }
245 245
     }
246 246
 
247
-    if(is_array($pay_link) && in_array($pay_link['PAY_LINK_METHOD'], array('POST', 'GET', 'LINK', 'STEP'))) {
247
+    if (is_array($pay_link) && in_array($pay_link['PAY_LINK_METHOD'], array('POST', 'GET', 'LINK', 'STEP'))) {
248 248
       // TODO Переделать это под assign_vars_recursive и возвращать пустые строки если нет платежного метода - для унификации формы в темплейте
249 249
       $template->assign_vars(array(
250 250
         'PAY_LINK_METHOD' => $pay_link['PAY_LINK_METHOD'],
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     } else {
254 254
       throw new exception(classSupernova::$lang['pay_msg_request_paylink_unsupported'], ERR_ERROR);
255 255
     }
256
-  } catch(exception $e) {
256
+  } catch (exception $e) {
257 257
     $template->assign_block_vars('result', $response = array(
258 258
       'STATUS'  => $e->getCode(),
259 259
       'MESSAGE' => $e->getMessage(),
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 }
264 264
 
265 265
 // Прегенерированные пакеты
266
-foreach($unit_available_amount_list as $unit_amount => $discount) {
266
+foreach ($unit_available_amount_list as $unit_amount => $discount) {
267 267
   $temp = sn_module_payment::currency_convert($unit_amount, 'MM_', $player_currency);
268 268
   $template->assign_block_vars('mm_amount', array(
269 269
     'VALUE' => $unit_amount,
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
   'PLAYER_CURRENCY' => $player_currency,
299 299
   'PLAYER_CURRENCY_PRICE_PER_MM' => sn_module_payment::currency_convert(1, $player_currency, 'MM_', 10),
300 300
 
301
-  'UNIT_AMOUNT' => (float)$request['metamatter'],
301
+  'UNIT_AMOUNT' => (float) $request['metamatter'],
302 302
   'UNIT_AMOUNT_TEXT' => HelperString::numberFloorAndFormat($request['metamatter']),
303 303
   'UNIT_AMOUNT_BONUS_PERCENT' => $bonus_percent,
304 304
   'UNIT_AMOUNT_TEXT_DISCOUNTED' => $income_metamatter_text,
Please login to merge, or discard this patch.
classes/auth_abstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
    */
36 36
   // OK 4.9
37 37
   public function __construct($filename = __FILE__) {
38
-    if($this->provider_id == ACCOUNT_PROVIDER_NONE) {
38
+    if ($this->provider_id == ACCOUNT_PROVIDER_NONE) {
39 39
       die('У всех провайдеров должен быть $provider_id!');
40 40
     }
41 41
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
   // OK 4.6
134 134
   public function player_name_suggest() {
135 135
     $name = '';
136
-    if(is_object($this->account) && !empty($this->account->account_email)) {
136
+    if (is_object($this->account) && !empty($this->account->account_email)) {
137 137
       list($name) = explode('@', $this->account->account_email);
138 138
     }
139 139
 
Please login to merge, or discard this patch.
classes/Confirmation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
       // $query = static::$db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' AND `type` = {$confirmation_type_safe} FOR UPDATE", true);
42 42
       // Тип не нужен для проверки - код подтверждения должен быть уникален от слова "совсем"
43 43
       $query = $this->db->doquery("SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' FOR UPDATE", true);
44
-    } while($query);
44
+    } while ($query);
45 45
 
46 46
     $this->db->doquery(
47 47
       "REPLACE INTO {{confirmations}}
Please login to merge, or discard this patch.
classes/Pimple/Container.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@
 block discarded – undo
239 239
 
240 240
         $factory = $this->values[$id];
241 241
 
242
-        $extended = function ($c) use ($callable, $factory) {
242
+        $extended = function($c) use ($callable, $factory) {
243 243
             return $callable($factory($c), $c);
244 244
         };
245 245
 
Please login to merge, or discard this 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.