We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ -1,34 +1,34 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | -if(isset($ForcesCombatResults['Results']) && is_array($ForcesCombatResults['Results'])) { | |
| 3 | -	foreach($ForcesCombatResults['Results'] as $ForceType => $ForceResults) { | |
| 4 | - $ShootingWeapon =& $ForceResults['Weapon']; | |
| 5 | - $ShotHit =& $ForceResults['Hit']; | |
| 6 | - $ActualDamage =& $ForceResults['ActualDamage']; | |
| 7 | - $WeaponDamage =& $ForceResults['WeaponDamage']; | |
| 8 | - $TargetPlayer =& $ForceResults['TargetPlayer']; | |
| 2 | +if (isset($ForcesCombatResults['Results']) && is_array($ForcesCombatResults['Results'])) { | |
| 3 | +	foreach ($ForcesCombatResults['Results'] as $ForceType => $ForceResults) { | |
| 4 | + $ShootingWeapon = & $ForceResults['Weapon']; | |
| 5 | + $ShotHit = & $ForceResults['Hit']; | |
| 6 | + $ActualDamage = & $ForceResults['ActualDamage']; | |
| 7 | + $WeaponDamage = & $ForceResults['WeaponDamage']; | |
| 8 | + $TargetPlayer = & $ForceResults['TargetPlayer']; | |
| 9 | 9 | ?> | 
| 10 | 10 | <span class="cds"><?php echo $ActualDamage['Launched'] ?? $WeaponDamage['Launched']; ?></span><?php | 
| 11 | -		if($ForceType == 'Mines') { | |
| 11 | +		if ($ForceType == 'Mines') { | |
| 12 | 12 | ?> mines kamikaze themselves against <?php | 
| 13 | -		} else if($ForceType == 'Drones') { | |
| 13 | +		} else if ($ForceType == 'Drones') { | |
| 14 | 14 | ?> combat drones launch at <?php | 
| 15 | -		} else if($ForceType == 'Scouts') { | |
| 15 | +		} else if ($ForceType == 'Scouts') { | |
| 16 | 16 | ?> scout drones kamikaze themselves against <?php | 
| 17 | 17 | } | 
| 18 | 18 | |
| 19 | -		if($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } | |
| 19 | +		if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } | |
| 20 | 20 | echo $TargetPlayer->getDisplayName(); | 
| 21 | 21 |  		if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) { | 
| 22 | -			if(!$ShotHit) { | |
| 22 | +			if (!$ShotHit) { | |
| 23 | 23 | ?> and misses<?php | 
| 24 | -			} else if($ActualDamage['TotalDamage'] == 0) { | |
| 25 | -				if($WeaponDamage['Shield'] > 0) { | |
| 26 | -					if($ActualDamage['HasCDs']) { | |
| 24 | +			} else if ($ActualDamage['TotalDamage'] == 0) { | |
| 25 | +				if ($WeaponDamage['Shield'] > 0) { | |
| 26 | +					if ($ActualDamage['HasCDs']) { | |
| 27 | 27 | ?> which proves ineffective against their combat drones<?php | 
| 28 | 28 |  					} else { | 
| 29 | 29 | ?> which washes harmlessly over their hull<?php | 
| 30 | 30 | } | 
| 31 | -				} else if($WeaponDamage['Armour'] > 0) { | |
| 31 | +				} else if ($WeaponDamage['Armour'] > 0) { | |
| 32 | 32 | ?> which is deflected by their shields<?php | 
| 33 | 33 |  				} else { | 
| 34 | 34 | ?> but it cannot do any damage<?php | 
| @@ -37,31 +37,31 @@ discard block | ||
| 37 | 37 | ?> destroying <?php | 
| 38 | 38 | } | 
| 39 | 39 | $DamageTypes = 0; | 
| 40 | -			if($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } | |
| 41 | -			if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } | |
| 42 | -			if($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } | |
| 40 | +			if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } | |
| 41 | +			if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } | |
| 42 | +			if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } | |
| 43 | 43 | |
| 44 | -			if($ActualDamage['Shield'] > 0) { | |
| 44 | +			if ($ActualDamage['Shield'] > 0) { | |
| 45 | 45 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php | 
| 46 | 46 | $this->doDamageTypeReductionDisplay($DamageTypes); | 
| 47 | 47 | } | 
| 48 | -			if($ActualDamage['NumCDs'] > 0) { | |
| 48 | +			if ($ActualDamage['NumCDs'] > 0) { | |
| 49 | 49 | ?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> drones<?php | 
| 50 | 50 | $this->doDamageTypeReductionDisplay($DamageTypes); | 
| 51 | 51 | } | 
| 52 | -			if($ActualDamage['Armour'] > 0) { | |
| 52 | +			if ($ActualDamage['Armour'] > 0) { | |
| 53 | 53 | ?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php | 
| 54 | 54 | } | 
| 55 | 55 | } ?>. | 
| 56 | 56 | <br /><?php | 
| 57 | 57 |  		if ($ShotHit && $ActualDamage['KillingShot']) { | 
| 58 | -			$this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$ForceResults['KillResults'],'TargetPlayer'=>$TargetPlayer)); | |
| 58 | +			$this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$ForceResults['KillResults'], 'TargetPlayer'=>$TargetPlayer)); | |
| 59 | 59 | } | 
| 60 | 60 | } | 
| 61 | 61 | } | 
| 62 | -if(isset($ForcesCombatResults['ForcesDestroyed']) && $ForcesCombatResults['ForcesDestroyed']) { | |
| 62 | +if (isset($ForcesCombatResults['ForcesDestroyed']) && $ForcesCombatResults['ForcesDestroyed']) { | |
| 63 | 63 | ?>Forces are <span class="red">DESTROYED!</span><br /><?php | 
| 64 | 64 | } | 
| 65 | 65 | |
| 66 | -$TotalDamage =& $ForcesCombatResults['TotalDamage'] ?> | |
| 67 | -The forces <?php if($TotalDamage > 0){ ?>hit for a total of <span class="red"><?php echo number_format($TotalDamage) ?></span> damage in this round of combat<?php } else{ ?>do no damage this round<?php } ?>. | |
| 66 | +$TotalDamage = & $ForcesCombatResults['TotalDamage'] ?> | |
| 67 | +The forces <?php if ($TotalDamage > 0) { ?>hit for a total of <span class="red"><?php echo number_format($TotalDamage) ?></span> damage in this round of combat<?php } else { ?>do no damage this round<?php } ?>. | |