Code Duplication    Length = 6-6 lines in 2 locations

src/Controller/Admin/MissionController.php 1 location

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

src/Controller/Admin/GameController.php 1 location

@@ 218-223 (lines=6) @@
215
216
        $gameOptions = $this->getAdminGameService()->getOptions();
217
        $gameStylesheet = $gameOptions->getMediaPath() . '/' . 'stylesheet_'. $this->game->getId(). '.css';
218
        if (is_file($gameStylesheet)) {
219
            $values = $form->get('stylesheet')->getValueOptions();
220
            $values[$gameStylesheet] = 'Style personnalisé de ce jeu';
221
222
            $form->get('stylesheet')->setAttribute('options', $values);
223
        }
224
225
        $form->bind($this->game);
226