@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $insert_position = $is_positioned == '-' ? 0 : count($menu); |
129 | 129 | } |
130 | 130 | |
131 | - $insert_position += $is_positioned == '+' ? 1 : 0; |
|
131 | + $insert_position += $is_positioned == '+' ? 1 : 0; |
|
132 | 132 | $spliced = array_splice($menu, $insert_position, count($menu) - $insert_position); |
133 | 133 | $menu[$menu_item_id] = $menu_item; |
134 | 134 | |
@@ -541,11 +541,11 @@ discard block |
||
541 | 541 | * @return array |
542 | 542 | */ |
543 | 543 | public static function addFileName($fileNames, $anArray, $ext = '.css') { |
544 | - if(!is_array($fileNames)) { |
|
544 | + if (!is_array($fileNames)) { |
|
545 | 545 | $fileNames = [$fileNames]; |
546 | 546 | } |
547 | 547 | |
548 | - foreach($fileNames as $fileName) { |
|
548 | + foreach ($fileNames as $fileName) { |
|
549 | 549 | if (file_exists(SN_ROOT_PHYSICAL . $fileName . '.min' . $ext)) { |
550 | 550 | $anArray[$fileName . '.min' . $ext] = ''; |
551 | 551 | } elseif (file_exists(SN_ROOT_PHYSICAL . $fileName . '.css' . $ext)) { |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | 'LANG' => $language ? $language : '', |
677 | 677 | 'referral' => $id_ref ? '&id_ref=' . $id_ref : '', |
678 | 678 | |
679 | - 'REQUEST_PARAMS' => !empty($url_params) ? '?' . implode('&', $url_params) : '',// "?lang={$language}" . ($id_ref ? "&id_ref={$id_ref}" : ''), |
|
679 | + 'REQUEST_PARAMS' => !empty($url_params) ? '?' . implode('&', $url_params) : '', // "?lang={$language}" . ($id_ref ? "&id_ref={$id_ref}" : ''), |
|
680 | 680 | 'FILENAME' => basename($_SERVER['PHP_SELF']), |
681 | 681 | )); |
682 | 682 | |
@@ -909,7 +909,7 @@ discard block |
||
909 | 909 | 'QUE_ID' => QUE_RESEARCH, |
910 | 910 | 'QUE_HTML' => 'topnav', |
911 | 911 | |
912 | - 'RESEARCH_ONGOING' => (boolean)$user['que'], |
|
912 | + 'RESEARCH_ONGOING' => (boolean) $user['que'], |
|
913 | 913 | |
914 | 914 | 'TIME_TEXT' => sprintf($str_date_format, $time_now_parsed['year'], $lang['months'][$time_now_parsed['mon']], $time_now_parsed['mday'], |
915 | 915 | $time_now_parsed['hours'], $time_now_parsed['minutes'], $time_now_parsed['seconds'] |
@@ -1199,7 +1199,7 @@ discard block |
||
1199 | 1199 | SnTemplate::renderFooter($page, $template_result); |
1200 | 1200 | } |
1201 | 1201 | |
1202 | - $user['authlevel'] >= 3 && $config->debug ? $debug->echo_log() : false;; |
|
1202 | + $user['authlevel'] >= 3 && $config->debug ? $debug->echo_log() : false; ; |
|
1203 | 1203 | |
1204 | 1204 | SN::$db->db_disconnect(); |
1205 | 1205 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | public function __get($property) { |
57 | - if (in_array($property, ['height', 'width',]) && ($this->$property === -1)) { |
|
57 | + if (in_array($property, ['height', 'width', ]) && ($this->$property === -1)) { |
|
58 | 58 | if (isset($this->image)) { |
59 | 59 | $this->width = imagesx($this->image); |
60 | 60 | $this->height = imagesy($this->image); |
@@ -50,7 +50,7 @@ |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | public function __get($property) { |
53 | - if (in_array($property, ['height', 'width',])) { |
|
53 | + if (in_array($property, ['height', 'width', ])) { |
|
54 | 54 | return $this->getImageContainer() ? $this->getImageContainer()->$property : 0; |
55 | 55 | } |
56 | 56 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * @param int $query_limit |
10 | 10 | */ |
11 | 11 | function nws_render(&$user, &$template, $query_where = '', $query_limit = 20) { |
12 | - if($user['authlevel'] < AUTH_LEVEL_ADMINISTRATOR) { |
|
12 | + if ($user['authlevel'] < AUTH_LEVEL_ADMINISTRATOR) { |
|
13 | 13 | $query_where .= (!empty($query_where) ? ' AND ' : '') |
14 | 14 | . '`tsTimeStamp` <= (NOW())'; |
15 | 15 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $sprite = new Sprite($images, $layout, $scaleToPx); |
55 | 55 | $sprite->generate(); |
56 | - $sprite->saveOutput($dirOut, $outName, [$cssPrefix, $cssSuffix, $outName, $relativeUrl,]); |
|
56 | + $sprite->saveOutput($dirOut, $outName, [$cssPrefix, $cssSuffix, $outName, $relativeUrl, ]); |
|
57 | 57 | |
58 | 58 | print "Folder/filter processed\n\n"; |
59 | 59 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $images = []; |
102 | 102 | |
103 | 103 | foreach (scandir($dirRealPath) as $fileNameOnly) { |
104 | - if (in_array($fileNameOnly, ['.', '..',]) || is_dir($fullPath = "$dirRealPath/$fileNameOnly")) { |
|
104 | + if (in_array($fileNameOnly, ['.', '..', ]) || is_dir($fullPath = "$dirRealPath/$fileNameOnly")) { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | $images = self::tryReadFile($fullPath, $images); |
@@ -33,10 +33,10 @@ |
||
33 | 33 | $gifDecoder = new Decoder($gifStream); |
34 | 34 | |
35 | 35 | /** Run decoder. Pass callback function to process decoded Frames when they're ready. */ |
36 | - $gifDecoder->decode(function (FrameDecodedEvent $event) { |
|
36 | + $gifDecoder->decode(function(FrameDecodedEvent $event) { |
|
37 | 37 | $this->frames[] = $event->decodedFrame; |
38 | 38 | |
39 | - $this->width += $event->decodedFrame->getSize()->getWidth(); |
|
39 | + $this->width += $event->decodedFrame->getSize()->getWidth(); |
|
40 | 40 | $this->maxWidth = max($this->maxWidth, $event->decodedFrame->getSize()->getWidth()); |
41 | 41 | |
42 | 42 | $this->height = max($this->height, $event->decodedFrame->getSize()->getHeight()); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @return static|null |
28 | 28 | */ |
29 | 29 | public function fillLine($image, $gridSize) { |
30 | - if($image->isAnimatedGif()) { |
|
30 | + if ($image->isAnimatedGif()) { |
|
31 | 31 | $line = new SpriteLineGif(); |
32 | 32 | } else { |
33 | 33 | $line = $this->isFull($gridSize) ? new static() : $this; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $line->generate($this->height, $scaleToPx); |
81 | 81 | |
82 | 82 | $this->height += $line->height; |
83 | - $this->width = max($this->width, $line->width); |
|
83 | + $this->width = max($this->width, $line->width); |
|
84 | 84 | |
85 | 85 | // $line->image->savePng(__DIR__ . '/../gif_line_' . $this->height . '.png'); // TODO remove debug |
86 | 86 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | protected function createGrid() { |
165 | 165 | $this->lineIndex = 0; |
166 | 166 | |
167 | - usort($this->imageList, function (ImageFile $a, ImageFile $b) { return $b->height - $a->height; }); |
|
167 | + usort($this->imageList, function(ImageFile $a, ImageFile $b) { return $b->height - $a->height; }); |
|
168 | 168 | |
169 | 169 | $prevLine = new SpriteLine(); |
170 | 170 | foreach ($this->imageList as $image) { |
@@ -238,9 +238,9 @@ discard block |
||
238 | 238 | 'advGoogleLeftMenuCode' => '(Place here code for banner)', |
239 | 239 | |
240 | 240 | // Alliance bonus calculations |
241 | - 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
241 | + 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
242 | 242 | 'ali_bonus_brackets' => 10, // Brackets count for ALI_BONUS_BY_RANK |
243 | - 'ali_bonus_brackets_divisor' => 10,// Bonus divisor for ALI_BONUS_BY_RANK |
|
243 | + 'ali_bonus_brackets_divisor' => 10, // Bonus divisor for ALI_BONUS_BY_RANK |
|
244 | 244 | 'ali_bonus_divisor' => 10000000, // Rank divisor for ALI_BONUS_BY_POINTS |
245 | 245 | 'ali_bonus_members' => 10, // Minimum alliance size to start using bonus |
246 | 246 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | |
283 | 283 | 'eco_scale_storage' => 1, |
284 | 284 | 'eco_stockman_fleet' => '', // Black Market - Starting amount of s/h ship merchant to sell |
285 | - 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
285 | + 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
286 | 286 | 'empire_mercenary_base_period' => PERIOD_MONTH, // Base |
287 | 287 | 'empire_mercenary_temporary' => 0, // Temporary empire-wide mercenaries |
288 | 288 | |
@@ -293,22 +293,22 @@ discard block |
||
293 | 293 | 'energy_basic_income' => 0, |
294 | 294 | |
295 | 295 | // Bashing protection settings |
296 | - 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
297 | - 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
298 | - 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
299 | - 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
300 | - 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
296 | + 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
297 | + 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
298 | + 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
299 | + 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
300 | + 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
301 | 301 | |
302 | 302 | 'Fleet_Cdr' => 30, |
303 | 303 | 'fleet_speed' => 1, |
304 | 304 | |
305 | - 'fleet_update_dispatch_time' => 3, // (float) Maximum seconds fleet dispatch can run, Default 3s |
|
306 | - 'fleet_update_interval' => 4, // How often fleet dispatch worker should run |
|
305 | + 'fleet_update_dispatch_time' => 3, // (float) Maximum seconds fleet dispatch can run, Default 3s |
|
306 | + 'fleet_update_interval' => 4, // How often fleet dispatch worker should run |
|
307 | 307 | self::FLEET_UPDATE_MAX_RUN_TIME => 30, // (int) seconds. How long fleet dispatch worker can run. Should be 1 second or more |
308 | 308 | 'fleet_update_lock' => '', // SQL time when lock was acquired |
309 | 309 | |
310 | - 'game_adminEmail' => 'root@localhost', // Admin email to show to users |
|
311 | - 'game_counter' => 0, // Does built-in page hit counter is on? |
|
310 | + 'game_adminEmail' => 'root@localhost', // Admin email to show to users |
|
311 | + 'game_counter' => 0, // Does built-in page hit counter is on? |
|
312 | 312 | // Defaults |
313 | 313 | 'game_default_language' => 'ru', |
314 | 314 | 'game_default_skin' => 'skins/EpicBlue/', |
@@ -322,14 +322,14 @@ discard block |
||
322 | 322 | 'game_maxSystem' => 199, |
323 | 323 | 'game_maxPlanet' => 15, |
324 | 324 | // Game global settings |
325 | - 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
325 | + 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
326 | 326 | 'game_name' => 'SuperNova', // Server name (would be on banners and on top of left menu) |
327 | 327 | |
328 | 328 | 'game_news_actual' => PERIOD_DAY_3, // How long announcement would be marked as "New". In seconds. Default - 3 days |
329 | - 'game_news_overview' => 3, // How much last news to show in Overview page |
|
330 | - 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
329 | + 'game_news_overview' => 3, // How much last news to show in Overview page |
|
330 | + 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
331 | 331 | // Noob protection |
332 | - 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
332 | + 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
333 | 333 | 'game_noob_points' => 5000, // Below this point user treated as noob. 0 to disable |
334 | 334 | |
335 | 335 | 'game_multiaccount_enabled' => 0, // 1 - allow interactions for players with same IP (multiaccount) |
@@ -384,12 +384,12 @@ discard block |
||
384 | 384 | 'payment_currency_exchange_wmz' => 1, |
385 | 385 | 'payment_currency_exchange_pln' => 3.86, |
386 | 386 | |
387 | - 'payment_lot_price' => 1, // Lot's price in default currency |
|
388 | - 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
387 | + 'payment_lot_price' => 1, // Lot's price in default currency |
|
388 | + 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
389 | 389 | |
390 | 390 | 'planet_capital_cost' => 25000, // Cost in DM to move Capital to current planet |
391 | - 'planet_capital_mining_rate' => 2.0, // Capital Mining rates |
|
392 | - 'planet_capital_building_rate' => 2.0, // Capital Building rates |
|
391 | + 'planet_capital_mining_rate' => 2.0, // Capital Mining rates |
|
392 | + 'planet_capital_building_rate' => 2.0, // Capital Building rates |
|
393 | 393 | 'planet_teleport_cost' => 50000, // Cost of planet teleportation |
394 | 394 | 'planet_teleport_timeout' => 86400, // Timeout for next teleportation |
395 | 395 | |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | 'resource_multiplier' => 1, |
412 | 412 | |
413 | 413 | //Role play system |
414 | - 'rpg_bonus_divisor' => 10, // Amount of DM referral should get for partner have 1 DM bonus |
|
414 | + 'rpg_bonus_divisor' => 10, // Amount of DM referral should get for partner have 1 DM bonus |
|
415 | 415 | 'rpg_bonus_minimum' => 10000, // Minimum DM amount for starting paying bonuses to affiliate |
416 | 416 | |
417 | 417 | // Black Market - General |
@@ -476,12 +476,12 @@ discard block |
||
476 | 476 | 'url_purchase_metamatter' => '', |
477 | 477 | 'url_rules' => '', |
478 | 478 | |
479 | - 'users_amount' => 1, // Total users count |
|
479 | + 'users_amount' => 1, // Total users count |
|
480 | 480 | 'game_users_online_timeout' => PERIOD_MINUTE_15, // Seconds, How long user should consider ONLINE for online counter |
481 | - 'game_users_update_online' => 30, // How often user online should be refreshed (seconds) |
|
482 | - 'var_online_user_time' => 0, // When last time user online was refreshed |
|
483 | - 'var_online_user_count' => 0, // Last calculated online user count |
|
484 | - 'server_log_online' => 0, // Log online user count |
|
481 | + 'game_users_update_online' => 30, // How often user online should be refreshed (seconds) |
|
482 | + 'var_online_user_time' => 0, // When last time user online was refreshed |
|
483 | + 'var_online_user_count' => 0, // Last calculated online user count |
|
484 | + 'server_log_online' => 0, // Log online user count |
|
485 | 485 | |
486 | 486 | 'user_birthday_celebrate' => 0, // When last time celebrations (i.e. gift-giving) was made - timestamp |
487 | 487 | 'user_birthday_gift' => 0, // User birthday gift - Dark Matter points |