Code Duplication    Length = 15-15 lines in 2 locations

eZ/Publish/Core/MVC/Symfony/Cache/Http/SignalSlot/AssignUserToUserGroupSlot.php 1 location

@@ 18-32 (lines=15) @@
15
 *
16
 * @todo This might be incomplete: what about the user's own http cache (user hash) ?
17
 */
18
class AssignUserToUserGroupSlot extends AbstractContentSlot
19
{
20
    /**
21
     * @param \eZ\Publish\Core\SignalSlot\Signal\UserService\AssignUserToUserGroupSignal $signal
22
     */
23
    protected function generateTags(Signal $signal)
24
    {
25
        return ['content-' . $signal->userId, 'content-' . $signal->userGroupId];
26
    }
27
28
    protected function supports(Signal $signal)
29
    {
30
        return $signal instanceof Signal\UserService\AssignUserToUserGroupSignal;
31
    }
32
}
33

eZ/Publish/Core/MVC/Symfony/Cache/Http/SignalSlot/UnassignUserFromUserGroupSlot.php 1 location

@@ 21-35 (lines=15) @@
18
 * The User's Content's HTTP cache must be cleared, yes.
19
 * And the user must be logged out, or its user hash cleared (not sure we can without clearing for all users)
20
 */
21
class UnassignUserFromUserGroupSlot extends AbstractContentSlot
22
{
23
    /**
24
     * @param \eZ\Publish\Core\SignalSlot\Signal\UserService\UnAssignUserFromUserGroupSignal $signal
25
     */
26
    protected function generateTags(Signal $signal)
27
    {
28
        return ['content-' . $signal->userId, 'content-' . $signal->userGroupId];
29
    }
30
31
    protected function supports(Signal $signal)
32
    {
33
        return $signal instanceof Signal\UserService\UnAssignUserFromUserGroupSignal;
34
    }
35
}
36