for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php declare(strict_types=1);
namespace Smr\Pages\Player;
use AbstractSmrPlayer;
use Globals;
use Menu;
use Smr\Page\PlayerPage;
use Smr\Page\ReusableTrait;
use Smr\Race;
use Smr\Template;
class TraderRelations extends PlayerPage {
use ReusableTrait;
public string $file = 'trader_relations.php';
public function build(AbstractSmrPlayer $player, Template $template): void {
$template->assign('PageTopic', 'Trader Relations');
Menu::trader();
$politicalRelations = [];
$personalRelations = [];
$raceRelations = Globals::getRaceRelations($player->getGameID(), $player->getRaceID());
foreach (Race::getAllNames() as $raceID => $raceName) {
$politicalRelations[$raceName] = $raceRelations[$raceID];
$personalRelations[$raceName] = $player->getPersonalRelation($raceID);
}
$template->assign('PoliticalRelations', $politicalRelations);
$template->assign('PersonalRelations', $personalRelations);