Skip to content

Commit

Permalink
Improvements thanks to Scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Sep 20, 2021
1 parent 124fcea commit c0ccd9d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions classes/CheckDefenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ public static function fighters(\PDO $pdo_db, string $lang, int $sector, array $
'regional', 'universal'));

// Put the defense information into the array defenses
$num_defenses = 0;
$total_sec_fighters = 0;
$owner = true;

// Detect if this variable exists, and filter it.
// Returns false if anything wasn't right.
Expand All @@ -257,7 +255,6 @@ public static function fighters(\PDO $pdo_db, string $lang, int $sector, array $
$response = false;
}

$defenses = array();
$destination = null;
if (array_key_exists('destination', $_REQUEST) === true)
{
Expand All @@ -273,13 +270,8 @@ public static function fighters(\PDO $pdo_db, string $lang, int $sector, array $
// Get sector defense info from database
$defenses_gateway = new \Tki\Defenses\DefensesGateway($pdo_db);
$defenses_present = $defenses_gateway->selectFighterDefenses($sector);

// Correct the targetship bug to reflect the player info
$targetship = $playerinfo;

$defenses = array();
$num_defenses = 0;
$total_sector_mines = 0;
$owner = true;
$i = 0;

Expand Down Expand Up @@ -502,8 +494,6 @@ public static function mines(\PDO $pdo_db, string $lang, int $sector, string $ti
$num_defenses = 0;
$total_sector_mines = 0;
$owner = true;
$i = 0;

if (!empty($defenses_present))
{
foreach ($defenses_present as $current_defense)
Expand Down

0 comments on commit c0ccd9d

Please sign in to comment.