Code Duplication    Length = 8-9 lines in 2 locations

src/eXpansion/Bundle/Acme/Plugins/Gui/TotoWindowFactory.php 1 location

@@ 271-278 (lines=8) @@
268
    ) {
269
        $maps = $this->mapStorage->getMaps();
270
        $data = [];
271
        foreach ($maps as $map) {
272
            $data[] = [
273
                "uid" => $map->uId,
274
                "author" => $map->author,
275
                "name" => TMString::trimLinks($map->name),
276
                "length" => $this->time->timeToText($map->goldTime, false),
277
            ];
278
        }
279
        $this->setData($manialink, $data);
280
    }
281

src/eXpansion/Bundle/Maps/Plugins/Gui/MapsWindowFactory.php 1 location

@@ 108-116 (lines=9) @@
105
         * @var Map $map
106
         */
107
        $i = 1;
108
        foreach ($maps as $uid => $map) {
109
            $this->genericData[] = [
110
                'index' => $i++,
111
                'name' => TMString::trimControls($map->name),
112
                'author' => $map->author,
113
                'time' => $this->timeFormatter->timeToText($map->goldTime, true),
114
                'wish' => $map
115
            ];
116
        }
117
118
    }
119