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
Pull Request — main (#1494)
by Dan
10:59 queued 05:29
created

TraderBounties   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 20 3
1
<?php declare(strict_types=1);
2
3
namespace Smr\Pages\Player;
4
5
use AbstractSmrPlayer;
6
use Menu;
7
use Smr\BountyType;
8
use Smr\Page\PlayerPage;
9
use Smr\Page\ReusableTrait;
10
use Smr\Template;
11
12
class TraderBounties extends PlayerPage {
13
14
	use ReusableTrait;
15
16
	public string $file = 'trader_bounties.php';
17
18
	public function build(AbstractSmrPlayer $player, Template $template): void {
19
		$template->assign('PageTopic', 'Bounties');
20
21
		Menu::trader();
22
23
		foreach (BountyType::cases() as $type) {
24
			if ($player->hasCurrentBounty($type)) {
25
				$bounty = $player->getCurrentBounty($type);
26
				$msg = number_format($bounty['Amount']) . ' credits and ' . number_format($bounty['SmrCredits']) . ' SMR credits';
27
			} else {
28
				$msg = 'None';
29
			}
30
			$template->assign('Bounty' . $type->value, $msg);
31
		}
32
33
		$allClaims = [
34
			$player->getClaimableBounties(BountyType::HQ),
35
			$player->getClaimableBounties(BountyType::UG),
36
		];
37
		$template->assign('AllClaims', $allClaims);
38
	}
39
40
}
41