Code Duplication    Length = 6-6 lines in 2 locations

src/PlaygroundGame/Controller/Admin/GameController.php 1 location

@@ 102-107 (lines=6) @@
99
100
        $gameOptions = $this->getAdminGameService()->getOptions();
101
        $gameStylesheet = $gameOptions->getMediaPath() . '/' . 'stylesheet_'. $this->game->getId(). '.css';
102
        if (is_file($gameStylesheet)) {
103
            $values = $form->get('stylesheet')->getValueOptions();
104
            $values[$gameStylesheet] = 'Style personnalisé de ce jeu';
105
106
            $form->get('stylesheet')->setAttribute('options', $values);
107
        }
108
109
        $form->bind($this->game);
110

src/PlaygroundGame/Controller/Admin/MissionController.php 1 location

@@ 100-105 (lines=6) @@
97
98
        $gameOptions = $this->getAdminGameService()->getOptions();
99
        $gameStylesheet = $gameOptions->getMediaPath() . '/' . 'stylesheet_'. $game->getId(). '.css';
100
        if (is_file($gameStylesheet)) {
101
            $values = $form->get('stylesheet')->getValueOptions();
102
            $values[$gameStylesheet] = 'Style personnalisé de ce jeu';
103
104
            $form->get('stylesheet')->setAttribute('options', $values);
105
        }
106
107
        $form->bind($game);
108