From 36b4772497d6c88c0dc3ab227dce95bf6f99ab1a Mon Sep 17 00:00:00 2001 From: The Kabal Date: Mon, 20 Sep 2021 08:04:30 -0400 Subject: [PATCH] Improvements thanks to Scrutinizer --- classes/Planet.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/classes/Planet.php b/classes/Planet.php index 417f58f7..d1489e53 100644 --- a/classes/Planet.php +++ b/classes/Planet.php @@ -26,7 +26,7 @@ class Planet { - public static function getOwner(\PDO $pdo_db, int $planet_id, array $owner_info): bool + public static function getOwner(\PDO $pdo_db, int $planet_id, array $owner_info): ?array { $owner_info = null; if ($planet_id > 0) @@ -42,11 +42,10 @@ public static function getOwner(\PDO $pdo_db, int $planet_id, array $owner_info) if ($result !== false) { $owner_info = (array) $stmt->fetch(\PDO::FETCH_ASSOC); - return true; } } - return false; + return $owner_info; } public static function bombing(