Code Duplication    Length = 15-15 lines in 2 locations

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

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