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

@@ 91-96 (lines=6) @@
88
89
        $gameOptions = $this->getAdminGameService()->getOptions();
90
        $gameStylesheet = $gameOptions->getMediaPath() . '/' . 'stylesheet_'. $game->getId(). '.css';
91
        if (is_file($gameStylesheet)) {
92
            $values = $form->get('stylesheet')->getValueOptions();
93
            $values[$gameStylesheet] = 'Style personnalisé de ce jeu';
94
95
            $form->get('stylesheet')->setAttribute('options', $values);
96
        }
97
98
        $form->bind($game);
99