Code Duplication    Length = 10-10 lines in 3 locations

src/database/Postgres.php 3 locations

@@ 7962-7971 (lines=10) @@
7959
                }
7960
            }
7961
        }
7962
        if ($memberofold) {
7963
            foreach ($old as $o) {
7964
                if (!in_array($o, $memberof)) {
7965
                    $status = $this->revokeRole($o, $rolename, 0, 'CASCADE');
7966
                    if ($status != 0) {
7967
                        return -1;
7968
                    }
7969
                }
7970
            }
7971
        }
7972
7973
        //members
7974
        $old = explode(',', $membersold);
@@ 7983-7992 (lines=10) @@
7980
                }
7981
            }
7982
        }
7983
        if ($membersold) {
7984
            foreach ($old as $o) {
7985
                if (!in_array($o, $members)) {
7986
                    $status = $this->revokeRole($rolename, $o, 0, 'CASCADE');
7987
                    if ($status != 0) {
7988
                        return -1;
7989
                    }
7990
                }
7991
            }
7992
        }
7993
7994
        //adminmembers
7995
        $old = explode(',', $adminmembersold);
@@ 8004-8013 (lines=10) @@
8001
                }
8002
            }
8003
        }
8004
        if ($adminmembersold) {
8005
            foreach ($old as $o) {
8006
                if (!in_array($o, $adminmembers)) {
8007
                    $status = $this->revokeRole($rolename, $o, 1, 'CASCADE');
8008
                    if ($status != 0) {
8009
                        return -1;
8010
                    }
8011
                }
8012
            }
8013
        }
8014
8015
        return $status;
8016
    }