Identity/IdentityUtils.php
public static function filterRolesIdentities(array $sids)
    {
        $roles = [];

        foreach ($sids as $sid) {
            if ($sid instanceof RoleSecurityIdentity && false === strpos($sid->getIdentifier(), 'IS_')) {
                $roles[] = OrganizationalUtil::format($sid->getIdentifier());
            }
        }

        return array_values(array_unique($roles));
    }
public static function filterRolesIdentities(array $sids)
    {
        $roles = [];

        foreach ($sids as $sid) {
            if ($sid instanceof RoleSecurityIdentity && false === strpos($sid->getIdentifier(), 'IS_')) {
                $roles[] = OrganizationalUtil::format($sid->getIdentifier());
            }
        }

        return array_values(array_unique($roles));
    }
public static function filterRolesIdentities ( array $ sids ) { $ roles = [ ] ; foreach ( $ sids as $ sid ) { if ( $ sid instanceof RoleSecurityIdentity && false === strpos ( $ sid -> getIdentifier ( ) , 'IS_' ) ) { $ roles [ ] = OrganizationalUtil :: format ( $ sid -> getIdentifier ( ) ) ; } } return array_values ( array_unique ( $ roles ) ) ; }
Filter the role identities and convert to strings.

@param SecurityIdentityInterface[] $sids The security identities

@return string[]
Filter the role identities and convert to strings .