XoopsModules25x/xoopsinfo

View on GitHub

Showing 613 of 16,781 total issues

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

        if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
            $sql .= ' '.$criteria->renderWhere();
            if ($criteria->getSort() != '') {
                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
            }
Severity: Minor
Found in kernel/mimetypes.php and 1 other location - About 35 mins to fix
kernel/mimetypes.php on lines 170..178

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 92.

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

        if (defined('PSI_HIDE_NETWORK_INTERFACE')) {
            if (is_string(PSI_HIDE_NETWORK_INTERFACE)) {
                if (preg_match(ARRAY_EXP, PSI_HIDE_NETWORK_INTERFACE)) {
                    $hideDevices = eval(PSI_HIDE_NETWORK_INTERFACE);
                } else {
Severity: Minor
Found in phpsysinfo/includes/xml/class.XML.inc.php and 1 other location - About 35 mins to fix
phpsysinfo/includes/xml/class.XML.inc.php on lines 469..479

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 92.

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

        if (defined('PSI_HIDE_DISKS')) {
            if (is_string(PSI_HIDE_DISKS)) {
                if (preg_match(ARRAY_EXP, PSI_HIDE_DISKS)) {
                    $hideDisks = eval(PSI_HIDE_DISKS);
                } else {
Severity: Minor
Found in phpsysinfo/includes/xml/class.XML.inc.php and 1 other location - About 35 mins to fix
phpsysinfo/includes/xml/class.XML.inc.php on lines 185..195

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 92.

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

                    if (!!max) {
                        max = parseFloat(max) * (max.indexOf(em) > -1 ? ( eminpx || getEmValue() ) : 1);
                    }
Severity: Minor
Found in phpsysinfo/js/vendor/bootstrap-ie8.js and 1 other location - About 35 mins to fix
phpsysinfo/js/vendor/bootstrap-ie8.js on lines 542..544

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 46.

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

                    if (!!min) {
                        min = parseFloat(min) * (min.indexOf(em) > -1 ? ( eminpx || getEmValue() ) : 1);
                    }
Severity: Minor
Found in phpsysinfo/js/vendor/bootstrap-ie8.js and 1 other location - About 35 mins to fix
phpsysinfo/js/vendor/bootstrap-ie8.js on lines 545..547

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 46.

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

                    if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                        if (isset($ar_buf[3]) && ($ar_buf[3]==="G")) {
                                $dev->setCapacity($ar_buf[2] * 1024 * 1024 * 1024);
                            } else {
                                $dev->setCapacity($ar_buf[2] * 1024 * 1024);
Severity: Minor
Found in phpsysinfo/includes/os/class.BSDCommon.inc.php and 1 other location - About 30 mins to fix
phpsysinfo/includes/os/class.BSDCommon.inc.php on lines 341..347

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 91.

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

    private function _voltage()
    {
        foreach ($this->_lines as $line) {
            if (preg_match('/^(V.*)\s*:\s*(.*)$/D', $line, $data)) {
                if ($data[2] <> '+0.00') {
Severity: Minor
Found in phpsysinfo/includes/mb/class.mbmon.inc.php and 1 other location - About 30 mins to fix
phpsysinfo/includes/mb/class.mbmon.inc.php on lines 85..98

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 91.

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

    private function _fans()
    {
        foreach ($this->_lines as $line) {
            if (preg_match('/^(FAN\d*)\s*:\s*(.*)$/D', $line, $data)) {
                if ($data[2] <> '0') {
Severity: Minor
Found in phpsysinfo/includes/mb/class.mbmon.inc.php and 1 other location - About 30 mins to fix
phpsysinfo/includes/mb/class.mbmon.inc.php on lines 105..117

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 91.

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

                        if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                            if (isset($ar_buf[3]) && ($ar_buf[3]==="G")) {
                                $finddev->setCapacity($ar_buf[2] * 1024 * 1024 * 1024);
                            } else {
                                $finddev->setCapacity($ar_buf[2] * 1024 * 1024);
Severity: Minor
Found in phpsysinfo/includes/os/class.BSDCommon.inc.php and 1 other location - About 30 mins to fix
phpsysinfo/includes/os/class.BSDCommon.inc.php on lines 355..361

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 91.

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 4 locations. Consider refactoring.
Open

        BatteryVoltage: {
            html: function () {
                return this.BatteryVoltage + String.fromCharCode(160) + genlang(82); //V
            }
        },
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 3 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1466..1470
phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1471..1475
phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1481..1485

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 45.

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 4 locations. Consider refactoring.
Open

        TimeLeftMinutes: {
            html: function () {
                return this.TimeLeftMinutes + String.fromCharCode(160) + genlang(83); //minutes
            }
        },
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js and 3 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1466..1470
phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1471..1475
phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js on lines 1476..1480

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 45.

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 10 locations. Consider refactoring.
Open

    case "tb":
        show += round(bytes / Math.pow(1000, 4), 2);
        show += "&nbsp;" + genlang(85);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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 10 locations. Consider refactoring.
Open

    case "tib":
        show += round(bytes / Math.pow(1024, 4), 2);
        show += "&nbsp;" + genlang(86);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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 10 locations. Consider refactoring.
Open

    case "mb":
        show += round(bytes / Math.pow(1000, 2), 2);
        show += "&nbsp;" + genlang(40);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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 10 locations. Consider refactoring.
Open

    case "gib":
        show += round(bytes / Math.pow(1024, 3), 2);
        show += "&nbsp;" + genlang(87);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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 10 locations. Consider refactoring.
Open

    case "pb":
        show += round(bytes / Math.pow(1000, 5), 2);
        show += "&nbsp;" + genlang(91);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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 10 locations. Consider refactoring.
Open

    case "kb":
        show += round(bytes / Math.pow(1000, 1), 2);
        show += "&nbsp;" + genlang(39);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456

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 45.

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 10 locations. Consider refactoring.
Open

    case "mib":
        show += round(bytes / Math.pow(1024, 2), 2);
        show += "&nbsp;" + genlang(88);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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 10 locations. Consider refactoring.
Open

    case "gb":
        show += round(bytes / Math.pow(1000, 3), 2);
        show += "&nbsp;" + genlang(41);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 437..440
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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 10 locations. Consider refactoring.
Open

    case "kib":
        show += round(bytes / Math.pow(1024, 1), 2);
        show += "&nbsp;" + genlang(89);
        break;
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js and 9 other locations - About 30 mins to fix
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 421..424
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 425..428
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 429..432
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 433..436
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 441..444
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 445..448
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 449..452
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 453..456
phpsysinfo/js/phpSysInfo/phpsysinfo.js on lines 457..460

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 45.

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