We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | |
| 164 | 164 | // transfer this value to next container |
| 165 | 165 | if (!isset($var[$source])) { |
| 166 | - throw new Exception('Could not find "' . $source. '" in var!'); |
|
| 166 | + throw new Exception('Could not find "' . $source . '" in var!'); |
|
| 167 | 167 | } |
| 168 | 168 | if ($dest === null) { |
| 169 | 169 | $dest = $source; |
@@ -55,9 +55,9 @@ |
||
| 55 | 55 | $session = Smr\Session::getInstance(); |
| 56 | 56 | $account = $session->getAccount(); |
| 57 | 57 | if (($vis == HOF_PRIVATE && $account->getAccountID() != $accountID) || |
| 58 | - ($vis == HOF_ALLIANCE && isset($gameID) && |
|
| 59 | - !SmrGame::getGame($gameID)->hasEnded() && |
|
| 60 | - !SmrPlayer::getPlayer($accountID, $gameID)->sameAlliance($session->getPlayer()))) |
|
| 58 | + ($vis == HOF_ALLIANCE && isset($gameID) && |
|
| 59 | + !SmrGame::getGame($gameID)->hasEnded() && |
|
| 60 | + !SmrPlayer::getPlayer($accountID, $gameID)->sameAlliance($session->getPlayer()))) |
|
| 61 | 61 | { |
| 62 | 62 | return '-'; |
| 63 | 63 | } else { |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | 1 => array("pipe", "w") // stdout is a pipe that the child will write to |
| 20 | 20 | ); |
| 21 | 21 | $engine = proc_open(UCI_CHESS_ENGINE, $descriptorSpec, $pipes); |
| 22 | - $toEngine =& $pipes[0]; |
|
| 23 | - $fromEngine =& $pipes[1]; |
|
| 22 | + $toEngine = & $pipes[0]; |
|
| 23 | + $fromEngine = & $pipes[1]; |
|
| 24 | 24 | |
| 25 | 25 | function readFromEngine($block = true) { |
| 26 | 26 | global $fromEngine; |
@@ -84,5 +84,5 @@ discard block |
||
| 84 | 84 | function debug($message, $debugObject = null) { |
| 85 | 85 | echo date('Y-m-d H:i:s - ') . $message . ($debugObject !== null ? EOL . var_export($debugObject, true) : '') . EOL; |
| 86 | 86 | $db = Smr\Database::getInstance(); |
| 87 | - $db->query('INSERT INTO npc_logs (script_id, npc_id, time, message, debug_info, var) VALUES (' . (defined('SCRIPT_ID') ? SCRIPT_ID : 0) . ', 0, NOW(),' . $db->escapeString($message) . ',' . $db->escapeString(var_export($debugObject,true)) . ',' . $db->escapeString('') . ')'); |
|
| 87 | + $db->query('INSERT INTO npc_logs (script_id, npc_id, time, message, debug_info, var) VALUES (' . (defined('SCRIPT_ID') ? SCRIPT_ID : 0) . ', 0, NOW(),' . $db->escapeString($message) . ',' . $db->escapeString(var_export($debugObject, true)) . ',' . $db->escapeString('') . ')'); |
|
| 88 | 88 | } |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | AND receiver_delete = ' . $db->escapeBoolean(false) . ' |
| 131 | 131 | ORDER BY send_time DESC'); |
| 132 | 132 | while ($db->nextRecord()) { |
| 133 | - $groupBox =& $messageBox['GroupedMessages'][$db->getInt('sender_id')]; |
|
| 133 | + $groupBox = & $messageBox['GroupedMessages'][$db->getInt('sender_id')]; |
|
| 134 | 134 | // Limit the number of messages in each group |
| 135 | 135 | if (!isset($groupBox['Messages']) || count($groupBox['Messages']) < MESSAGE_SCOUT_GROUP_LIMIT) { |
| 136 | 136 | displayMessage($groupBox, $db->getInt('message_id'), $db->getInt('account_id'), $db->getInt('sender_id'), $player->getGameID(), stripslashes($db->getField('message_text')), $db->getInt('send_time'), $db->getBoolean('msg_read'), MSG_SCOUT, $player->getAccount()); |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $db = Smr\Database::getInstance(); |
| 18 | 18 | $db->switchDatabases($var['HistoryDatabase']); |
| 19 | 19 | $db->query('SELECT start_date, type, end_date, game_name, speed, game_id ' . |
| 20 | - 'FROM game WHERE game_id = ' . $db->escapeNumber($game_id)); |
|
| 20 | + 'FROM game WHERE game_id = ' . $db->escapeNumber($game_id)); |
|
| 21 | 21 | $db->requireRecord(); |
| 22 | 22 | $template->assign('GameName', $game_name); |
| 23 | 23 | $template->assign('Start', date($account->getDateFormat(), $db->getInt('start_date'))); |
@@ -48,8 +48,9 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function setAllianceID($ID) { |
| 51 | - if ($this->allianceID == $ID) |
|
| 52 | - return; |
|
| 51 | + if ($this->allianceID == $ID) { |
|
| 52 | + return; |
|
| 53 | + } |
|
| 53 | 54 | $this->allianceID = $ID; |
| 54 | 55 | } |
| 55 | 56 | |
@@ -85,8 +86,7 @@ discard block |
||
| 85 | 86 | AND id = ' . $db->escapeString($name) . ' LIMIT 1'); |
| 86 | 87 | if ($db->nextRecord()) { |
| 87 | 88 | return $db->getObject('info'); |
| 88 | - } |
|
| 89 | - else { |
|
| 89 | + } else { |
|
| 90 | 90 | return new DummyPlayer(); |
| 91 | 91 | } |
| 92 | 92 | } |
@@ -14,8 +14,9 @@ discard block |
||
| 14 | 14 | $i = 1; |
| 15 | 15 | if (Request::has('attackers')) { |
| 16 | 16 | foreach (Request::getArray('attackers') as $attackerName) { |
| 17 | - if ($attackerName == 'none') |
|
| 18 | - continue; |
|
| 17 | + if ($attackerName == 'none') { |
|
| 18 | + continue; |
|
| 19 | + } |
|
| 19 | 20 | if (isset($usedNames[$attackerName])) { |
| 20 | 21 | $duplicates = true; |
| 21 | 22 | continue; |
@@ -38,8 +39,9 @@ discard block |
||
| 38 | 39 | $defenders = array(); |
| 39 | 40 | if (Request::has('defenders')) { |
| 40 | 41 | foreach (Request::getArray('defenders') as $defenderName) { |
| 41 | - if ($defenderName == 'none') |
|
| 42 | - continue; |
|
| 42 | + if ($defenderName == 'none') { |
|
| 43 | + continue; |
|
| 44 | + } |
|
| 43 | 45 | if (isset($usedNames[$defenderName])) { |
| 44 | 46 | $duplicates = true; |
| 45 | 47 | continue; |