Skip to content

Commit

Permalink
GH-230 Use PlanetType enum
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Jul 6, 2022
1 parent 66ec6bb commit 60390c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/per_module/common/userdata_helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use UniEngine\Engine\Common\Exceptions;
use UniEngine\Engine\Includes\Helpers\Users;
use UniEngine\Engine\Includes\Helpers\World;

class UniEngineDataFetchException extends Exceptions\UniEngineException {};
class UniEnginePlanetDataFetchException extends UniEngineDataFetchException {};
Expand Down Expand Up @@ -217,7 +218,7 @@ function fetchGalaxyData(&$planet) {
$planetID = $planet['id'];

$selectorKey = (
$planet['planet_type'] == 1 ?
$planet['planet_type'] == World\Enums\PlanetType::Planet ?
'id_planet' :
'id_moon'
);
Expand Down

0 comments on commit 60390c0

Please sign in to comment.