Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Failed Conditions
Push — main ( 5797ad...3faf69 )
by Dan
29s queued 24s
created

TraderRelations   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 15 2
1
<?php declare(strict_types=1);
2
3
namespace Smr\Pages\Player;
4
5
use AbstractSmrPlayer;
6
use Globals;
7
use Menu;
8
use Smr\Page\PlayerPage;
9
use Smr\Page\ReusableTrait;
10
use Smr\Race;
11
use Smr\Template;
12
13
class TraderRelations extends PlayerPage {
14
15
	use ReusableTrait;
16
17
	public string $file = 'trader_relations.php';
18
19
	public function build(AbstractSmrPlayer $player, Template $template): void {
20
		$template->assign('PageTopic', 'Trader Relations');
21
22
		Menu::trader();
23
24
		$politicalRelations = [];
25
		$personalRelations = [];
26
27
		$raceRelations = Globals::getRaceRelations($player->getGameID(), $player->getRaceID());
28
		foreach (Race::getAllNames() as $raceID => $raceName) {
29
			$politicalRelations[$raceName] = $raceRelations[$raceID];
30
			$personalRelations[$raceName] = $player->getPersonalRelation($raceID);
31
		}
32
		$template->assign('PoliticalRelations', $politicalRelations);
33
		$template->assign('PersonalRelations', $personalRelations);
34
	}
35
36
}
37