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
08:06 queued 03:15
created

BountyPlace::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Smr\Pages\Player\Headquarters;
4
5
use AbstractSmrPlayer;
6
use Menu;
7
use Smr\Database;
8
use Smr\Page\PlayerPage;
9
use Smr\Template;
10
11
class BountyPlace extends PlayerPage {
12
13
	public string $file = 'bounty_place.php';
14
15
	public function __construct(
16
		private readonly int $locationID
17
	) {}
18
19
	public function build(AbstractSmrPlayer $player, Template $template): void {
20
		$template->assign('PageTopic', 'Place Bounty');
21
22
		Menu::headquarters($this->locationID);
23
24
		$container = new BountyPlaceProcessor($this->locationID);
25
		$template->assign('SubmitHREF', $container->href());
26
27
		$bountyPlayers = [];
28
		$db = Database::getInstance();
29
		$dbResult = $db->read('SELECT player_id, player_name FROM player JOIN account USING(account_id) WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND account_id != ' . $db->escapeNumber($player->getAccountID()) . ' ORDER BY player_name');
30
		foreach ($dbResult->records() as $dbRecord) {
31
			$bountyPlayers[$dbRecord->getInt('player_id')] = htmlentities($dbRecord->getString('player_name'));
32
		}
33
		$template->assign('BountyPlayers', $bountyPlayers);
34
	}
35
36
}
37