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::build()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 20
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 13
nc 3
nop 2
dl 0
loc 20
rs 9.8333
c 0
b 0
f 0
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