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 — page-classes ( c69fb3 )
by Dan
07:23
created

CheatingShipCheckProcessor::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Smr\Pages\Admin;
4
5
use Smr\Database;
6
use Smr\Page\AccountPageProcessor;
7
use SmrAccount;
8
9
class CheatingShipCheckProcessor extends AccountPageProcessor {
10
11
	public function __construct(
12
		private readonly int $gameID,
13
		private readonly int $hardwareTypeID,
14
		private readonly int $maxAmount,
15
		private readonly int $accountID
16
	) {}
17
18
	public function build(SmrAccount $account): never {
19
		//get our variables
20
		$game_id = $this->gameID;
21
		$hardware_id = $this->hardwareTypeID;
22
		$max_amount = $this->maxAmount;
23
		$account_id = $this->accountID;
24
25
		//update it so they arent cheating
26
		$db = Database::getInstance();
27
		$db->write('UPDATE ship_has_hardware ' .
28
				   'SET amount = ' . $db->escapeNumber($max_amount) . ' ' .
29
				   'WHERE game_id = ' . $db->escapeNumber($game_id) . ' AND ' .
30
						 'account_id = ' . $db->escapeNumber($account_id) . ' AND ' .
31
						 'hardware_type_id = ' . $db->escapeNumber($hardware_id));
32
33
		//now erdirect back to page
34
		$container = new CheatingShipCheck();
35
		$container->go();
36
	}
37
38
}
39