Code Duplication    Length = 6-6 lines in 2 locations

src/PlaygroundGame/Service/Game.php 2 locations

@@ 170-175 (lines=6) @@
167
        }
168
169
            // I wait for the game to be saved to obtain its ID.
170
        if (! empty($data['uploadStylesheet']['tmp_name'])) {
171
            ErrorHandler::start();
172
            move_uploaded_file($data['uploadStylesheet']['tmp_name'], $path . 'stylesheet_' . $game->getId() . '.css');
173
            $game->setStylesheet($media_url . 'stylesheet_' . $game->getId() . '.css');
174
            ErrorHandler::stop(true);
175
        }
176
177
        if (! empty($data['uploadMainImage']['tmp_name'])) {
178
            ErrorHandler::start();
@@ 394-399 (lines=6) @@
391
            ErrorHandler::stop(true);
392
        }
393
394
        if (! empty($data['uploadStylesheet']['tmp_name'])) {
395
            ErrorHandler::start();
396
            move_uploaded_file($data['uploadStylesheet']['tmp_name'], $path . 'stylesheet_' . $game->getId() . '.css');
397
            $game->setStylesheet($media_url . 'stylesheet_' . $game->getId() . '.css');
398
            ErrorHandler::stop(true);
399
        }
400
401
        if (! empty($data['uploadFbShareImage']['tmp_name'])) {
402
            ErrorHandler::start();