@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | $this->secret_word = SN::$sn_secret_word; |
93 | 93 | |
94 | 94 | $snTableNames = $this->db->schema()->getSnTables(); |
95 | - foreach($this->table_check as $table_name) { |
|
96 | - if(empty($snTableNames[$table_name])) { |
|
95 | + foreach ($this->table_check as $table_name) { |
|
96 | + if (empty($snTableNames[$table_name])) { |
|
97 | 97 | die('Если вы видите это сообщение первый раз после обновления релиза - просто перегрузите страницу.<br /> |
98 | 98 | В противном случае - сообщите Администрации сервера об ошибке.<br/> |
99 | 99 | Не хватает таблицы для работы системы авторизации: ' . $table_name); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | // OK v4.6 |
119 | 119 | public function password_change($old_password_unsafe, $new_password_unsafe, $salt_unsafe = null) { |
120 | - if(!$this->password_check($old_password_unsafe)) { |
|
120 | + if (!$this->password_check($old_password_unsafe)) { |
|
121 | 121 | return false; |
122 | 122 | } |
123 | 123 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | // OK v4.5 |
139 | 139 | public function assign_from_db_row($row) { |
140 | 140 | $this->reset(); |
141 | - if(empty($row) || !is_array($row)) { |
|
141 | + if (empty($row) || !is_array($row)) { |
|
142 | 142 | return false; |
143 | 143 | } |
144 | 144 | $this->account_id = $row['account_id']; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $this->reset(); |
204 | 204 | |
205 | 205 | $email_safe = $this->db->db_escape($email_unsafe); |
206 | - if($email_safe) { |
|
206 | + if ($email_safe) { |
|
207 | 207 | $account_row = $this->db->doQueryAndFetch("SELECT * FROM `{{account}}` WHERE LOWER(`account_email`) = LOWER('{$email_safe}') FOR UPDATE;"); |
208 | 208 | |
209 | 209 | return $this->assign_from_db_row($account_row); |
@@ -283,11 +283,11 @@ discard block |
||
283 | 283 | `account_email` = LOWER('{$email_safe}'), |
284 | 284 | `account_language` = '{$language_safe}'" |
285 | 285 | ); |
286 | - if(!$result) { |
|
286 | + if (!$result) { |
|
287 | 287 | throw new Exception(REGISTER_ERROR_ACCOUNT_CREATE, ERR_ERROR); |
288 | 288 | } |
289 | 289 | |
290 | - if(!($account_id = $this->db->db_insert_id())) { |
|
290 | + if (!($account_id = $this->db->db_insert_id())) { |
|
291 | 291 | throw new Exception(REGISTER_ERROR_ACCOUNT_CREATE, ERR_ERROR); |
292 | 292 | } |
293 | 293 | |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | WHERE `account_id` = '{$account_id_safe}'" |
318 | 318 | ) ? true : false; |
319 | 319 | |
320 | - if($result) { |
|
320 | + if ($result) { |
|
321 | 321 | $result = $this->db_get_by_id($this->account_id); |
322 | 322 | } |
323 | 323 | |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | public function metamatter_change($change_type, $metamatter, $comment = false, $already_changed = false) { |
410 | 410 | global $debug, $mm_change_legit, $config; |
411 | 411 | |
412 | - if(!$this->is_exists || !($metamatter = round(floatval($metamatter)))) { |
|
412 | + if (!$this->is_exists || !($metamatter = round(floatval($metamatter)))) { |
|
413 | 413 | $debug->error('Ошибка при попытке манипуляции с ММ'); |
414 | 414 | return false; |
415 | 415 | } |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | |
419 | 419 | $mm_change_legit = true; |
420 | 420 | // $sn_data_metamatter_db_name = pname_resource_name(RES_METAMATTER); |
421 | - if($already_changed) { |
|
421 | + if ($already_changed) { |
|
422 | 422 | $metamatter_total_delta = 0; |
423 | 423 | $result = -1; |
424 | 424 | } else { |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | ($metamatter_total_delta ? ", `account_immortal` = IF(`account_metamatter_total` + '{$metamatter_total_delta}' >= {$config->player_metamatter_immortal} AND `account_immortal` IS NULL, NOW(), `account_immortal`), `account_metamatter_total` = `account_metamatter_total` + '{$metamatter_total_delta}'" : '') . |
432 | 432 | " WHERE `account_id` = {$account_id_safe}" |
433 | 433 | ); |
434 | - if(!$result) { |
|
434 | + if (!$result) { |
|
435 | 435 | $debug->error("Error adjusting Metamatter for player ID {$this->account_id} (Player Not Found?) with {$metamatter}. Reason: {$comment}", 'Metamatter Change', 402); |
436 | 436 | } |
437 | 437 | $result = SN::$db->db_affected_rows(); |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | $this->awardImmortal($metamatter, $config); |
440 | 440 | } |
441 | 441 | |
442 | - if(empty(core_auth::$user['id'])) { |
|
442 | + if (empty(core_auth::$user['id'])) { |
|
443 | 443 | $user_list = PlayerToAccountTranslate::db_translate_get_users_from_account_list(core_auth::$main_provider->provider_id, $this->account_id); |
444 | 444 | reset($user_list); |
445 | 445 | $user_id_unsafe = key($user_list); |
@@ -448,30 +448,30 @@ discard block |
||
448 | 448 | } |
449 | 449 | $user_id_safe = $this->db->db_escape($user_id_unsafe); |
450 | 450 | |
451 | - if(!$result) { |
|
451 | + if (!$result) { |
|
452 | 452 | $debug->error("Error adjusting Metamatter for player ID {$this->account_id} (Player Not Found?) with {$metamatter}. Reason: {$comment}", 'Metamatter Change', 402); |
453 | 453 | } |
454 | 454 | |
455 | - if(!$already_changed) { |
|
455 | + if (!$already_changed) { |
|
456 | 456 | $this->account_metamatter += $metamatter; |
457 | 457 | $this->account_metamatter_total += $metamatter_total_delta; |
458 | 458 | } |
459 | 459 | |
460 | - if(is_array($comment)) { |
|
460 | + if (is_array($comment)) { |
|
461 | 461 | $comment = call_user_func_array('sprintf', $comment); |
462 | 462 | } |
463 | 463 | |
464 | 464 | $result = $this->db_mm_log_insert($comment, $change_type, $metamatter, $user_id_unsafe); |
465 | 465 | |
466 | - if($metamatter > 0 && !empty($user_id_safe)) { |
|
466 | + if ($metamatter > 0 && !empty($user_id_safe)) { |
|
467 | 467 | $old_referral = doquery("SELECT * FROM `{{referrals}}` WHERE `id` = {$user_id_safe} LIMIT 1 FOR UPDATE;", '', true); |
468 | - if($old_referral['id']) { |
|
468 | + if ($old_referral['id']) { |
|
469 | 469 | $dark_matter_from_metamatter = $metamatter * AFFILIATE_MM_TO_REFERRAL_DM; |
470 | 470 | doquery("UPDATE `{{referrals}}` SET dark_matter = dark_matter + '{$dark_matter_from_metamatter}' WHERE `id` = {$user_id_safe} LIMIT 1;"); |
471 | 471 | $new_referral = doquery("SELECT * FROM `{{referrals}}` WHERE `id` = {$user_id_safe} LIMIT 1;", '', true); |
472 | 472 | |
473 | 473 | $partner_bonus = floor($new_referral['dark_matter'] / $config->rpg_bonus_divisor) - ($old_referral['dark_matter'] >= $config->rpg_bonus_minimum ? floor($old_referral['dark_matter'] / $config->rpg_bonus_divisor) : 0); |
474 | - if($partner_bonus > 0 && $new_referral['dark_matter'] >= $config->rpg_bonus_minimum) { |
|
474 | + if ($partner_bonus > 0 && $new_referral['dark_matter'] >= $config->rpg_bonus_minimum) { |
|
475 | 475 | rpg_points_change($new_referral['id_partner'], RPG_REFERRAL_BOUGHT_MM, $partner_bonus, "Incoming MM From Referral ID {$user_id_safe}"); |
476 | 476 | } |
477 | 477 | } |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | * @throws Exception |
488 | 488 | */ |
489 | 489 | public function cookieSet($rememberMe = false, $domain = null) { |
490 | - if(!$this->is_exists) { |
|
490 | + if (!$this->is_exists) { |
|
491 | 491 | throw new Exception(LOGIN_ERROR_NO_ACCOUNT_FOR_COOKIE_SET, ERR_ERROR); |
492 | 492 | } |
493 | 493 | |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | // OK v4.1 |
507 | 507 | public function cookieClear($domain = null) { |
508 | 508 | // Автоматически вообще-то - если установлена кука имперсонатора - то чистим обычную, а куку имперсонатора - копируем в неё |
509 | - if(!empty($_COOKIE[$this->cookie_name_impersonate])) { |
|
509 | + if (!empty($_COOKIE[$this->cookie_name_impersonate])) { |
|
510 | 510 | sn_setcookie($this->cookie_name, $_COOKIE[$this->cookie_name_impersonate], SN_TIME_NOW + PERIOD_YEAR, $this->sn_root_path, $domain); |
511 | 511 | sn_setcookie($this->cookie_name_impersonate, '', SN_TIME_NOW - PERIOD_WEEK, $this->sn_root_path, $domain); |
512 | 512 | } else { |
@@ -516,14 +516,14 @@ discard block |
||
516 | 516 | |
517 | 517 | public function cookieLogin(&$rememberMe = false) { |
518 | 518 | // Пытаемся войти по куке |
519 | - if(!empty($_COOKIE[$this->cookie_name])) { |
|
520 | - if(count(explode("/%/", $_COOKIE[$this->cookie_name])) < 4) { |
|
519 | + if (!empty($_COOKIE[$this->cookie_name])) { |
|
520 | + if (count(explode("/%/", $_COOKIE[$this->cookie_name])) < 4) { |
|
521 | 521 | list($account_id_unsafe, $cookie_password_hash_salted, $user_remember_me) = explode(AUTH_COOKIE_DELIMETER, $_COOKIE[$this->cookie_name]); |
522 | 522 | } else { |
523 | 523 | list($account_id_unsafe, $user_name, $cookie_password_hash_salted, $user_remember_me) = explode("/%/", $_COOKIE[$this->cookie_name]); |
524 | 524 | } |
525 | 525 | |
526 | - if( |
|
526 | + if ( |
|
527 | 527 | $this->db_get_by_id($account_id_unsafe) |
528 | 528 | && ($this->password_encode_for_cookie($this->account_password) == $cookie_password_hash_salted) |
529 | 529 | ) { |
@@ -548,10 +548,10 @@ discard block |
||
548 | 548 | * @param classConfig $config |
549 | 549 | */ |
550 | 550 | protected function awardImmortal($metamatter, $config) { |
551 | - if(!is_object($awardModule = moduleAward())) { |
|
551 | + if (!is_object($awardModule = moduleAward())) { |
|
552 | 552 | return; |
553 | 553 | } |
554 | - if ($this->account_metamatter + $metamatter >= $config->player_metamatter_immortal ) { |
|
554 | + if ($this->account_metamatter + $metamatter >= $config->player_metamatter_immortal) { |
|
555 | 555 | $account_translation = PlayerToAccountTranslate::db_translate_get_users_from_account_list(ACCOUNT_PROVIDER_LOCAL, $this->account_id); |
556 | 556 | if (!empty($account_translation)) { |
557 | 557 | reset($account_translation); |
@@ -573,10 +573,10 @@ discard block |
||
573 | 573 | * @return bool|mysqli_result|null |
574 | 574 | */ |
575 | 575 | public function getMetamatterSum($where = '', $group = '') { |
576 | - if(is_array($where) && !empty($where)) { |
|
576 | + if (is_array($where) && !empty($where)) { |
|
577 | 577 | $where = implode(' AND ', $where); |
578 | 578 | } |
579 | - if(is_array($group) && !empty($group)) { |
|
579 | + if (is_array($group) && !empty($group)) { |
|
580 | 580 | $group = implode(',', $group); |
581 | 581 | } |
582 | 582 |
@@ -167,7 +167,7 @@ |
||
167 | 167 | // $logRecord->browserId . '_' . |
168 | 168 | // $logRecord->ip . '_' . |
169 | 169 | // $logRecord->proxies; |
170 | - return $logRecord->userId . '_' . $logRecord->playerEntryId; |
|
170 | + return $logRecord->userId . '_' . $logRecord->playerEntryId; |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | protected static $is_init = false; |
22 | 22 | |
23 | 23 | protected static function init() { |
24 | - if(!empty(static::$db)) { |
|
24 | + if (!empty(static::$db)) { |
|
25 | 25 | return; |
26 | 26 | } |
27 | 27 | static::$db = SN::$db; |
@@ -68,14 +68,14 @@ discard block |
||
68 | 68 | $provider_id_safe = intval($provider_id_unsafe); |
69 | 69 | !is_array($account_list) ? $account_list = array($account_list) : false; |
70 | 70 | |
71 | - foreach($account_list as $provider_account_id_unsafe) { |
|
71 | + foreach ($account_list as $provider_account_id_unsafe) { |
|
72 | 72 | $provider_account_id_safe = intval($provider_account_id_unsafe); |
73 | 73 | |
74 | 74 | // TODO - Здесь могут отсутствовать аккаунты - проверять провайдером |
75 | 75 | $query = static::$db->doquery( |
76 | 76 | "SELECT `user_id` FROM {{account_translate}} WHERE `provider_id` = {$provider_id_safe} AND `provider_account_id` = {$provider_account_id_safe} FOR UPDATE" |
77 | 77 | ); |
78 | - while($row = static::$db->db_fetch($query)) { |
|
78 | + while ($row = static::$db->db_fetch($query)) { |
|
79 | 79 | $account_translation[$row['user_id']][$provider_id_unsafe][$provider_account_id_unsafe] = true; |
80 | 80 | } |
81 | 81 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | ($provider_id_unsafe ? "AND `provider_id` = {$provider_id_safe} " : '') . |
103 | 103 | "ORDER BY `timestamp` FOR UPDATE" |
104 | 104 | ); |
105 | - while($row = static::$db->db_fetch($query)) { |
|
105 | + while ($row = static::$db->db_fetch($query)) { |
|
106 | 106 | $account_translation[$row['user_id']][$row['provider_id']][$row['provider_account_id']] = $row; |
107 | 107 | } |
108 | 108 |
@@ -117,15 +117,15 @@ |
||
117 | 117 | sn_db_transaction_commit(); |
118 | 118 | |
119 | 119 | $this->user_agent = !empty($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; |
120 | - $this->browser_id = db_get_set_unique_id_value('security_browser', 'browser_id', ['browser_user_agent' => $this->user_agent,]); |
|
120 | + $this->browser_id = db_get_set_unique_id_value('security_browser', 'browser_id', ['browser_user_agent' => $this->user_agent, ]); |
|
121 | 121 | |
122 | 122 | $this->page_address = substr($_SERVER['PHP_SELF'], strlen(SN_ROOT_RELATIVE)); |
123 | - $this->page_address_id = db_get_set_unique_id_value('security_url', 'url_id', ['url_string' => $this->page_address,]); |
|
123 | + $this->page_address_id = db_get_set_unique_id_value('security_url', 'url_id', ['url_string' => $this->page_address, ]); |
|
124 | 124 | |
125 | 125 | // Not a simulator - because it can have loooooong string |
126 | 126 | if (strpos($_SERVER['REQUEST_URI'], '/simulator.php') !== 0) { |
127 | 127 | $this->queryString = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''; |
128 | - $this->queryStringId = db_get_set_unique_id_value('security_query_strings', 'id', ['query_string' => $this->queryString,]); |
|
128 | + $this->queryStringId = db_get_set_unique_id_value('security_query_strings', 'id', ['query_string' => $this->queryString, ]); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | $ip = sec_player_ip(); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $query = $this->db->doQueryAndFetch( |
54 | 54 | "SELECT `id` FROM {{confirmations}} WHERE `code` = '{$confirm_code_safe}' FOR UPDATE" |
55 | 55 | ); |
56 | - } while($query); |
|
56 | + } while ($query); |
|
57 | 57 | |
58 | 58 | $this->db->doquery( |
59 | 59 | "REPLACE INTO {{confirmations}} |
@@ -3,8 +3,7 @@ discard block |
||
3 | 3 | * Created by Gorlum 05.08.2018 8:05 |
4 | 4 | */ |
5 | 5 | |
6 | -class Timer |
|
7 | -{ |
|
6 | +class Timer { |
|
8 | 7 | /** |
9 | 8 | * @var array[] $times [ |
10 | 9 | * 'time' => (float)microtime(true), |
@@ -14,8 +13,7 @@ discard block |
||
14 | 13 | */ |
15 | 14 | private static $times = []; |
16 | 15 | |
17 | - public static function init() |
|
18 | - { |
|
16 | + public static function init() { |
|
19 | 17 | if (empty(static::$times)) { |
20 | 18 | static::$times[] = ['time' => microtime(true)]; |
21 | 19 | } |
@@ -24,8 +22,7 @@ discard block |
||
24 | 22 | /** |
25 | 23 | * @param string $message Message to attach to timestamp |
26 | 24 | */ |
27 | - public static function mark($message = '') |
|
28 | - { |
|
25 | + public static function mark($message = '') { |
|
29 | 26 | static::init(); |
30 | 27 | |
31 | 28 | foreach (debug_backtrace() as $trace) { |
@@ -51,8 +48,7 @@ discard block |
||
51 | 48 | * |
52 | 49 | * @return string |
53 | 50 | */ |
54 | - public static function elapsed($message = '', $fromStart = false) |
|
55 | - { |
|
51 | + public static function elapsed($message = '', $fromStart = false) { |
|
56 | 52 | $prevTime = $fromStart ? static::first()['time'] : static::last()['time']; |
57 | 53 | |
58 | 54 | static::mark($message); |
@@ -62,8 +58,7 @@ discard block |
||
62 | 58 | return number_format(static::last()['time'] - $prevTime, 6) . 's'; |
63 | 59 | } |
64 | 60 | |
65 | - public static function msg($message, $fromStart = false) |
|
66 | - { |
|
61 | + public static function msg($message, $fromStart = false) { |
|
67 | 62 | |
68 | 63 | $message . |
69 | 64 | ($fromStart ? ' FROM START ' : ' in ') . |
@@ -75,21 +70,18 @@ discard block |
||
75 | 70 | /** |
76 | 71 | * @return mixed |
77 | 72 | */ |
78 | - public static function last() |
|
79 | - { |
|
73 | + public static function last() { |
|
80 | 74 | return end(static::$times); |
81 | 75 | } |
82 | 76 | |
83 | 77 | /** |
84 | 78 | * @return mixed |
85 | 79 | */ |
86 | - public static function first() |
|
87 | - { |
|
80 | + public static function first() { |
|
88 | 81 | return reset(static::$times); |
89 | 82 | } |
90 | 83 | |
91 | - public static function getLog() |
|
92 | - { |
|
84 | + public static function getLog() { |
|
93 | 85 | return static::$times; |
94 | 86 | } |
95 | 87 |
@@ -113,10 +113,10 @@ |
||
113 | 113 | |
114 | 114 | |
115 | 115 | /** |
116 | - * Mark next set operation as delta increment |
|
117 | - * |
|
118 | - * @return $this |
|
119 | - */ |
|
116 | + * Mark next set operation as delta increment |
|
117 | + * |
|
118 | + * @return $this |
|
119 | + */ |
|
120 | 120 | public function inc() { |
121 | 121 | $this->_currentOperation = self::ACCESS_DELTA_INC; |
122 | 122 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | public static function db_unit_count_by_user_and_type_and_snid($user_id, $unit_type = 0, $unit_snid = 0) { |
44 | - $query = doquery( |
|
44 | + $query = doquery( |
|
45 | 45 | "SELECT unit_snid, sum(unit_level) as `qty` FROM {{unit}} WHERE `unit_player_id` = {$user_id} " . |
46 | 46 | ($unit_type ? "AND `unit_type` = {$unit_type} " : '') . |
47 | 47 | ($unit_snid ? "AND `unit_snid` = {$unit_snid} " : '') . |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } elseif (in_array($unitSnId, sn_get_groups(UNIT_ARTIFACTS_STR))) { |
167 | 167 | // Add artifacts to player |
168 | 168 | $result = self::dbAdd($playerId, 0, $unitSnId, $amount); |
169 | - } elseif (!empty($planetId) && in_array($unitSnId, sn_get_groups([UNIT_SHIPS_STR, UNIT_DEFENCE_STR,]))) { |
|
169 | + } elseif (!empty($planetId) && in_array($unitSnId, sn_get_groups([UNIT_SHIPS_STR, UNIT_DEFENCE_STR, ]))) { |
|
170 | 170 | // Add fleet or defense to user's capital |
171 | 171 | $result = self::dbAdd($playerId, $planetId, $unitSnId, $amount); |
172 | 172 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * @return bool |
191 | 191 | */ |
192 | 192 | protected static function dbAdd($playerId, $planetId, $unitSnId, $amount) { |
193 | - if (!in_array($unitSnId, sn_get_groups([UNIT_SHIPS_STR, UNIT_DEFENCE_STR, UNIT_ARTIFACTS_STR,]))) { |
|
193 | + if (!in_array($unitSnId, sn_get_groups([UNIT_SHIPS_STR, UNIT_DEFENCE_STR, UNIT_ARTIFACTS_STR, ]))) { |
|
194 | 194 | return false; |
195 | 195 | } |
196 | 196 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | // 'unit_level' => $level, |
224 | 224 | // ]); |
225 | 225 | |
226 | - $fields += [ |
|
226 | + $fields += [ |
|
227 | 227 | 'unit_type' => get_unit_param($unitSnId, P_UNIT_TYPE), |
228 | 228 | 'unit_level' => $amount, |
229 | 229 | ]; |
@@ -93,103 +93,103 @@ |
||
93 | 93 | |
94 | 94 | // Services -------------------------------------------------------------------------------------------------------- |
95 | 95 | // Default db |
96 | - $gc->db = function (GlobalContainer $c) { |
|
96 | + $gc->db = function(GlobalContainer $c) { |
|
97 | 97 | SN::$db = new \DBAL\db_mysql($c); |
98 | 98 | |
99 | 99 | return SN::$db; |
100 | 100 | }; |
101 | 101 | |
102 | - $gc->debug = function (/** @noinspection PhpUnusedParameterInspection */ |
|
102 | + $gc->debug = function(/** @noinspection PhpUnusedParameterInspection */ |
|
103 | 103 | GlobalContainer $c) { |
104 | 104 | return new \debug(); |
105 | 105 | }; |
106 | 106 | |
107 | - $gc->cache = function (GlobalContainer $gc) { |
|
107 | + $gc->cache = function(GlobalContainer $gc) { |
|
108 | 108 | return new \classCache($gc->cachePrefix); |
109 | 109 | }; |
110 | 110 | |
111 | - $gc->config = function (GlobalContainer $gc) { |
|
111 | + $gc->config = function(GlobalContainer $gc) { |
|
112 | 112 | return new \classConfig($gc->cachePrefix); |
113 | 113 | }; |
114 | 114 | |
115 | 115 | |
116 | - $gc->repository = function (GlobalContainer $gc) { |
|
116 | + $gc->repository = function(GlobalContainer $gc) { |
|
117 | 117 | return new Repository($gc); |
118 | 118 | }; |
119 | 119 | |
120 | - $gc->storage = function (GlobalContainer $gc) { |
|
120 | + $gc->storage = function(GlobalContainer $gc) { |
|
121 | 121 | return new \Storage($gc); |
122 | 122 | }; |
123 | 123 | |
124 | - $gc->repoV2 = function (GlobalContainer $gc) { |
|
124 | + $gc->repoV2 = function(GlobalContainer $gc) { |
|
125 | 125 | return new RepoV2($gc); |
126 | 126 | }; |
127 | 127 | |
128 | - $gc->storageV2 = function (GlobalContainer $gc) { |
|
128 | + $gc->storageV2 = function(GlobalContainer $gc) { |
|
129 | 129 | return new StorageV2($gc); |
130 | 130 | }; |
131 | 131 | |
132 | - $gc->storageSqlV2 = function (GlobalContainer $gc) { |
|
132 | + $gc->storageSqlV2 = function(GlobalContainer $gc) { |
|
133 | 133 | return new StorageSqlV2($gc); |
134 | 134 | }; |
135 | 135 | |
136 | - $gc->design = function (GlobalContainer $gc) { |
|
136 | + $gc->design = function(GlobalContainer $gc) { |
|
137 | 137 | return new \Design($gc); |
138 | 138 | }; |
139 | 139 | |
140 | - $gc->bbCodeParser = function (GlobalContainer $gc) { |
|
140 | + $gc->bbCodeParser = function(GlobalContainer $gc) { |
|
141 | 141 | return new \BBCodeParser($gc); |
142 | 142 | }; |
143 | 143 | |
144 | - $gc->fleetDispatcher = function (GlobalContainer $gc) { |
|
144 | + $gc->fleetDispatcher = function(GlobalContainer $gc) { |
|
145 | 145 | return new \Fleet\FleetDispatcher($gc); |
146 | 146 | }; |
147 | 147 | |
148 | - $gc->watchdog = function (GlobalContainer $gc) { |
|
148 | + $gc->watchdog = function(GlobalContainer $gc) { |
|
149 | 149 | return new Watchdog($gc); |
150 | 150 | }; |
151 | 151 | |
152 | - $gc->valueStorage = function (GlobalContainer $gc) { |
|
152 | + $gc->valueStorage = function(GlobalContainer $gc) { |
|
153 | 153 | return new ValueStorage([]); |
154 | 154 | }; |
155 | 155 | |
156 | - $gc->bonusCatalog = function (GlobalContainer $gc) { |
|
156 | + $gc->bonusCatalog = function(GlobalContainer $gc) { |
|
157 | 157 | return new BonusCatalog($gc); |
158 | 158 | }; |
159 | 159 | |
160 | - $gc->general = function (GlobalContainer $gc) { |
|
160 | + $gc->general = function(GlobalContainer $gc) { |
|
161 | 161 | return new General($gc); |
162 | 162 | }; |
163 | 163 | |
164 | - $gc->economicHelper = function (GlobalContainer $gc) { |
|
164 | + $gc->economicHelper = function(GlobalContainer $gc) { |
|
165 | 165 | return new EconomicHelper($gc); |
166 | 166 | }; |
167 | 167 | |
168 | - $gc->playerLevelHelper = function (GlobalContainer $gc) { |
|
168 | + $gc->playerLevelHelper = function(GlobalContainer $gc) { |
|
169 | 169 | return new PlayerLevelHelper($gc); |
170 | 170 | }; |
171 | 171 | |
172 | - $gc->pimp = function (GlobalContainer $gc) { |
|
172 | + $gc->pimp = function(GlobalContainer $gc) { |
|
173 | 173 | return new SnPimp($gc); |
174 | 174 | }; |
175 | 175 | |
176 | - $gc->modules = function (GlobalContainer $gc) { |
|
176 | + $gc->modules = function(GlobalContainer $gc) { |
|
177 | 177 | return new ModulesManager($gc); |
178 | 178 | }; |
179 | 179 | |
180 | 180 | // Dummy objects --------------------------------------------------------------------------------------------------- |
181 | - $gc->theUser = function (GlobalContainer $gc) { |
|
181 | + $gc->theUser = function(GlobalContainer $gc) { |
|
182 | 182 | return new \TheUser($gc); |
183 | 183 | }; |
184 | 184 | |
185 | 185 | |
186 | 186 | // Models ---------------------------------------------------------------------------------------------------------- |
187 | 187 | $gc->skinEntityClass = \SkinV2::class; |
188 | - $gc->skinModel = function (GlobalContainer $gc) { |
|
188 | + $gc->skinModel = function(GlobalContainer $gc) { |
|
189 | 189 | return new \SkinModel($gc); |
190 | 190 | }; |
191 | 191 | |
192 | - $gc->textModel = function (GlobalContainer $gc) { |
|
192 | + $gc->textModel = function(GlobalContainer $gc) { |
|
193 | 193 | return new \TextModel($gc); |
194 | 194 | }; |
195 | 195 |