Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jan 18, 2024
1 parent cdeed20 commit 9b3118b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gatherling/api_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ function repr_json_series($series)
$json['most_recent_season'] = $mostRecent->season;
$json['most_recent_number'] = $mostRecent->number;
$json['most_recent_id'] = $mostRecent->id;

return $json;
}

Expand Down Expand Up @@ -255,16 +256,15 @@ function add_player_to_event($event, $name, $decklist)
} else {
$result['success'] = false;
}
if (!empty($decklist))
{
$decklist = str_replace("|", "\n", $decklist);
if (!empty($decklist)) {
$decklist = str_replace('|', "\n", $decklist);

$deck = new Deck(0);
$deck->playername = $player->name;
$deck->eventname = $event->name;
$deck->event_id = $event->id;
$deck->maindeck_cards = parseCardsWithQuantity($decklist);
$deck->sideboard_cards = parseCardsWithQuantity("");
$deck->sideboard_cards = parseCardsWithQuantity('');
$deck->save();

return $deck;
Expand Down

0 comments on commit 9b3118b

Please sign in to comment.