Code Duplication    Length = 15-16 lines in 2 locations

application/libraries/Permitions.php 2 locations

@@ 412-427 (lines=16) @@
409
                    pjax('/admin/rbac/groupEdit/' . $idNewGroup);
410
                }
411
            }
412
        } else {
413
414
            $sqlModel = 'SELECT SRP.id, SRP.name, SRP.group_id, SRPI.title, SRPI.description
415
            FROM shop_rbac_privileges SRP
416
            INNER JOIN shop_rbac_privileges_i18n SRPI ON SRPI.id = SRP.id WHERE SRPI.locale = "' . MY_Controller::getCurrentLocale() . '"  ORDER BY SRP.name ASC';
417
            $model = $this->db->query($sqlModel);
418
419
            $this->template->add_array(
420
                [
421
                 'model'      => $model,
422
                 'privileges' => $model->result(),
423
                ]
424
            );
425
426
            $this->template->show('groupCreate', FALSE);
427
        }
428
    }
429
430
    public function groupEdit($groupId) {
@@ 884-898 (lines=15) @@
881
            } else {
882
                pjax('/admin/rbac/privilegeList');
883
            }
884
        } else {
885
            $sql = 'SELECT SRG.id, SRGI.description
886
            FROM shop_rbac_group SRG
887
            INNER JOIN  shop_rbac_group_i18n SRGI ON SRGI.id = SRG.id WHERE SRGI.locale = "' . MY_Controller::getCurrentLocale() . '"';
888
            $queryRBACGroup = $this->db->query($sql)->result();
889
890
            $this->template->add_array(
891
                [
892
                 'model'  => $queryRBACPrivilege,
893
                 'groups' => $queryRBACGroup,
894
                ]
895
            );
896
897
            $this->template->show('privilegeEdit', FALSE);
898
        }
899
    }
900
901
    /**