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 ( 30fe2e...c58695 )
by Dan
04:45
created

RevealMapProcessor::buildBetaFunctionsProcessor()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 8
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 12
rs 10
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