Code Duplication    Length = 4-4 lines in 3 locations

src/Kunstmaan/AdminBundle/Helper/Security/Acl/AclHelper.php 2 locations

@@ 98-101 (lines=4) @@
95
        $query = $this->cloneQuery($queryBuilder->getQuery());
96
97
        $builder = new MaskBuilder();
98
        foreach ($permissionDef->getPermissions() as $permission) {
99
            $mask = constant(get_class($builder) . '::MASK_' . strtoupper($permission));
100
            $builder->add($mask);
101
        }
102
        $query->setHint('acl.mask', $builder->get());
103
        $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Kunstmaan\AdminBundle\Helper\Security\Acl\AclWalker');
104
@@ 209-212 (lines=4) @@
206
            throw new InvalidArgumentException('You have to provide an entity class name!');
207
        }
208
        $builder = new MaskBuilder();
209
        foreach ($permissionDef->getPermissions() as $permission) {
210
            $mask = constant(get_class($builder) . '::MASK_' . strtoupper($permission));
211
            $builder->add($mask);
212
        }
213
214
        $query = new Query($this->em);
215
        $query->setHint('acl.mask', $builder->get());

src/Kunstmaan/AdminBundle/Helper/Security/Acl/AclNativeHelper.php 1 location

@@ 72-75 (lines=4) @@
69
        $query = $queryBuilder;
70
71
        $builder = new MaskBuilder();
72
        foreach ($permissionDef->getPermissions() as $permission) {
73
            $mask = constant(get_class($builder) . '::MASK_' . strtoupper($permission));
74
            $builder->add($mask);
75
        }
76
        $mask = $builder->get();
77
78
        /* @var $token TokenInterface */