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 ( 5797ad...3faf69 )
by Dan
29s queued 24s
created

WeaponDisplayToggleProcessor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 10 2
1
<?php declare(strict_types=1);
2
3
namespace Smr\Pages\Player;
4
5
use AbstractSmrPlayer;
6
use Smr\Page\PlayerPageProcessor;
7
use Smr\Page\ReusableTrait;
8
use Smr\Session;
9
10
class WeaponDisplayToggleProcessor extends PlayerPageProcessor {
11
12
	use ReusableTrait;
13
14
	public function build(AbstractSmrPlayer $player): never {
15
		$session = Session::getInstance();
16
17
		$player->setDisplayWeapons(!$player->isDisplayWeapons());
18
		// If this is called by ajax, we don't want to do any forwarding
19
		if ($session->ajax) {
20
			exit;
0 ignored issues
show
Best Practice introduced by
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
21
		}
22
23
		(new CurrentSector())->go();
24
	}
25
26
}
27