Code Duplication    Length = 15-15 lines in 2 locations

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

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