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 (#1498)
by Dan
04:47
created

RevealMapProcessor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildBetaFunctionsProcessor() 0 12 2
1
<?php declare(strict_types=1);
2
3
namespace Smr\Pages\Player\BetaFunctions;
4
5
use AbstractSmrPlayer;
6
use Smr\Database;
7
use SmrPort;
8
9
class RevealMapProcessor extends BetaFunctionsPageProcessor {
10
11
	public function buildBetaFunctionsProcessor(AbstractSmrPlayer $player): void {
12
		$account_id = $player->getAccountID();
13
		$game_id = $player->getGameID();
14
		// delete all entries from the player_visited_sector/port table
15
		$db = Database::getInstance();
16
		$db->write('DELETE FROM player_visited_sector WHERE ' . $player->getSQL());
17
18
		// add port infos
19
		$dbResult = $db->read('SELECT * FROM port WHERE game_id = ' . $db->escapeNumber($game_id));
20
		foreach ($dbResult->records() as $dbRecord) {
21
			$port = SmrPort::getPort($game_id, $dbRecord->getInt('sector_id'), false, $dbRecord);
22
			$port->addCachePort($account_id);
23
		}
24
	}
25
26
}
27