We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -128,7 +128,7 @@ |
||
128 | 128 | AND receiver_delete = ' . $db->escapeBoolean(false) . ' |
129 | 129 | ORDER BY send_time DESC'); |
130 | 130 | foreach ($dbResult->records() as $dbRecord) { |
131 | - $groupBox =& $messageBox['GroupedMessages'][$dbRecord->getInt('sender_id')]; |
|
131 | + $groupBox = & $messageBox['GroupedMessages'][$dbRecord->getInt('sender_id')]; |
|
132 | 132 | // Limit the number of messages in each group |
133 | 133 | if (!isset($groupBox['Messages']) || count($groupBox['Messages']) < MESSAGE_SCOUT_GROUP_LIMIT) { |
134 | 134 | $groupBox['Messages'][] = displayMessage($dbRecord->getInt('message_id'), $dbRecord->getInt('account_id'), $dbRecord->getInt('sender_id'), $player->getGameID(), $dbRecord->getString('message_text'), $dbRecord->getInt('send_time'), $dbRecord->getBoolean('msg_read'), MSG_SCOUT, $player->getAccount()); |
@@ -14,8 +14,8 @@ |
||
14 | 14 | 1 => ['pipe', 'w'], // stdout is a pipe that the child will write to |
15 | 15 | ]; |
16 | 16 | $engine = proc_open(UCI_CHESS_ENGINE, $descriptorSpec, $pipes); |
17 | - $toEngine =& $pipes[0]; |
|
18 | - $fromEngine =& $pipes[1]; |
|
17 | + $toEngine = & $pipes[0]; |
|
18 | + $fromEngine = & $pipes[1]; |
|
19 | 19 | |
20 | 20 | function readFromEngine(bool $block = true): void { |
21 | 21 | global $fromEngine; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | // Get all the properties to display for each weapon |
21 | 21 | $weapons = []; |
22 | 22 | foreach (SmrWeaponType::getAllWeaponTypes() as $weapon) { |
23 | - $restrictions = match ($weapon->getBuyerRestriction()) { |
|
23 | + $restrictions = match($weapon->getBuyerRestriction()) { |
|
24 | 24 | BUYER_RESTRICTION_NONE => [], |
25 | 25 | BUYER_RESTRICTION_GOOD => ['<div class="dgreen">Good</div>'], |
26 | 26 | BUYER_RESTRICTION_EVIL => ['<div class="red">Evil</div>'], |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | function buildShipStats(SmrShipType $ship): array { |
30 | 30 | //we want to put them all in an array so we dont have to have 15 td rows |
31 | - $restriction = match ($ship->getRestriction()) { |
|
31 | + $restriction = match($ship->getRestriction()) { |
|
32 | 32 | BUYER_RESTRICTION_NONE => '', |
33 | 33 | BUYER_RESTRICTION_GOOD => '<span class="dgreen">Good</span>', |
34 | 34 | BUYER_RESTRICTION_EVIL => '<span class="red">Evil</span>', |
@@ -119,7 +119,7 @@ |
||
119 | 119 | * Can be used to convert any type of notice into an exception. |
120 | 120 | */ |
121 | 121 | function exception_error_handler($errno, $errstr, $errfile, $errline): bool { |
122 | - if (!(error_reporting() & $errno)) { |
|
122 | + if (!(error_reporting()&$errno)) { |
|
123 | 123 | return false; // error is suppressed |
124 | 124 | } |
125 | 125 | throw new ErrorException($errstr, $errno, E_ERROR, $errfile, $errline); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | create_error('The port is no longer defenceless!'); |
10 | 10 | } |
11 | 11 | |
12 | -$credits = match ($var['PayoutType']) { |
|
12 | +$credits = match($var['PayoutType']) { |
|
13 | 13 | 'Raze' => $port->razePort($player), |
14 | 14 | 'Loot' => $port->lootPort($player), |
15 | 15 | }; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY kills DESC'); |
102 | 102 | foreach ($dbResult->records() as $dbRecord) { |
103 | 103 | $id = $dbRecord->getInt('alliance_id_2'); |
104 | - $alliance_name = match (true) { |
|
104 | + $alliance_name = match(true) { |
|
105 | 105 | $id > 0 => SmrAlliance::getAlliance($id, $player->getGameID())->getAllianceDisplayName(), |
106 | 106 | $id == 0 => 'No Alliance', |
107 | 107 | $id == ALLIANCE_VS_FORCES => '<span class="yellow">Forces</span>', |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY kills DESC'); |
123 | 123 | foreach ($dbResult->records() as $dbRecord) { |
124 | 124 | $id = $dbRecord->getInt('alliance_id_1'); |
125 | - $alliance_name = match (true) { |
|
125 | + $alliance_name = match(true) { |
|
126 | 126 | $id > 0 => SmrAlliance::getAlliance($id, $player->getGameID())->getAllianceDisplayName(), |
127 | 127 | $id == 0 => 'No Alliance', |
128 | 128 | $id == ALLIANCE_VS_FORCES => '<span class="yellow">Forces</span>', |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | } |
21 | 21 | $action = $var['action']; |
22 | 22 | |
23 | -$query = match ($action) { |
|
23 | +$query = match($action) { |
|
24 | 24 | COMBAT_LOG_PERSONAL, COMBAT_LOG_ALLIANCE => 'type=\'PLAYER\'', |
25 | 25 | COMBAT_LOG_PORT => 'type=\'PORT\'', |
26 | 26 | COMBAT_LOG_PLANET => 'type=\'PLANET\'', |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | }; |
60 | 60 | |
61 | 61 | // For display purposes, describe the type of log |
62 | -$type = match ($action) { |
|
62 | +$type = match($action) { |
|
63 | 63 | COMBAT_LOG_PERSONAL => 'personal', |
64 | 64 | COMBAT_LOG_ALLIANCE => 'alliance', |
65 | 65 | COMBAT_LOG_PORT => 'port', |
@@ -35,13 +35,13 @@ |
||
35 | 35 | const USER_SCORE_NAME = 'User Score'; |
36 | 36 | $hofTypes = [DONATION_NAME => true, USER_SCORE_NAME => true]; |
37 | 37 | foreach ($dbResult->records() as $dbRecord) { |
38 | - $hof =& $hofTypes; |
|
38 | + $hof = & $hofTypes; |
|
39 | 39 | $typeList = explode(':', $dbRecord->getString('type')); |
40 | 40 | foreach ($typeList as $type) { |
41 | 41 | if (!isset($hof[$type])) { |
42 | 42 | $hof[$type] = []; |
43 | 43 | } |
44 | - $hof =& $hof[$type]; |
|
44 | + $hof = & $hof[$type]; |
|
45 | 45 | } |
46 | 46 | $hof = true; |
47 | 47 | } |