Skip to content

Commit

Permalink
GH-NA Properly short-circuit out of a switch case
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Dec 6, 2020
1 parent 8363c64 commit 9bd0fbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/helpers/world/elements.cost.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ function getElementUserCostBase($elementID) {
switch ($costResource) {
case 'darkEnergy':
if (!isset($_Vars_PremiumBuildingPrices[$elementID])) {
continue;
break;
}

if ($_Vars_PremiumBuildingPrices[$elementID] <= 0) {
continue;
break;
}

$baseCost[$costResource] = $_Vars_PremiumBuildingPrices[$elementID];

continue;
break;
}
}

Expand Down

0 comments on commit 9bd0fbd

Please sign in to comment.