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 (#817)
by Dan
03:42
created
templates/Default/engine/Default/includes/PlanetCombatResults.inc 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@  discard block
 block discarded – undo
5 5
 	echo $CombatPlanet->getDisplayName();
6 6
 	if($TotalDamage > 0) {
7 7
 		?> hit for a total of <span class="red"><?php echo $TotalDamage; ?></span> damage in this round of combat of which <span class="red"><?php echo $PlanetCombatResults['TotalDamagePerTargetPlayer'][$ThisPlayer->getAccountID()]; ?></span> was done to you<?php
8
-	}
9
-	else {
8
+	} else {
10 9
 		?> does no damage this round<?php
11 10
 	} ?>. <?php echo $AttackLogLink;
12 11
 	return;
@@ -23,24 +22,19 @@  discard block
 block discarded – undo
23 22
 		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) {
24 23
 			if(!$ShotHit) {
25 24
 				?> and misses<?php
26
-			}
27
-			else if($ActualDamage['TotalDamage'] == 0) {
25
+			} else if($ActualDamage['TotalDamage'] == 0) {
28 26
 				if($WeaponDamage['Shield'] > 0) {
29 27
 					if($ActualDamage['HasCDs']) {
30 28
 						?> which proves ineffective against their combat drones<?php
31
-					}
32
-					else {
29
+					} else {
33 30
 						?> which washes harmlessly over their hull<?php
34 31
 					}
35
-				}
36
-				else if($WeaponDamage['Armour'] > 0) {
32
+				} else if($WeaponDamage['Armour'] > 0) {
37 33
 					?> which is deflected by their shields<?php
38
-				}
39
-				else {
34
+				} else {
40 35
 					?> but it cannot do any damage<?php
41 36
 				}
42
-			}
43
-			else {
37
+			} else {
44 38
 				?> destroying <?php
45 39
 				$DamageTypes = 0;
46 40
 				if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; }
@@ -79,27 +73,22 @@  discard block
 block discarded – undo
79 73
 	echo $CombatPlanet->getDisplayName();
80 74
 	if($WeaponDamage['Launched'] == 0) {
81 75
 		?> fails to launch it's combat drones<?php
82
-	}
83
-	else {
76
+	} else {
84 77
 		?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php if($ActualDamage['TargetAlreadyDead']){ ?>the debris that was once <?php } echo $TargetPlayer->getDisplayName();
85 78
 		if(!$ActualDamage['TargetAlreadyDead']) {
86 79
 			if($ActualDamage['TotalDamage'] == 0) {
87 80
 				if($WeaponDamage['Shield'] > 0) {
88 81
 					if($ActualDamage['HasCDs']) {
89 82
 						?> which prove ineffective against their combat drones<?php
90
-					}
91
-					else {
83
+					} else {
92 84
 						?> which washes harmlessly over their hull<?php
93 85
 					}
94
-				}
95
-				else if($WeaponDamage['Armour'] > 0) {
86
+				} else if($WeaponDamage['Armour'] > 0) {
96 87
 					?> which is deflected by their shields<?php
97
-				}
98
-				else {
88
+				} else {
99 89
 					?> but they cannot do any damage<?php
100 90
 				}
101
-			}
102
-			else {
91
+			} else {
103 92
 				?> destroying <?php
104 93
 				if($ActualDamage['Shield'] > 0) {
105 94
 					?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php
@@ -124,7 +113,6 @@  discard block
 block discarded – undo
124 113
 echo $CombatPlanet->getDisplayName();
125 114
 if($TotalDamage > 0) {
126 115
 	?> hit for a total of <span class="red"><?php echo $TotalDamage; ?></span> damage in this round of combat<?php
127
-}
128
-else {
116
+} else {
129 117
 	?> does no damage this round. You call that a planet? It needs a better builder<?php
130 118
 } ?>.
Please login to merge, or discard this patch.
admin/Default/1.6/universe_create_save_processing.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,13 +104,15 @@
 block discarded – undo
104 104
 		$numberOfPlanets = $_POST['type' . $planetTypeID];
105 105
 		for ($i = 1; $i <= $numberOfPlanets; $i++) {
106 106
 			$galSector = $galSectors[array_rand($galSectors)];
107
-			while ($galSector->hasPlanet()) $galSector = $galSectors[array_rand($galSectors)]; //1 per sector
107
+			while ($galSector->hasPlanet()) {
108
+				$galSector = $galSectors[array_rand($galSectors)];
109
+			}
110
+			//1 per sector
108 111
 			$galSector->createPlanet($planetTypeID);
109 112
 		}
110 113
 	}
111 114
 	$var['message'] = '<span class="green">Success</span> : Succesfully added planets.';
112
-}
113
-elseif ($submit == 'Create Ports') {
115
+} elseif ($submit == 'Create Ports') {
114 116
 	$numLevelPorts = [];
115 117
 	for ($i = 1; $i <= SmrPort::MAX_LEVEL; $i++) {
116 118
 		$numLevelPorts[$i] = $_REQUEST['port' . $i] ?? 0;
Please login to merge, or discard this patch.
lib/Default/smr.inc 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -469,8 +469,9 @@
 block discarded – undo
469 469
 
470 470
 		if (!$player->isDead() && $player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT &&
471 471
 			$player->getNewbieWarning() &&
472
-			$var['url'] != 'newbie_warning_processing.php')
473
-			forward(create_container('newbie_warning_processing.php'));
472
+			$var['url'] != 'newbie_warning_processing.php') {
473
+					forward(create_container('newbie_warning_processing.php'));
474
+		}
474 475
 	}
475 476
 
476 477
 	// Initialize the template
Please login to merge, or discard this patch.
engine/Default/shop_hardware_processing.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,11 +32,16 @@
 block discarded – undo
32 32
 	$ship->increaseHardware($hardware_id, $amount);
33 33
 
34 34
 	//HoF
35
-	if ($hardware_id == HARDWARE_COMBAT) $player->increaseHOF($amount, array('Forces', 'Bought', 'Combat Drones'), HOF_ALLIANCE);
36
-	if ($hardware_id == HARDWARE_SCOUT) $player->increaseHOF($amount, array('Forces', 'Bought', 'Scout Drones'), HOF_ALLIANCE);
37
-	if ($hardware_id == HARDWARE_MINE) $player->increaseHOF($amount, array('Forces', 'Bought', 'Mines'), HOF_ALLIANCE);
38
-}
39
-elseif ($action == 'Sell') {
35
+	if ($hardware_id == HARDWARE_COMBAT) {
36
+		$player->increaseHOF($amount, array('Forces', 'Bought', 'Combat Drones'), HOF_ALLIANCE);
37
+	}
38
+	if ($hardware_id == HARDWARE_SCOUT) {
39
+		$player->increaseHOF($amount, array('Forces', 'Bought', 'Scout Drones'), HOF_ALLIANCE);
40
+	}
41
+	if ($hardware_id == HARDWARE_MINE) {
42
+		$player->increaseHOF($amount, array('Forces', 'Bought', 'Mines'), HOF_ALLIANCE);
43
+	}
44
+	} elseif ($action == 'Sell') {
40 45
 	// We only allow selling combat drones
41 46
 	if ($hardware_id != HARDWARE_COMBAT) {
42 47
 		throw new Exception('This item cannot be sold!');
Please login to merge, or discard this patch.
htdocs/weapon_list.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
 	$template->assign('Weapons', $weapons);
46 46
 
47 47
 	$template->display('weapon_list.php');
48
-}
49
-catch (Throwable $e) {
48
+} catch (Throwable $e) {
50 49
 	handleException($e);
51 50
 }
52 51
 
Please login to merge, or discard this patch.
lib/Default/Sorter.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@
 block discarded – undo
20 20
 	}
21 21
 
22 22
 	public static function cmpNum($a, $b) {
23
-		if ($a == $b) return 0;
23
+		if ($a == $b) {
24
+			return 0;
25
+		}
24 26
 		return (self::$reverseOrder ? -1 : 1) * ($a < $b ? -1 : 1);
25 27
 	}
26 28
 
Please login to merge, or discard this patch.