private function findNonExistingUserGroupId()
    {
        $userGroupManager = $this->getUserGroupManager();
        for ( $i = 0; $i < 20; $i++ )
        {
            $id = uniqid('UserGroup#', true);
            if ( !$userGroupManager()->checkUserGroupExistence( $id ) )
            {
                return $id;
            }
        }

        throw new \Exception( 'Possible endless loop when attempting to find a new id for UserGroup.' );
    }
private function findNonExistingUserGroupId()
    {
        $userGroupManager = $this->getUserGroupManager();
        for ( $i = 0; $i < 20; $i++ )
        {
            $id = uniqid('UserGroup#', true);
            if ( !$userGroupManager()->checkUserGroupExistence( $id ) )
            {
                return $id;
            }
        }

        throw new \Exception( 'Possible endless loop when attempting to find a new id for UserGroup.' );
    }
private function findNonExistingUserGroupId ( ) { $ userGroupManager = $ this -> getUserGroupManager ( ) ; for ( $ i = 0 ; $ i < 20 ; $ i ++ ) { $ id = uniqid ( 'UserGroup#' , true ) ; if ( ! $ userGroupManager ( ) -> checkUserGroupExistence ( $ id ) ) { return $ id ; } } throw new \ Exception ( 'Possible endless loop when attempting to find a new id for UserGroup.' ) ; }
Find an non existent UserGroup id

@return int Non existing id

@throws \Exception Possible endless loop
Find an non existent UserGroup id