XoopsModules25x/xoopsinfo

View on GitHub

Showing 613 of 16,781 total issues

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

    protected function _processes()
    {
        if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
            $processes['*'] = 0;
Severity: Major
Found in phpsysinfo/includes/os/class.DragonFly.inc.php and 1 other location - About 5 hrs to fix
phpsysinfo/includes/os/class.OpenBSD.inc.php on lines 187..208

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

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

    public function build()
    {
        $this->error->addError("WARN", "The SunOS version of phpSysInfo is a work in progress, some things currently don't work");
        if (!$this->blockname || $this->blockname==='vitals') {
            $this->_distro();
Severity: Major
Found in phpsysinfo/includes/os/class.SunOS.inc.php and 1 other location - About 5 hrs to fix
phpsysinfo/includes/os/class.Minix.inc.php on lines 333..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 185.

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Core/post_max_size.php and 1 other location - About 5 hrs to fix
phpsecinfo/PhpSecInfo/Test/Core/upload_max_filesize.php on lines 1..65

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Core/upload_max_filesize.php and 1 other location - About 5 hrs to fix
phpsecinfo/PhpSecInfo/Test/Core/post_max_size.php on lines 1..69

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

    public function execute()
    {
        $this->_lines = array();
        switch (strtolower(PSI_PLUGIN_IPTABLES_ACCESS)) {
            case 'command':
Severity: Major
Found in phpsysinfo/plugins/iptables/class.iptables.inc.php and 1 other location - About 4 hrs to fix
phpsysinfo/plugins/docker/class.docker.inc.php on lines 93..110

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

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

    public function execute()
    {
        $this->_lines = array();
        switch (strtolower(PSI_PLUGIN_DOCKER_ACCESS)) {
            case 'command':
Severity: Major
Found in phpsysinfo/plugins/docker/class.docker.inc.php and 1 other location - About 4 hrs to fix
phpsysinfo/plugins/iptables/class.iptables.inc.php on lines 44..61

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

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

                _fnApplyToChildren( function(nSizer, nToSize) {
                    oStyle = nSizer.style;
                    oStyle.paddingTop = "0";
                    oStyle.paddingBottom = "0";
                    oStyle.borderTopWidth = "0";
Severity: Major
Found in phpsysinfo/js/jQuery/jquery.dataTables.js and 1 other location - About 4 hrs to fix
phpsysinfo/js/jQuery/jquery.dataTables.js on lines 4089..4100

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

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

            _fnApplyToChildren( function(nSizer, nToSize) {
                oStyle = nSizer.style;
                oStyle.paddingTop = "0";
                oStyle.paddingBottom = "0";
                oStyle.borderTopWidth = "0";
Severity: Major
Found in phpsysinfo/js/jQuery/jquery.dataTables.js and 1 other location - About 4 hrs to fix
phpsysinfo/js/jQuery/jquery.dataTables.js on lines 4109..4120

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

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 (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='temperature') foreach ($mbinfo_detail->getMbTemp() as $dev) {
                    if ($temp == null) {
                        $temp = $mbinfo->addChild('Temperature');
                    }
                    $item = $temp->addChild('Item');
Severity: Major
Found in phpsysinfo/includes/xml/class.XML.inc.php and 2 other locations - About 4 hrs to fix
phpsysinfo/includes/xml/class.XML.inc.php on lines 547..560
phpsysinfo/includes/xml/class.XML.inc.php on lines 580..593

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

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 (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='fans') foreach ($mbinfo_detail->getMbFan() as $dev) {
                    if ($fan == null) {
                        $fan = $mbinfo->addChild('Fans');
                    }
                    $item = $fan->addChild('Item');
Severity: Major
Found in phpsysinfo/includes/xml/class.XML.inc.php and 2 other locations - About 4 hrs to fix
phpsysinfo/includes/xml/class.XML.inc.php on lines 532..545
phpsysinfo/includes/xml/class.XML.inc.php on lines 580..593

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

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 (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='power') foreach ($mbinfo_detail->getMbPower() as $dev) {
                    if ($power == null) {
                        $power = $mbinfo->addChild('Power');
                    }
                    $item = $power->addChild('Item');
Severity: Major
Found in phpsysinfo/includes/xml/class.XML.inc.php and 2 other locations - About 4 hrs to fix
phpsysinfo/includes/xml/class.XML.inc.php on lines 532..545
phpsysinfo/includes/xml/class.XML.inc.php on lines 547..560

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

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 _temperature()
    {
        foreach ($this->_lines as $line) {
            $buffer = preg_split("/\s*\|\s*/", $line);
            if ($buffer[2] == "Temperature" && $buffer[11] != "N/A" && $buffer[4] == "C") {
Severity: Major
Found in phpsysinfo/includes/mb/class.freeipmi.inc.php and 1 other location - About 4 hrs to fix
phpsysinfo/includes/mb/class.freeipmi.inc.php on lines 116..129

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

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 _power()
    {
        foreach ($this->_lines as $line) {
            $buffer = preg_split("/\s*\|\s*/", $line);
            if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "W") {
Severity: Major
Found in phpsysinfo/includes/mb/class.freeipmi.inc.php and 1 other location - About 4 hrs to fix
phpsysinfo/includes/mb/class.freeipmi.inc.php on lines 51..64

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

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Functions/ftp_exec.php and 45 other locations - About 4 hrs to fix
phpsecinfo/PhpSecInfo/Test/Functions/apache_child_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/define_syslog_variables.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellarg.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellcmd.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/eval.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fp.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_connect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_get.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_login.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_nb_fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_put.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_raw.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_rawlist.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/highlight_file.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_alter.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_get_all.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_restore.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/inject_code.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/mysql_pconnect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/openlog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/passthru.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_XmlRpc.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_remoteInfo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcDecode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcEncode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/php_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/popen.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_getpwuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_kill.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_mkfifo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setpgid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setsid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_close.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_get_status.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_nice.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_open.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/shell_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/syslog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/system.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/xmlrpc_entity_decode.php on lines 1..77

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

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

<?php

declare(strict_types=1);

/**
phpsecinfo/PhpSecInfo/Test/Functions/apache_child_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/define_syslog_variables.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellarg.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellcmd.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/eval.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fp.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_connect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_get.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_login.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_nb_fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_put.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_raw.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_rawlist.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/highlight_file.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_alter.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_get_all.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_restore.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/inject_code.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/mysql_pconnect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/openlog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/passthru.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_XmlRpc.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_remoteInfo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcEncode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/php_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/popen.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_getpwuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_kill.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_mkfifo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setpgid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setsid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_close.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_get_status.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_nice.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_open.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/shell_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/syslog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/system.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/xmlrpc_entity_decode.php on lines 1..77

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

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Functions/proc_close.php and 45 other locations - About 4 hrs to fix
phpsecinfo/PhpSecInfo/Test/Functions/apache_child_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/define_syslog_variables.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellarg.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellcmd.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/eval.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fp.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_connect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_get.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_login.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_nb_fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_put.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_raw.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_rawlist.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/highlight_file.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_alter.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_get_all.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_restore.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/inject_code.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/mysql_pconnect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/openlog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/passthru.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_XmlRpc.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_remoteInfo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcDecode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcEncode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/php_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/popen.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_getpwuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_kill.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_mkfifo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setpgid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setsid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_get_status.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_nice.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_open.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/shell_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/syslog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/system.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/xmlrpc_entity_decode.php on lines 1..77

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

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Functions/phpAds_remoteInfo.php and 45 other locations - About 4 hrs to fix
phpsecinfo/PhpSecInfo/Test/Functions/apache_child_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/define_syslog_variables.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellarg.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellcmd.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/eval.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fp.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_connect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_get.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_login.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_nb_fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_put.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_raw.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_rawlist.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/highlight_file.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_alter.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_get_all.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_restore.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/inject_code.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/mysql_pconnect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/openlog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/passthru.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_XmlRpc.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcDecode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcEncode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/php_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/popen.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_getpwuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_kill.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_mkfifo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setpgid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setsid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_close.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_get_status.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_nice.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_open.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/shell_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/syslog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/system.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/xmlrpc_entity_decode.php on lines 1..77

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

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Functions/exec.php and 45 other locations - About 4 hrs to fix
phpsecinfo/PhpSecInfo/Test/Functions/apache_child_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/define_syslog_variables.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellarg.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellcmd.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/eval.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fp.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_connect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_get.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_login.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_nb_fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_put.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_raw.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_rawlist.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/highlight_file.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_alter.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_get_all.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_restore.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/inject_code.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/mysql_pconnect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/openlog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/passthru.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_XmlRpc.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_remoteInfo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcDecode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcEncode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/php_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/popen.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_getpwuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_kill.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_mkfifo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setpgid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setsid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_close.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_get_status.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_nice.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_open.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/shell_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/syslog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/system.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/xmlrpc_entity_decode.php on lines 1..77

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

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Functions/ftp_login.php and 45 other locations - About 4 hrs to fix
phpsecinfo/PhpSecInfo/Test/Functions/apache_child_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/define_syslog_variables.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellarg.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellcmd.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/eval.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fp.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_connect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_get.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_nb_fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_put.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_raw.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_rawlist.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/highlight_file.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_alter.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_get_all.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_restore.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/inject_code.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/mysql_pconnect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/openlog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/passthru.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_XmlRpc.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_remoteInfo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcDecode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcEncode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/php_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/popen.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_getpwuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_kill.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_mkfifo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setpgid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setsid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_close.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_get_status.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_nice.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_open.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/shell_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/syslog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/system.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/xmlrpc_entity_decode.php on lines 1..77

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

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

<?php

declare(strict_types=1);

/**
Severity: Major
Found in phpsecinfo/PhpSecInfo/Test/Functions/posix_setpgid.php and 45 other locations - About 4 hrs to fix
phpsecinfo/PhpSecInfo/Test/Functions/apache_child_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/define_syslog_variables.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellarg.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/escapeshellcmd.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/eval.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fp.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_connect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_get.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_login.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_nb_fput.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_put.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_raw.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ftp_rawlist.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/highlight_file.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_alter.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_get_all.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/ini_restore.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/inject_code.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/mysql_pconnect.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/openlog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/passthru.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_XmlRpc.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_remoteInfo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcDecode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/phpAds_xmlrpcEncode.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/php_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/popen.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_getpwuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_kill.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_mkfifo.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setsid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_setuid.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/posix_uname.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_close.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_get_status.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_nice.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_open.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/proc_terminate.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/shell_exec.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/syslog.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/system.php on lines 1..77
phpsecinfo/PhpSecInfo/Test/Functions/xmlrpc_entity_decode.php on lines 1..77

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

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