Skip to content

Commit

Permalink
Further phpstan error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Jul 12, 2020
1 parent 9e0fd25 commit d3e557a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/CheckDefenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class CheckDefenses
{
public static function sectorFighters(\PDO $pdo_db, string $lang, int $sector, string $calledfrom, int $energyscooped, array $playerinfo, Reg $tkireg, string $title): void
public static function sectorFighters(\PDO $pdo_db, string $lang, int $sector, string $calledfrom, int $energyscooped, array $playerinfo, Reg $tkireg): void
{
$total_sec_fighters = 0;

Expand Down
2 changes: 1 addition & 1 deletion classes/Defenses/DefensesGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function selectDefenses(int $sector_id): ?array
$sql = "SELECT * FROM ::prefix::sector_defense WHERE sector_id = :sector_id";
$stmt = $this->pdo_db->prepare($sql);
$stmt->bindParam(':sector_id', $sector_id, \PDO::PARAM_INT);
$result = $stmt->execute();
$stmt->execute();
\Tki\Db::logDbErrors($this->pdo_db, $sql, __LINE__, __FILE__); // Log any errors, if there are any
// A little magic here. If it couldn't select a defense in the sector, the following call will return false - which is what we want for "no defenses found".
$defense_present = $stmt->fetchAll(\PDO::FETCH_ASSOC);
Expand Down
1 change: 1 addition & 0 deletions classes/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public static function betterParseIni(string $file): array
}
}
}

return $out;
}
}
2 changes: 1 addition & 1 deletion classes/Logs/LogsGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(\PDO $pdo_db) // Create the this->pdo_db object

public function selectLogsInfo(int $ship_id, string $startdate): array
{
$logsinfo = Array();
$logsinfo = array();
$sql = "SELECT * FROM ::prefix::logs WHERE ship_id = :ship_id AND time LIKE ':start_date%' ORDER BY time DESC, type DESC";
$stmt = $this->pdo_db->prepare($sql);
$stmt->bindParam(':ship_id', $ship_id, \PDO::PARAM_INT);
Expand Down

0 comments on commit d3e557a

Please sign in to comment.