x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.

Code Duplication    Length = 10-10 lines in 3 locations

src/database/Postgres.php 3 locations

@@ 7786-7795 (lines=10) @@
7783
                }
7784
            }
7785
        }
7786
        if ($memberofold) {
7787
            foreach ($old as $o) {
7788
                if (!in_array($o, $memberof)) {
7789
                    $status = $this->revokeRole($o, $rolename, 0, 'CASCADE');
7790
                    if ($status != 0) {
7791
                        return -1;
7792
                    }
7793
                }
7794
            }
7795
        }
7796
7797
        //members
7798
        $old = explode(',', $membersold);
@@ 7807-7816 (lines=10) @@
7804
                }
7805
            }
7806
        }
7807
        if ($membersold) {
7808
            foreach ($old as $o) {
7809
                if (!in_array($o, $members)) {
7810
                    $status = $this->revokeRole($rolename, $o, 0, 'CASCADE');
7811
                    if ($status != 0) {
7812
                        return -1;
7813
                    }
7814
                }
7815
            }
7816
        }
7817
7818
        //adminmembers
7819
        $old = explode(',', $adminmembersold);
@@ 7828-7837 (lines=10) @@
7825
                }
7826
            }
7827
        }
7828
        if ($adminmembersold) {
7829
            foreach ($old as $o) {
7830
                if (!in_array($o, $adminmembers)) {
7831
                    $status = $this->revokeRole($rolename, $o, 1, 'CASCADE');
7832
                    if ($status != 0) {
7833
                        return -1;
7834
                    }
7835
                }
7836
            }
7837
        }
7838
7839
        return $status;
7840
    }