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

@@ 235-240 (lines=6) @@
232
233
        $gameOptions = $this->getAdminGameService()->getOptions();
234
        $gameStylesheet = $gameOptions->getMediaPath() . '/' . 'stylesheet_'. $this->game->getId(). '.css';
235
        if (is_file($gameStylesheet)) {
236
            $values = $form->get('stylesheet')->getValueOptions();
237
            $values[$gameStylesheet] = 'Style personnalisé de ce jeu';
238
239
            $form->get('stylesheet')->setAttribute('options', $values);
240
        }
241
242
        $form->bind($this->game);
243