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

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