Code Duplication    Length = 4-4 lines in 3 locations

system/modules/Ui/objects/DataManager.php 3 locations

@@ 216-219 (lines=4) @@
213
        if (!class_exists($modelName)) {
214
            return [];
215
        }
216
        if (!$this->checkAccess()) {
217
            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
218
            return [];
219
        }
220
        $modelName = $this->modelName;
221
        $queryParams = [];
222
        if (empty($params['all'])) {
@@ 493-496 (lines=4) @@
490
        if (!class_exists($modelName)) {
491
            return [];
492
        }
493
        if (!$this->checkAccess()) {
494
            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
495
            return [];
496
        }
497
        if (!empty($params['limit'])) {
498
            $this->limit = (int) $params['limit'];
499
        }
@@ 657-660 (lines=4) @@
654
        if (!class_exists($this->modelName)) {
655
            return false;
656
        }
657
        if (!$this->checkAccess()) {
658
            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
659
            return [];
660
        }
661
        $tree = new Tree();
662
        $tree->ul($this->managerOptions['categorys']['model'], 0, function($category) {
663
            return "<a href='#' onclick='inji.Ui.dataManagers.get(this).switchCategory(this);return false;' data-path ='" . $category->tree_path . ($category->pk() ? $category->pk() . "/" : '') . "'> " . $category->name . "</a>