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

CheatingShipCheckProcessor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 18 1
A __construct() 0 6 1
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