Code Duplication    Length = 4-4 lines in 3 locations

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

@@ 223-226 (lines=4) @@
220
        if (!class_exists($modelName)) {
221
            return [];
222
        }
223
        if (!$this->checkAccess()) {
224
            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
225
            return [];
226
        }
227
        $modelName = $this->modelName;
228
        $queryParams = [];
229
        if (empty($params['all'])) {
@@ 504-507 (lines=4) @@
501
        if (!class_exists($modelName)) {
502
            return [];
503
        }
504
        if (!$this->checkAccess()) {
505
            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
506
            return [];
507
        }
508
        if (!empty($params['limit'])) {
509
            $this->limit = (int) $params['limit'];
510
        }
@@ 665-668 (lines=4) @@
662
        if (!class_exists($this->modelName)) {
663
            return false;
664
        }
665
        if (!$this->checkAccess()) {
666
            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
667
            return [];
668
        }
669
        $tree = new Tree();
670
        $tree->ul($this->managerOptions['categorys']['model'], 0, function($category) {
671
            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>