Code Duplication    Length = 15-15 lines in 2 locations

src/eXpansion/Framework/Core/Plugins/GuiHandler.php 2 locations

@@ 306-320 (lines=15) @@
303
    /**
304
     * @inheritdoc
305
     */
306
    public function onExpansionGroupAddUser(Group $group, $loginAdded)
307
    {
308
        $group = $group->getName();
309
310
        // User was added to group, need to display all manialinks of the group to this user
311
        if (isset($this->displayeds[$group])) {
312
            foreach ($this->displayeds[$group] as $mlId => $manialink) {
313
                $this->individualQueu[$mlId][$loginAdded] = $manialink;
314
315
                if (isset($this->hideIndividualQueu[$mlId]) && isset($this->hideIndividualQueu[$mlId][$loginAdded])) {
316
                    unset ($this->hideIndividualQueu[$mlId][$loginAdded]);
317
                }
318
            }
319
        }
320
    }
321
322
    /**
323
     * @inheritdoc
@@ 325-339 (lines=15) @@
322
    /**
323
     * @inheritdoc
324
     */
325
    public function onExpansionGroupRemoveUser(Group $group, $loginRemoved)
326
    {
327
        $group = $group->getName();
328
329
        // User was removed from group, need to hide all manialinks of the group to this user
330
        if (isset($this->displayeds[$group])) {
331
            foreach ($this->displayeds[$group] as $mlId => $manialink) {
332
                $this->hideIndividualQueu[$mlId][$loginRemoved] = $manialink;
333
334
                if (isset($this->individualQueu[$mlId]) && isset($this->individualQueu[$mlId][$loginRemoved])) {
335
                    unset ($this->individualQueu[$mlId][$loginRemoved]);
336
                }
337
            }
338
        }
339
    }
340
341
    /**
342
     * @inheritdoc