Code Duplication    Length = 6-9 lines in 2 locations

src/Kunstmaan/AdminBundle/Helper/Security/Acl/Permission/PermissionAdmin.php 1 location

@@ 131-136 (lines=6) @@
128
            $acl = $this->aclProvider->findAcl($objectIdentity);
129
            $objectAces = $acl->getObjectAces();
130
            /* @var $ace AuditableEntryInterface */
131
            foreach ($objectAces as $ace) {
132
                $securityIdentity = $ace->getSecurityIdentity();
133
                if ($securityIdentity instanceof RoleSecurityIdentity) {
134
                    $this->permissions[$securityIdentity->getRole()] = new MaskBuilder($ace->getMask());
135
                }
136
            }
137
        } catch (AclNotFoundException $e) {
138
            // No Acl found - do nothing (or should we initialize with default values here?)
139
        }

src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php 1 location

@@ 723-731 (lines=9) @@
720
            $objectAces = $acl->getObjectAces();
721
722
            /* @var AuditableEntryInterface $ace */
723
            foreach ($objectAces as $ace) {
724
                $securityIdentity = $ace->getSecurityIdentity();
725
                if (
726
                    $securityIdentity instanceof RoleSecurityIdentity &&
727
                    ($ace->getMask() & MaskBuilder::MASK_VIEW != 0)
728
                ) {
729
                    $roles[] = $securityIdentity->getRole();
730
                }
731
            }
732
        } catch (AclNotFoundException $e) {
733
            // No ACL found... assume default
734
            $roles = array('IS_AUTHENTICATED_ANONYMOUSLY');