Skip to content

Commit

Permalink
Refactored try-catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Feb 7, 2025
1 parent 993ca8d commit b915d1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Command/Game/NonBlocking/RandomizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ public function validate(array $argv)

public function run(AbstractSocket $socket, array $argv, int $id)
{
$params = $this->params($argv[1]);

try {
$params = $this->params($argv[1]);
if (count($params['items']) === 1) {
$color = array_key_first($params['items']);
$pieceIds = str_split(current($params['items']));
Expand Down

0 comments on commit b915d1d

Please sign in to comment.