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 — master (#812)
by Dan
04:25
created
tools/npc/chess.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
 	fclose($toEngine);
80 80
 	fclose($fromEngine);
81 81
 	proc_close($engine);
82
-}
83
-catch(Throwable $e) {
82
+} catch(Throwable $e) {
84 83
 	logException($e);
85 84
 	exit;
86 85
 }
Please login to merge, or discard this patch.
engine/Default/trader_status.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,12 +33,24 @@
 block discarded – undo
33 33
 $template->assign('HardwareHREF', SmrSession::getNewHREF($container));
34 34
 
35 35
 $hardware = [];
36
-if ($ship->canHaveScanner()) $hardware[] = 'Scanner';
37
-if ($ship->canHaveIllusion()) $hardware[] = 'Illusion Generator';
38
-if ($ship->canHaveCloak()) $hardware[] = 'Cloaking Device';
39
-if ($ship->canHaveJump()) $hardware[] = 'Jump Drive';
40
-if ($ship->canHaveDCS()) $hardware[] = 'Drone Scrambler';
41
-if (empty($hardware)) $hardware[] = 'none';
36
+if ($ship->canHaveScanner()) {
37
+	$hardware[] = 'Scanner';
38
+}
39
+if ($ship->canHaveIllusion()) {
40
+	$hardware[] = 'Illusion Generator';
41
+}
42
+if ($ship->canHaveCloak()) {
43
+	$hardware[] = 'Cloaking Device';
44
+}
45
+if ($ship->canHaveJump()) {
46
+	$hardware[] = 'Jump Drive';
47
+}
48
+if ($ship->canHaveDCS()) {
49
+	$hardware[] = 'Drone Scrambler';
50
+}
51
+if (empty($hardware)) {
52
+	$hardware[] = 'none';
53
+}
42 54
 $template->assign('Hardware', $hardware);
43 55
 
44 56
 $db->query('SELECT level_name,requirement FROM level WHERE requirement>' . $db->escapeNumber($player->getExperience()) . ' ORDER BY requirement ASC LIMIT 1');
Please login to merge, or discard this patch.
engine/Default/combat_simulator.php 1 patch
Braces   +14 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,10 +9,11 @@  discard block
 block discarded – undo
9 9
 $realAttackers = array();
10 10
 $attackers = array();
11 11
 $i=1;
12
-if(isset($_POST['attackers']))
12
+if(isset($_POST['attackers'])) {
13 13
 	foreach($_POST['attackers'] as $attackerName) {
14 14
 		if($attackerName=='none')
15 15
 			continue;
16
+}
16 17
 		if(isset($usedNames[$attackerName])) {
17 18
 			$duplicates = true;
18 19
 			continue;
@@ -24,17 +25,19 @@  discard block
 block discarded – undo
24 25
 		++$i;
25 26
 	}
26 27
 
27
-for(;$i<=10;++$i)
28
+for(;$i<=10;++$i) {
28 29
 	$attackers[$i] = null;
30
+}
29 31
 $template->assign('Attackers',$attackers);
30 32
 
31 33
 $i=1;
32 34
 $realDefenders = array();
33 35
 $defenders = array();
34
-if(isset($_POST['defenders']))
36
+if(isset($_POST['defenders'])) {
35 37
 	foreach($_POST['defenders'] as $defenderName) {
36 38
 		if($defenderName=='none')
37 39
 			continue;
40
+}
38 41
 		if(isset($usedNames[$defenderName])) {
39 42
 			$duplicates = true;
40 43
 			continue;
@@ -46,8 +49,9 @@  discard block
 block discarded – undo
46 49
 		++$i;
47 50
 	}
48 51
 	
49
-for(;$i<=10;++$i)
52
+for(;$i<=10;++$i) {
50 53
 	$defenders[$i] = null;
54
+}
51 55
 $template->assign('Defenders',$defenders);
52 56
 
53 57
 $template->assign('Duplicates',$duplicates);
@@ -62,12 +66,14 @@  discard block
 block discarded – undo
62 66
 		while(count($realAttackers)>0 && count($realDefenders)>0) {
63 67
 			runAnAttack($realAttackers,$realDefenders);
64 68
 			foreach($realAttackers as $key => &$teamPlayer) {
65
-				if($teamPlayer->isDead())
66
-					unset($realAttackers[$key]);
69
+				if($teamPlayer->isDead()) {
70
+									unset($realAttackers[$key]);
71
+				}
67 72
 			} unset($teamPlayer);
68 73
 			foreach($realDefenders as $key => &$teamPlayer) {
69
-				if($teamPlayer->isDead())
70
-					unset($realDefenders[$key]);
74
+				if($teamPlayer->isDead()) {
75
+									unset($realDefenders[$key]);
76
+				}
71 77
 			} unset($teamPlayer);
72 78
 		}
73 79
 	}
Please login to merge, or discard this patch.
templates/Default/admin/Default/1.6/GameDetails.inc 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,10 @@
 block discarded – undo
44 44
 		<td>
45 45
 			<select name="game_type" class="InputFields"><?php
46 46
 			foreach (SmrGame::GAME_TYPES as $GameTypeID => $GameType) {
47
-				?><option value="<?php echo $GameTypeID; ?>" <?php if ($GameType == $Game['gameType']) echo 'selected'; ?>><?php echo $GameType; ?></option><?php
47
+				?><option value="<?php echo $GameTypeID; ?>" <?php if ($GameType == $Game['gameType']) {
48
+					echo 'selected';
49
+				}
50
+				?>><?php echo $GameType; ?></option><?php
48 51
 			} ?>
49 52
 			</select>
50 53
 		</td>
Please login to merge, or discard this patch.
templates/Default/engine/Default/beta_functions.php 1 patch
Braces   +14 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,8 +76,13 @@  discard block
 block discarded – undo
76 76
 	<input type="number" name="amount" value="0" min="<?php echo MIN_GLOBAL_RELATIONS; ?>" max="<?php echo MAX_GLOBAL_RELATIONS; ?>" style="width:75px" />&nbsp;
77 77
 	<select name="race" class="InputFields"><?php
78 78
 		foreach (Globals::getRaces() as $race) {
79
-			if ($race['Race ID'] == $ThisPlayer->getRaceID()) continue;
80
-			if ($race['Race ID'] == RACE_NEUTRAL) continue; ?>
79
+			if ($race['Race ID'] == $ThisPlayer->getRaceID()) {
80
+				continue;
81
+			}
82
+			if ($race['Race ID'] == RACE_NEUTRAL) {
83
+				continue;
84
+			}
85
+			?>
81 86
 			<option value="<?php echo $race['Race ID']; ?>"><?php echo $race['Race Name']; ?></option><?php
82 87
 		} ?>
83 88
 	</select>&nbsp;&nbsp;
@@ -88,8 +93,13 @@  discard block
 block discarded – undo
88 93
 <form method="POST" action="<?php echo $ChangeRaceHREF; ?>">
89 94
 	<select name="race" class="InputFields"><?php
90 95
 		foreach (Globals::getRaces() as $race) {
91
-			if ($race['Race ID'] == $ThisPlayer->getRaceID()) continue;
92
-			if ($race['Race ID'] == RACE_NEUTRAL) continue; ?>
96
+			if ($race['Race ID'] == $ThisPlayer->getRaceID()) {
97
+				continue;
98
+			}
99
+			if ($race['Race ID'] == RACE_NEUTRAL) {
100
+				continue;
101
+			}
102
+			?>
93 103
 			<option value="<?php echo $race['Race ID']; ?>"><?php echo $race['Race Name']; ?></option><?php
94 104
 		} ?>
95 105
 	</select>&nbsp;&nbsp;
Please login to merge, or discard this patch.
tools/discord/commands/seed.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@
 block discarded – undo
4 4
 
5 5
 $fn_seed = function($message) {
6 6
 	$link = new GameLink($message->channel, $message->author);
7
-	if (!$link->valid) return;
7
+	if (!$link->valid) {
8
+		return;
9
+	}
8 10
 
9 11
 	$result = shared_channel_msg_seed($link->player);
10 12
 	$message->channel->sendMessage(join(EOL, $result));
Please login to merge, or discard this patch.
tools/discord/commands/turns.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@  discard block
 block discarded – undo
17 17
 
18 18
 $fn_turns = function($message) {
19 19
 	$link = new GameLink($message->channel, $message->author);
20
-	if (!$link->valid) return;
20
+	if (!$link->valid) {
21
+		return;
22
+	}
21 23
 
22 24
 	$msg = get_turns_message($link->player);
23 25
 	$message->channel->sendMessage($msg);
@@ -25,7 +27,9 @@  discard block
 block discarded – undo
25 27
 
26 28
 $fn_turns_all = function($message) {
27 29
 	$link = new GameLink($message->channel, $message->author);
28
-	if (!$link->valid) return;
30
+	if (!$link->valid) {
31
+		return;
32
+	}
29 33
 	$player = $link->player;
30 34
 
31 35
 	$results = array_map('get_turns_message', $player->getSharingPlayers(true));
Please login to merge, or discard this patch.
tools/discord/commands/op.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,9 @@  discard block
 block discarded – undo
6 6
 
7 7
 $fn_op = function($message) {
8 8
 	$link = new GameLink($message->channel, $message->author);
9
-	if (!$link->valid) return;
9
+	if (!$link->valid) {
10
+		return;
11
+	}
10 12
 	$player = $link->player;
11 13
 
12 14
 	// print info about the next op
@@ -16,7 +18,9 @@  discard block
 block discarded – undo
16 18
 
17 19
 $fn_op_list = function($message) {
18 20
 	$link = new GameLink($message->channel, $message->author);
19
-	if (!$link->valid) return;
21
+	if (!$link->valid) {
22
+		return;
23
+	}
20 24
 	$player = $link->player;
21 25
 
22 26
 	// print list of attendees
@@ -26,7 +30,9 @@  discard block
 block discarded – undo
26 30
 
27 31
 $fn_op_turns = function($message) {
28 32
 	$link = new GameLink($message->channel, $message->author);
29
-	if (!$link->valid) return;
33
+	if (!$link->valid) {
34
+		return;
35
+	}
30 36
 	$player = $link->player;
31 37
 
32 38
 	// print list of attendees
Please login to merge, or discard this patch.
tools/discord/commands/game.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 
3 3
 $fn_game = function($message) {
4 4
 	$link = new GameLink($message->channel, $message->author);
5
-	if (!$link->valid) return;
5
+	if (!$link->valid) {
6
+		return;
7
+	}
6 8
 
7 9
 	$game = SmrGame::getGame($link->player->getGameID(), true);
8 10
 	$msg = "I am linked to game `" . $game->getDisplayName() . "` in this channel.";
Please login to merge, or discard this patch.