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

AddWeaponsProcessor::buildBetaFunctionsProcessor()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 6
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Smr\Pages\Player\BetaFunctions;
4
5
use AbstractSmrPlayer;
6
use Smr\Request;
7
use SmrWeapon;
8
9
class AddWeaponsProcessor extends BetaFunctionsPageProcessor {
10
11
	public function buildBetaFunctionsProcessor(AbstractSmrPlayer $player): void {
12
		$ship = $player->getShip();
13
		$weapon = SmrWeapon::getWeapon(Request::getInt('weapon_id'));
14
		$amount = Request::getInt('amount');
15
		for ($i = 0; $i < $amount; $i++) {
16
			$ship->addWeapon($weapon);
17
		}
18
	}
19
20
}
21