We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | $ship = new AbstractSmrShip($this->player); |
| 101 | 101 | $this->expectException(\Exception::class); |
| 102 | 102 | $this->expectExceptionMessage('Ship does not have the supported hardware!'); |
| 103 | - $ship->setIllusion(SHIP_TYPE_THIEF, 12, 13);; |
|
| 103 | + $ship->setIllusion(SHIP_TYPE_THIEF, 12, 13); ; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | public function test_hardware() { |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | try { |
| 119 | - $TRADE_ROUTE =& $GLOBALS['TRADE_ROUTE']; |
|
| 119 | + $TRADE_ROUTE = & $GLOBALS['TRADE_ROUTE']; |
|
| 120 | 120 | debug('Action #' . $actions); |
| 121 | 121 | |
| 122 | 122 | //We have to reload player on each loop |
@@ -140,14 +140,14 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | if (!isset($TRADE_ROUTE)) { //We only want to change trade route if there isn't already one set. |
| 143 | - $TRADE_ROUTES =& findRoutes($player); |
|
| 144 | - $TRADE_ROUTE =& changeRoute($TRADE_ROUTES); |
|
| 143 | + $TRADE_ROUTES = & findRoutes($player); |
|
| 144 | + $TRADE_ROUTE = & changeRoute($TRADE_ROUTES); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | if ($player->isDead()) { |
| 148 | 148 | debug('Some evil person killed us, let\'s move on now.'); |
| 149 | 149 | $previousContainer = null; //We died, we don't care what we were doing beforehand. |
| 150 | - $TRADE_ROUTE =& changeRoute($TRADE_ROUTES); //Change route |
|
| 150 | + $TRADE_ROUTE = & changeRoute($TRADE_ROUTES); //Change route |
|
| 151 | 151 | processContainer(Page::create('death_processing.php')); |
| 152 | 152 | } |
| 153 | 153 | if ($player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && $player->getNewbieWarning()) { |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | processContainer(tradeGoods($goodID, $player, $port)); |
| 224 | 224 | } else { |
| 225 | 225 | //Move to next route or fed. |
| 226 | - if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) { |
|
| 226 | + if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) { |
|
| 227 | 227 | debug('Changing Route Failed'); |
| 228 | 228 | processContainer(plotToFed($player)); |
| 229 | 229 | } else { |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | processContainer(tradeGoods($goodID, $player, $port)); |
| 251 | 251 | } else { |
| 252 | 252 | //Move to next route or fed. |
| 253 | - if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) { |
|
| 253 | + if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) { |
|
| 254 | 254 | debug('Changing Route Failed'); |
| 255 | 255 | processContainer(plotToFed($player)); |
| 256 | 256 | } else { |
@@ -582,9 +582,9 @@ discard block |
||
| 582 | 582 | return $false; |
| 583 | 583 | } |
| 584 | 584 | $routeKey = array_rand($tradeRoutes); |
| 585 | - $tradeRoute =& $tradeRoutes[$routeKey]; |
|
| 585 | + $tradeRoute = & $tradeRoutes[$routeKey]; |
|
| 586 | 586 | unset($tradeRoutes[$routeKey]); |
| 587 | - $GLOBALS['TRADE_ROUTE'] =& $tradeRoute; |
|
| 587 | + $GLOBALS['TRADE_ROUTE'] = & $tradeRoute; |
|
| 588 | 588 | debug('Switched route', $tradeRoute); |
| 589 | 589 | return $tradeRoute; |
| 590 | 590 | } |
@@ -375,8 +375,9 @@ |
||
| 375 | 375 | |
| 376 | 376 | if (!$player->isDead() && $player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && |
| 377 | 377 | $player->getNewbieWarning() && |
| 378 | - $var['url'] != 'newbie_warning_processing.php') |
|
| 379 | - Page::create('newbie_warning_processing.php')->go(); |
|
| 378 | + $var['url'] != 'newbie_warning_processing.php') { |
|
| 379 | + Page::create('newbie_warning_processing.php')->go(); |
|
| 380 | + } |
|
| 380 | 381 | } |
| 381 | 382 | |
| 382 | 383 | // Initialize the template |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | // Form to make planet changes |
| 35 | 35 | $container = Page::create('1.6/universe_create_save_processing.php', |
| 36 | - '1.6/universe_create_sectors.php', $var); |
|
| 36 | + '1.6/universe_create_sectors.php', $var); |
|
| 37 | 37 | $template->assign('CreatePlanetsFormHREF', $container->href()); |
| 38 | 38 | |
| 39 | 39 | // HREF to cancel and return to the previous page |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | |
| 95 | 95 | // Form to make location changes |
| 96 | 96 | $container = Page::create('1.6/universe_create_save_processing.php', |
| 97 | - '1.6/universe_create_sectors.php', $var); |
|
| 97 | + '1.6/universe_create_sectors.php', $var); |
|
| 98 | 98 | $template->assign('CreateLocationsFormHREF', $container->href()); |
| 99 | 99 | |
| 100 | 100 | // HREF to cancel and return to the previous page |
@@ -7,4 +7,4 @@ |
||
| 7 | 7 | $msg = '<span class="green">SUCCESS: </span>Enabled game ' . $game->getDisplayName(); |
| 8 | 8 | |
| 9 | 9 | Page::create('skeleton.php', 'enable_game.php', |
| 10 | - array('processing_msg' => $msg))->go(); |
|
| 10 | + array('processing_msg' => $msg))->go(); |
|
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $menuItems[] = array('Link'=>Globals::getPlanetListHREF($alliance_id), 'Text'=>'Defense'); |
| 41 | 41 | $menuItems[] = array('Link'=>Globals::getPlanetListFinancialHREF($alliance_id), 'Text'=>'Financial'); |
| 42 | 42 | // make the selected index bold |
| 43 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
| 43 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
| 44 | 44 | $boldItem = '<span class="bold">' . $boldItem . '</span>'; |
| 45 | 45 | |
| 46 | 46 | $template = Smr\Template::getInstance(); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | 'Text' => 'Game News', |
| 147 | 147 | ]; |
| 148 | 148 | // make the selected index bold |
| 149 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
| 149 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
| 150 | 150 | $boldItem = '<b>' . $boldItem . '</b>'; |
| 151 | 151 | |
| 152 | 152 | $template = Smr\Template::getInstance(); |
@@ -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 { |