xoopscube/altsys

View on GitHub

Showing 78 of 288 total issues

Similar blocks of code found in 6 locations. Consider refactoring.
Open

<?php
/**
* Translation of altsys for Persian users
*
* @copyright          http://www.impresscms.ir/ The Persian ImpressCMS Project 
xoops_trust_path/libs/altsys/language/english/mytplsadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/german/mytplsadmin.php on lines 1..29
xoops_trust_path/libs/altsys/language/ja_utf8/mytplsadmin.php on lines 1..28
xoops_trust_path/libs/altsys/language/portuguese/mytplsadmin.php on lines 1..25
xoops_trust_path/libs/altsys/language/pt_utf8/mytplsadmin.php on lines 1..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 287.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

<?php

define('_MYLANGADMIN_H3_MODULE', '言語定数操作対象モジュール') ;
define('_MYLANGADMIN_CACHEUPDATED', '言語キャッシュを更新しました') ;
define('_MYLANGADMIN_BTN_UPDATE', '更新') ;
xoops_trust_path/libs/altsys/language/english/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/persian/mylangadmin.php on lines 1..40
xoops_trust_path/libs/altsys/language/portuguese/mylangadmin.php on lines 1..23
xoops_trust_path/libs/altsys/language/pt_utf8/mylangadmin.php on lines 1..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 261.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

<?php
// $Id: mylangadmin.php 1040 2011-11-06 05:24:00Z mikhail $
// License http://creativecommons.org/licenses/by/2.5/br/
define("_MYLANGADMIN_BTN_RESET", "Redefinir");
define("_MYLANGADMIN_BTN_UPDATE", "Atualizar");
xoops_trust_path/libs/altsys/language/english/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/ja_utf8/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/persian/mylangadmin.php on lines 1..40
xoops_trust_path/libs/altsys/language/pt_utf8/mylangadmin.php on lines 1..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 261.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

<?php
/**
* Translation of altsys for Persian users
*
* @copyright          http://www.impresscms.ir/ The Persian ImpressCMS Project 
xoops_trust_path/libs/altsys/language/english/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/ja_utf8/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/portuguese/mylangadmin.php on lines 1..23
xoops_trust_path/libs/altsys/language/pt_utf8/mylangadmin.php on lines 1..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 261.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

<?php

define('_MYLANGADMIN_H3_MODULE', 'Target module') ;
define('_MYLANGADMIN_CACHEUPDATED', 'The cache file has been updated') ;
define('_MYLANGADMIN_BTN_UPDATE', 'Update') ;
xoops_trust_path/libs/altsys/language/ja_utf8/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/persian/mylangadmin.php on lines 1..40
xoops_trust_path/libs/altsys/language/portuguese/mylangadmin.php on lines 1..23
xoops_trust_path/libs/altsys/language/pt_utf8/mylangadmin.php on lines 1..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 261.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

<?php
// $Id: mylangadmin.php 1040 2011-11-06 05:24:00Z mikhail $
// License http://creativecommons.org/licenses/by/2.5/br/
define("_MYLANGADMIN_BTN_RESET", "Redefinir");
define("_MYLANGADMIN_BTN_UPDATE", "Atualizar");
xoops_trust_path/libs/altsys/language/english/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/ja_utf8/mylangadmin.php on lines 1..27
xoops_trust_path/libs/altsys/language/persian/mylangadmin.php on lines 1..40
xoops_trust_path/libs/altsys/language/portuguese/mylangadmin.php on lines 1..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 261.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) {
    while (($file = readdir($handler)) !== false) {
        $file_path = $tplsadmin_autoupdate_path . '/' . $file ;
        if (is_file($file_path) && substr($file, -5) == '.html') {
            $mtime = intval(@filemtime($file_path)) ;
xoops_trust_path/libs/altsys/include/autoupdate_from_module.inc.php on lines 19..31
xoops_trust_path/libs/altsys/include/autoupdate_from_module.inc.php on lines 34..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 249.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) {
        while (($file = readdir($handler)) !== false) {
            $file_path = $tplsadmin_autoupdate_path . '/' . $file ;
            if (is_file($file_path) && substr($file, -5) == '.html') {
                $mtime = intval(@filemtime($file_path)) ;
xoops_trust_path/libs/altsys/include/autoupdate_from_module.inc.php on lines 34..46
xoops_trust_path/libs/altsys/include/autoupdate_from_theme.inc.php on lines 10..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 249.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    if ($handler = @opendir($tplsadmin_autoupdate_path . '/blocks/')) {
        while (($file = readdir($handler)) !== false) {
            $file_path = $tplsadmin_autoupdate_path . '/blocks/' . $file ;
            if (is_file($file_path) && substr($file, -5) == '.html') {
                $mtime = intval(@filemtime($file_path)) ;
xoops_trust_path/libs/altsys/include/autoupdate_from_module.inc.php on lines 19..31
xoops_trust_path/libs/altsys/include/autoupdate_from_theme.inc.php on lines 10..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 249.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    return "
    <table  cellspacing='0' style='table-layout: fixed; width: 200px; '>
        <tr>
            <td rowspan='2'>
                <div class='blockposition $scol0'>
xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php on lines 338..358

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 190.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    return "
                <div class='blockposition $scol0'>
                    <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_LEFT.";' />
                </div>
                <div style='float:"._GLOBAL_LEFT.";'>-</div>
Severity: Major
Found in xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php and 1 other location - About 5 hrs to fix
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php on lines 89..123

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 190.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public function _loadLanguage($dirname, $fileBodyName)
    {
        // read/check once (selected_theme)/language/(lang).php
        if (! $this->theme_lang_checked) {
            $root =& XCube_Root::getSingleton() ;
Severity: Major
Found in html/preload/SetupAltsysLangMgr.class.php and 1 other location - About 5 hrs to fix
xoops_trust_path/libs/altsys/class/SetupAltsysLangMgr.class.php on lines 50..72

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 186.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public function _loadLanguage($dirname, $fileBodyName)
    {
        // read/check once (selected_theme)/language/(lang).php
        if (! $this->theme_lang_checked) {
            $root =& XCube_Root::getSingleton() ;
html/preload/SetupAltsysLangMgr.class.php on lines 50..72

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 186.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      elseif ((isset($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX]))
               && ($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX] != 0)) {

          // ----- Look if the index is in the list
          for ($j=$j_start;
Severity: Major
Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 5 hrs to fix
xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 1843..1859

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 183.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      elseif ((isset($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX]))
               && ($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX] != 0)) {

          // ----- Look if the index is in the list
          for ($j=$j_start; ($j<sizeof($p_params[ARCHIVE_ZIP_PARAM_BY_INDEX])) && (!$v_extract); $j++) {
Severity: Major
Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 5 hrs to fix
xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 2684..2704

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 183.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    if ($p_header['mdate'] && $p_header['mtime']) {
        // ----- Extract time
      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
        $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
        $v_seconde = ($p_header['mtime'] & 0x001F)*2;
Severity: Major
Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 4 hrs to fix
xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 2295..2310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 182.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

      if ($p_header['mdate'] && $p_header['mtime']) {
          // ----- Extract time
      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
          $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
          $v_seconde = ($p_header['mtime'] & 0x001F)*2;
Severity: Major
Found in xoops_trust_path/libs/altsys/include/Archive_Zip.php and 1 other location - About 4 hrs to fix
xoops_trust_path/libs/altsys/include/Archive_Zip.php on lines 2401..2416

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 182.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    $block_data = $this->preview_request + array(
        'bid' => $bid ,
        'name' => $block->getVar('name', 'n') ,
        'title' => $block->getVar('title', 'n') ,
        'weight' => intval($block->getVar('weight')) ,
Severity: Major
Found in xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php and 1 other location - About 4 hrs to fix
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php on lines 212..227

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 181.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    $block_data = $this->preview_request + array(
        'bid' => $bid ,
        'name' => $block->getVar('name', 'n') ,
        'title' => $block->getVar('title', 'n') ,
        'weight' => intval($block->getVar('weight')) ,
xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php on lines 897..912

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 181.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        switch ($mode) {
        case 'clone' :
            $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ;
            $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ;
            $next_op = 'clone_ok' ;
Severity: Major
Found in xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php and 1 other location - About 4 hrs to fix
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php on lines 168..194

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 180.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language