imagecms/ImageCMS

View on GitHub

Showing 1,388 of 1,858 total issues

Method getCategoriesFromBase has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function getCategoriesFromBase() {
        $query = "
            SELECT 
                `shop_category`.`id`, 
                `shop_category`.`parent_id`, 
Severity: Minor
Found in application/modules/import_export/classes/Export.php - About 1 hr to fix

Method saveCSVFile has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function saveCSVFile() {
        $this->takeFileName();

        $this->load->library(
            'upload',
Severity: Minor
Found in application/modules/import_export/import.php - About 1 hr to fix

Method recent_comments has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function recent_comments(array $widget = []) {
        if ($widget['settings'] === FALSE) {
            $settings = $this->defaults;
        } else {
            $settings = $widget['settings'];
Severity: Minor
Found in application/modules/comments/comments_widgets.php - About 1 hr to fix

Method getForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getForm($param) {
        $payment_method_id = $param->getPaymentMethod();
        $key = $payment_method_id . '_' . $this->moduleName;
        $paySettings = $this->getPaymentSettings($key);

Method reset_password has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function reset_password() {
        // Get username and key
        $email = $this->input->post('email');
        $key = $this->input->post('key');
        // Reset password
Severity: Minor
Found in application/modules/auth/authapi.php - About 1 hr to fix

Method get_categories has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function get_categories($order_by = 'name', $sort_order = 'desc') {
        if ($sort_order != 'desc' AND $sort_order != 'asc') {
            $sort_order = 'desc';
        }

Severity: Minor
Found in application/modules/gallery/models/gallery_m.php - About 1 hr to fix

Method edit_module_widget has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function edit_module_widget($id, $update_info = FALSE, $locale = NULL) {
        //cp_check_perm('widget_access_settings');
        $locale = $locale ?: MY_Controller::defaultLocale();

        if ($this->input->post()) {
Severity: Minor
Found in application/modules/admin/widgets_manager.php - About 1 hr to fix

Method getDiscount has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getDiscount($option = [], $typeReturn = null) {

        if (count($option) > 0) {
            BaseDiscount::prepareOption($option);
        }
Severity: Minor
Found in application/modules/mod_discount/discount_api.php - About 1 hr to fix

Method update has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function update($module_template, $type, $lang) {

        $strings = (array) json_decode($this->input->post('results'));
        $translations = $this->makeCorrectPoPaths($module_template, $type, $lang, TRUE);

Severity: Minor
Found in application/modules/translator/admin.php - About 1 hr to fix

Method _install has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function _install() {
        $this->load->dbforge();
        ($this->dx_auth->is_admin()) OR exit;

        $fields = [
Severity: Minor
Found in application/modules/template_manager/template_manager.php - About 1 hr to fix

Method checkRangeForCumulativeDiscount has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function checkRangeForCumulativeDiscount($data = FALSE, $id = null) {
        if (!$data) {
            return FALSE;
        }

Severity: Minor
Found in application/modules/mod_discount/models/discount_model_admin.php - About 1 hr to fix

Method update_fields_data has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function update_fields_data($item_id, $data, $type) {

        if (count($data) > 0) {
            foreach ($data as $key => $val) {
                $field_data = [
Severity: Minor
Found in application/modules/cfcm/cfcm.php - About 1 hr to fix

Method save has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function save($name, $type, $lang, $data) {
        ksort($data, SORT_STRING | SORT_FLAG_CASE);

        $url = $this->getPoFileUrl($name, $type, $lang);

Severity: Minor
Found in application/modules/translator/classes/PoFileManager.php - About 1 hr to fix

Method makePoFileData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function makePoFileData($data = []) {
        $resultData = [];
        foreach ($data as $key => $po) {
            if ($po) {
                $po = $this->preparePoFileData((array) $po);
Severity: Minor
Found in application/modules/translator/classes/PoFileManager.php - About 1 hr to fix

Method update has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function update() {

        // update has only two "passes" - as we already got product_id
        $this->updateFromCollector('shop_products', 'id');
        $this->updateFromCollector('shop_product_categories', 'product_id');
Severity: Minor
Found in application/modules/exchange/classes/Products.php - About 1 hr to fix

Method checkPaid has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkPaid($param) {
        $ci = &get_instance();

        $order_id = $param['LMI_PAYMENT_NO'];
        $userOrder = $ci->db->where('id', $order_id)

Method checkPageAccess has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function checkPageAccess($roles) {

        if ($roles == FALSE OR count($roles) == 0) {
            return TRUE;
        }
Severity: Minor
Found in application/modules/core/src/CoreModel.php - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

    if (!manual && !p.cyclePause &&
        ((opts.autostop && (--opts.countdown <= 0)) ||
        (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
        if (opts.end)
            opts.end(opts);
Severity: Major
Found in application/modules/xbanners/assets/js/cycle.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

    <?php if (isset($sections['http_headers']) || isset($sections['get']) || isset($sections['config']) || isset($sections['post']) || isset($sections['uri_string']) || isset($sections['controller_info']) || isset($sections['userdata'])) :?>
        <div id="ci-profiler-vars" class="ci-profiler-box" style="display: none">
            
            <!-- User Data -->
            <?php if (isset($sections['userdata'])) :?>
Severity: Major
Found in application/views/profiler_template.php - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

                if (substr($file, 0, 6) != 'cache_' && $file != 'hooks.php' && $file != '.' && $file != '..' && $file != '/' && strstr($file, '.') != TRUE && (time() - $stat['mtime']) > $this->_Config['auto_clean_life']) {

                    $files_all = opendir('./system/cache/' . $file);
                    while (false !== ($fileT = readdir($files_all))) {
                        $stat = stat($this->_Config['store']);
Severity: Major
Found in application/libraries/cache.php - About 1 hr to fix
Severity
Category
Status
Source
Language